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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Word Colouring

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Word Colouring
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Tue 25 Jul 2006 09:51 PM (UTC)  quote  ]

Amended on Tue 25 Jul 2006 09:52 PM (UTC) by Nick Gammon

Message
Yes, there is. First, whenever you change the enemylist table, you need to convert that into a MUSHclient variable, with "|" between each one, like this:


EnemylistDataTable = {"Rynok","Toy","Iou","Turtle"}

SetVariable ("enemylist", table.concat (EnemylistDataTable , "|"))


The SetVariable line you would do when you add to the table (eg. in the alias that adds new enemies). This is a Lua example.

The variable now looks like this:


Rynok|Toy|Iou|Turtle


Now you simply make a trigger that pulls in that variable:


<triggers>
  <trigger
   custom_colour="7"
   enabled="y"
   expand_variables="y"
   match="@!enemylist"
   regexp="y"
   repeat="y"
   sequence="100"
  >
  </trigger>
</triggers>


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Rynok   USA  (25 posts)  [Biography] bio
Date Tue 25 Jul 2006 02:45 PM (UTC)  quote  ]

Amended on Tue 25 Jul 2006 02:47 PM (UTC) by Rynok

Message
I was wondering if there was a way to color all the names in my table "EnemyList" red?

Currently the only thing I found was how to do it by specifying the name in the trigger itself, which isn't dynamic at all, so I was looking for a better approach.

Example:
Enemylist DataTable = {"Rynok","Toy","Iou","Turtle"}
Trigger: Rynok slashes Toy with a bladed Turtle.
(Red Text  ^               ^                        ^)
[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.


1,273 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]