[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Color to the output
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Color to the output

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


Posted by Malek   USA  (27 posts)  [Biography] 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.
[Go to top] top

Posted by Rakon   USA  (123 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] 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
[Go to top] top

Posted by Malek   USA  (27 posts)  [Biography] 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.
[Go to top] 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.


5,065 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]