Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Color to the output

Color to the output

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Malek   USA  (27 posts)  Bio
Date Thu 28 Sep 2006 03:05 AM (UTC)
Message
this is the trigger I have set..

<triggers>
<trigger
custom_colour="7"
colour_change_type="1"
group="pk"
match="^You follow (.*?) (.*?)$"
regexp="y"
send_to="2"
sequence="100"
>
<send>You sTaLk %1-------------------------------------------------( %2 )</send>
</trigger>
</triggers>

I need to set different colors for the out put's to make them easier to see as I am drug all across the world during a Player Kill. Is there any way yo make lets say %1 display as one color and %2 another when sending to the output?

Tod ist gweiss, Lebens est nicht.
Top

Posted by Rakon   USA  (123 posts)  Bio
Date Reply #1 on Thu 28 Sep 2006 06:01 AM (UTC)

Amended on Thu 28 Sep 2006 06:02 AM (UTC) by Rakon

Message
Yes, though Im unsure totally what you're looking for, the following should achieve what you want.
It uses MUSHclients 'world.ColourNote' and 'world.ColourTell' to send a colourful message.
You would change it to your colours you wanted definined in the first, and second arguement.
You might want to change one of the wildcards to a (\w+) match instead of a double 'everything' match

NOTE: Im not to sure on Syntax, but the following should work for LUA if you've scripting enabled

<triggers>
<trigger
custom_colour="7"
colour_change_type="1"
group="pk"
match="^You follow (.*?) (.*?)$"
regexp="y"
send_to="12"
sequence="100"
>
<send>ColourTell "silver","black", "You sTaLk "
ColourTell "white","black", "%1" 
ColourTell "silver", "black", "-------------------------------------------------"
ColourNote "red","black","( %2 )"</send>
</trigger>
</triggers>


--Rakon

Yes, I am a criminal.
My crime is that of curiosity.
My crime is that of judging people by what they say and think, not what they look like.
My crime is that of outsmarting you, something that you will never forgive me for.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 28 Sep 2006 07:31 AM (UTC)
Message
For Lua, only simple strings can be outside brackets. You need to put brackets in like this:


ColourTell ("silver", "black", "You sTaLk ")
ColourTell ("white", "black", "%1") 
ColourTell ("silver", "black", "-------------------------------------------------")
ColourNote ("red", "black", "( %2 )")


You can use the Edit menu -> Colour Picker, to find the valid names for colours.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Malek   USA  (27 posts)  Bio
Date Reply #3 on Fri 29 Sep 2006 02:40 PM (UTC)
Message
That worked great.. Thanks for the help guys..


Tod ist gweiss, Lebens est nicht.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,879 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.