Zist Sample Triggers: Difference between revisions
Created page with "=Sample Triggers= These "Trigger Sets" either contain single triggers, multiple triggers, triggers and supporting aliases, or any combination thereof. Click on each link to op..." |
No edit summary |
||
| Line 43: | Line 43: | ||
--- This line takes the number in @pracnum, adds 1 to it, and saves it back to @pracnum. In other words, it increments @pracnum by 1. If @pracnum had "1" in it, then it has "2" in it when this line is done. In this way, this autoprac alias "cycles through" all of the words in the list, one by one, before it starts over again. | --- This line takes the number in @pracnum, adds 1 to it, and saves it back to @pracnum. In other words, it increments @pracnum by 1. If @pracnum had "1" in it, then it has "2" in it when this line is done. In this way, this autoprac alias "cycles through" all of the words in the list, one by one, before it starts over again. | ||
==== | ====SCRIPT==== | ||
#TRIGGER {^Your} {autoprac} {autop} | #TRIGGER {^Your} {autoprac} {autop} | ||
| Line 101: | Line 101: | ||
Thus, a bold white on a blue background would be 128 + 1*16 + 15 = 159. | Thus, a bold white on a blue background would be 128 + 1*16 + 15 = 159. | ||
==== | ====SCRIPT==== | ||
#TRIGGER {bright} {#cw green} {bright} | #TRIGGER {bright} {#cw green} {bright} | ||
| Line 123: | Line 123: | ||
The main trigger of this set, shown below, triggers off of lines that start with the character "<", so that it can catch every equipment line that comes across. It searches that line for an equipment position identifier, such as "used as light", and sets a variable to 1 if it finds that line. That's all it does is sets variables to 1 when it finds the corresponding line! It also sets the @eqlist variable to 1, to signify that the trigger has gone off and collected equipment data. The alias takes it from there... | The main trigger of this set, shown below, triggers off of lines that start with the character "<", so that it can catch every equipment line that comes across. It searches that line for an equipment position identifier, such as "used as light", and sets a variable to 1 if it finds that line. That's all it does is sets variables to 1 when it finds the corresponding line! It also sets the @eqlist variable to 1, to signify that the trigger has gone off and collected equipment data. The alias takes it from there... | ||
#TRIGGER {^<*} {#if (%pos(used as light,%trigger) > 0) {#var eqli 1};#if (%pos(worn on finger,%trigger) > 0) {#math eqfi @eqfi+1};#if (%pos(worn around neck,%trigger) > 0) {#math eqn @eqn+1};#if (%pos(worn on body,%trigger) > 0) {#var eqb 1};#if (%pos(worn on head,%trigger) > 0) {#var eqhe 1};#if (%pos(worn on legs,%trigger) > 0) {#var eqle 1};#if (%pos(worn on feet,%trigger) > 0) {#var eqfe 1};#if (%pos(worn on hands,%trigger) > 0) {#var eqha 1};#if (%pos(worn on arms,%trigger) > 0) {#var eqa 1};#if (%pos(worn as shield,%trigger) > 0) {#var eqs 1};#if (%pos(worn about body,%trigger) > 0) {#var eqab 1};#if (%pos(worn about waist,%trigger) > 0) {#var eqawa 1};#if (%pos(worn around wrist,%trigger) > 0) {#math eqawr @eqawr+1};#if (%pos(wielded,%trigger) > 0) {#var eqw 1};#if (%pos(dual wielded,%trigger) > 0) {#var eqdw 1};#if (%pos(held,%trigger) > 0) {#var eqh 1};#if (%pos(worn on ears,%trigger) > 0) {#var eqea 1};#if (%pos(worn on eyes,%trigger) > 0) {#var eqey 1};#var eqlist 1} {eq} | #TRIGGER {^<*} {#if (%pos(used as light,%trigger) > 0) {#var eqli 1};#if (%pos(worn on finger,%trigger) > 0) {#math eqfi @eqfi+1};#if (%pos(worn around neck,%trigger) > 0) {#math eqn @eqn+1};#if (%pos(worn on body,%trigger) > 0) | ||
{#var eqb 1};#if (%pos(worn on head,%trigger) > 0) {#var eqhe 1};#if (%pos(worn on legs,%trigger) > 0) {#var eqle 1};#if (%pos(worn on feet,%trigger) > 0) {#var eqfe 1};#if (%pos(worn on hands,%trigger) > 0) {#var eqha 1};#if | |||
(%pos(worn on arms,%trigger) > 0) {#var eqa 1};#if (%pos(worn as shield,%trigger) > 0) {#var eqs 1};#if (%pos(worn about body,%trigger) > 0) {#var eqab 1};#if (%pos(worn about waist,%trigger) > 0) {#var eqawa 1};#if (%pos(worn | |||
around wrist,%trigger) > 0) {#math eqawr @eqawr+1};#if (%pos(wielded,%trigger) > 0) {#var eqw 1};#if (%pos(dual wielded,%trigger) > 0) {#var eqdw 1};#if (%pos(held,%trigger) > 0) {#var eqh 1};#if (%pos(worn on ears,%trigger) > 0) | |||
{#var eqea 1};#if (%pos(worn on eyes,%trigger) > 0) {#var eqey 1};#var eqlist 1} {eq} | |||
The main alias, "eqmissing", reads the variables set by the trigger and reports for each one that is set to 0, meaning that it was not found. It also sets @eqlist to 0, to signify that the eqmissing alias has fired and the report was generated, and clears all equipment slot variables to 0 again. | The main alias, "eqmissing", reads the variables set by the trigger and reports for each one that is set to 0, meaning that it was not found. It also sets @eqlist to 0, to signify that the eqmissing alias has fired and the report was generated, and clears all equipment slot variables to 0 again. | ||
#ALIAS eqmissing {#var eqlist 0;#show ******** START OF MISSING EQ LIST ********;#if (@eqli = 0) {#show LIGHT IS MISSING};#if (@eqfi < 2) {#show FINGER IS MISSING};#if (@eqn < 2) {#show NECK IS MISSING};#if (@eqb = 0) {#show BODY IS MISSING};#if (@eqhe = 0) {#show HEAD IS MISSING};#if (@eqle = 0) {#show LEGS IS MISSING};#if (@eqfe = 0) {#show FEET IS MISSING};#if (@eqha = 0) {#show HANDS IS MISSING};#if (@eqa = 0) {#show ARMS IS MISSING};#if (@eqs = 0) {#show SHIELD IS MISSING};#if (@eqab = 0) {#show ABOUT BODY IS MISSING};#if (@eqawa = 0) {#show ABOUT WAIST IS MISSING};#if (@eqawr < 2) {#show AROUND WRIST IS MISSING};#if (@eqw = 0) {#show WIELDED IS MISSING};#if (@eqdw = 0) {#show DUAL-WIELDED IS MISSING};#if (@eqh = 0) {#show HELD IS MISSING};#if (@eqea = 0) {#show EARS IS MISSING};#if (@eqey = 0) {#show EYES IS MISSING};#show ******** DONE WITH MISSING LIST ********;#var eqli 0;#var eqfi 0;#var eqn 0;#var eqb 0;#var eqhe 0;#var eqle 0;#var eqfe 0;#var eqha 0;#var eqa 0;#var eqs 0;#var eqab 0;#var eqawa 0;#var eqawr 0;#var eqw 0;#var eqdw 0;#var eqh 0;#var eqea 0;#var eqey 0;#noop set all equipment slot variables to zero} {eq} | #ALIAS eqmissing {#var eqlist 0;#show ******** START OF MISSING EQ LIST ********;#if (@eqli = 0) {#show LIGHT IS MISSING};#if (@eqfi < 2) {#show FINGER IS MISSING};#if (@eqn < 2) {#show NECK IS MISSING};#if (@eqb = 0) {#show BODY | ||
IS MISSING};#if (@eqhe = 0) {#show HEAD IS MISSING};#if (@eqle = 0) {#show LEGS IS MISSING};#if (@eqfe = 0) {#show FEET IS MISSING};#if (@eqha = 0) {#show HANDS IS MISSING};#if (@eqa = 0) {#show ARMS IS MISSING};#if (@eqs = 0) | |||
{#show SHIELD IS MISSING};#if (@eqab = 0) {#show ABOUT BODY IS MISSING};#if (@eqawa = 0) {#show ABOUT WAIST IS MISSING};#if (@eqawr < 2) {#show AROUND WRIST IS MISSING};#if (@eqw = 0) {#show WIELDED IS MISSING};#if (@eqdw = 0) | |||
{#show DUAL-WIELDED IS MISSING};#if (@eqh = 0) {#show HELD IS MISSING};#if (@eqea = 0) {#show EARS IS MISSING};#if (@eqey = 0) {#show EYES IS MISSING};#show ******** DONE WITH MISSING LIST ********;#var eqli 0;#var eqfi 0;#var eqn | |||
0;#var eqb 0;#var eqhe 0;#var eqle 0;#var eqfe 0;#var eqha 0;#var eqa 0;#var eqs 0;#var eqab 0;#var eqawa 0;#var eqawr 0;#var eqw 0;#var eqdw 0;#var eqh 0;#var eqea 0;#var eqey 0;#noop set all equipment slot variables to zero} | |||
{eq} | |||
The third part requires that you add the following command to your prompt trigger. This command line checks the @eqlist variable and if it is set to 1 (meaning that the eqmissing trigger has fired and collected missing line data) then it calls the eqmissing alias to report on the findings. Here is the command to add: | The third part requires that you add the following command to your prompt trigger. This command line checks the @eqlist variable and if it is set to 1 (meaning that the eqmissing trigger has fired and collected missing line data) then it calls the eqmissing alias to report on the findings. Here is the command to add: | ||
#if (@eqlist = 1) {eqmissing} | #if (@eqlist = 1) {eqmissing} | ||
Here is a sample of a run of this trigger/alias set: | Here is a sample of a run of this trigger/alias set: | ||
eq | eq | ||
You are using: | You are using: | ||
< used as light > the sigil of A'enaar | < used as light > the sigil of A'enaar | ||
< worn on finger > (Humming) the Ring of Dignity | < worn on finger > (Humming) the Ring of Dignity | ||
< worn on finger > (Humming) the Ring of Dignity | < worn on finger > (Humming) the Ring of Dignity | ||
< worn around neck > a blue-silver iron gorget | < worn around neck > a blue-silver iron gorget | ||
< worn around neck > a blue-silver iron gorget | < worn around neck > a blue-silver iron gorget | ||
< worn on body > (Magical) the Livery of the Sea King | < worn on body > (Magical) the Livery of the Sea King | ||
< worn on head > (Glowing) (Humming) Memories of Spring | < worn on head > (Glowing) (Humming) Memories of Spring | ||
< worn on legs > (Red Aura) (Magical) leggings of dark dragonscale | < worn on legs > (Red Aura) (Magical) leggings of dark dragonscale | ||
< worn on feet > Silver boots of Camelot | < worn on feet > Silver boots of Camelot | ||
< worn on hands > (Glowing) (Humming) dragon's gloves | < worn on hands > (Glowing) (Humming) dragon's gloves | ||
< worn on arms > iron bracers | < worn on arms > iron bracers | ||
< worn as shield > a bulette carapace shield | < worn as shield > a bulette carapace shield | ||
< worn about body > a mind flayer's robe | < worn about body > a mind flayer's robe | ||
< worn about waist > a red satin sash | < worn about waist > a red satin sash | ||
< worn around wrist > a gold chain bracelet | < worn around wrist > a gold chain bracelet | ||
< worn around wrist > a mind flayer tentacle | < worn around wrist > a mind flayer tentacle | ||
< wielded > Neptune's Trident | < wielded > Neptune's Trident | ||
< held > (Glowing) the golden staff of the Hunter | < held > (Glowing) the golden staff of the Hunter | ||
< worn on ears > (Magical) a sailor's earring | < worn on ears > (Magical) a sailor's earring | ||
< worn on eyes > (Magical) (Glowing) an oracle of prescience | < worn on eyes > (Magical) (Glowing) an oracle of prescience | ||
{926/926h|491/491mp|540/540mv|5486321xp|day|387plyrs}******** START OF MISSING EQ LIST ******** | {926/926h|491/491mp|540/540mv|5486321xp|day|387plyrs}******** START OF MISSING EQ LIST ******** | ||
DUAL-WIELDED IS MISSING | DUAL-WIELDED IS MISSING | ||
******** DONE WITH MISSING LIST ******** | ******** DONE WITH MISSING LIST ******** | ||
NOTES: The text "{926/926h|491/491mp|540/540mv|5486321xp|day|387plyrs}" is an example of one of my prompts, and the prompt trigger that went off because that line came across the mud called the "eqmissing" alias because I have the "#if (@eqlist = 1) {eqmissing}" command coded in it's command-list. Also, "DUAL-WIELDED IS MISSING" is the above missing list because the equipment list doesn't include something is dual-wielded. | NOTES: The text "{926/926h|491/491mp|540/540mv|5486321xp|day|387plyrs}" is an example of one of my prompts, and the prompt trigger that went off because that line came across the mud called the "eqmissing" alias because I have the "#if (@eqlist = 1) {eqmissing}" command coded in it's command-list. Also, "DUAL-WIELDED IS MISSING" is the above missing list because the equipment list doesn't include something is dual-wielded. | ||
A final customization: If you do not wish to set up a prompt trigger, or do not have one, then you can simply type the "eqmissing" alias command yourself after inspecting yours or someone else's equipment list. The results will be the same. However, it is better to make this trigger automatic if possible, and a prompt trigger is a handy way to do this. | A final customization: If you do not wish to set up a prompt trigger, or do not have one, then you can simply type the "eqmissing" alias command yourself after inspecting yours or someone else's equipment list. The results will be the same. However, it is better to make this trigger automatic if possible, and a prompt trigger is a handy way to do this. | ||
====SCRIPT==== | |||
#TRIGGER {^<*} {#if (%pos(used as light,%trigger) > 0) {#var eqli 1};#if (%pos(worn on finger,%trigger) > 0) {#math eqfi @eqfi+1};#if (%pos(worn around neck,%trigger) > 0) {#math eqn @eqn+1};#if (%pos(worn on body,%trigger) > 0) | |||
{#var eqb 1};#if (%pos(worn on head,%trigger) > 0) {#var eqhe 1};#if (%pos(worn on legs,%trigger) > 0) {#var eqle 1};#if (%pos(worn on feet,%trigger) > 0) {#var eqfe 1};#if (%pos(worn on hands,%trigger) > 0) {#var eqha 1};#if | |||
(%pos(worn on arms,%trigger) > 0) {#var eqa 1};#if (%pos(worn as shield,%trigger) > 0) {#var eqs 1};#if (%pos(worn about body,%trigger) > 0) {#var eqab 1};#if (%pos(worn about waist,%trigger) > 0) {#var eqawa 1};#if (%pos(worn | |||
around wrist,%trigger) > 0) {#math eqawr @eqawr+1};#if (%pos(wielded,%trigger) > 0) {#var eqw 1};#if (%pos(dual wielded,%trigger) > 0) {#var eqdw 1};#if (%pos(held,%trigger) > 0) {#var eqh 1};#if (%pos(worn on ears,%trigger) > 0) | |||
{#var eqea 1};#if (%pos(worn on eyes,%trigger) > 0) {#var eqey 1};#var eqlist 1} {eq} | |||
#ALIAS eqmissing {#var eqlist 0;#show ******** START OF MISSING EQ LIST ********;#if (@eqli = 0) {#show LIGHT IS MISSING};#if (@eqfi < 2) {#show FINGER IS MISSING};#if (@eqn < 2) {#show NECK IS MISSING};#if (@eqb = 0) {#show BODY | |||
IS MISSING};#if (@eqhe = 0) {#show HEAD IS MISSING};#if (@eqle = 0) {#show LEGS IS MISSING};#if (@eqfe = 0) {#show FEET IS MISSING};#if (@eqha = 0) {#show HANDS IS MISSING};#if (@eqa = 0) {#show ARMS IS MISSING};#if (@eqs = 0) | |||
{#show SHIELD IS MISSING};#if (@eqab = 0) {#show ABOUT BODY IS MISSING};#if (@eqawa = 0) {#show ABOUT WAIST IS MISSING};#if (@eqawr < 2) {#show AROUND WRIST IS MISSING};#if (@eqw = 0) {#show WIELDED IS MISSING};#if (@eqdw = 0) | |||
{#show DUAL-WIELDED IS MISSING};#if (@eqh = 0) {#show HELD IS MISSING};#if (@eqea = 0) {#show EARS IS MISSING};#if (@eqey = 0) {#show EYES IS MISSING};#show ******** DONE WITH MISSING LIST ********;#var eqli 0;#var eqfi 0;#var eqn | |||
0;#var eqb 0;#var eqhe 0;#var eqle 0;#var eqfe 0;#var eqha 0;#var eqa 0;#var eqs 0;#var eqab 0;#var eqawa 0;#var eqawr 0;#var eqw 0;#var eqdw 0;#var eqh 0;#var eqea 0;#var eqey 0;#noop set all equipment slot variables to zero} | |||
{eq} | |||
(Add this part to your prompt trigger:) | |||
#if (@eqlist = 1) {eqmissing} | |||
Revision as of 04:29, 6 July 2023
Sample Triggers
These "Trigger Sets" either contain single triggers, multiple triggers, triggers and supporting aliases, or any combination thereof. Click on each link to open the window for that sample trigger set. Viewable and downloadable code for each is provided to make it as easy as possible for you to import them.
AUTOPRACTICE SKILLS & SPELLS TRIGGER/ALIAS SET
Getting a character to autopractice skills and/or spells is relatively easy. It only requires one trigger and one alias. The trigger functions to determine when to call the alias, and the alias parses a list of items requiring practice and sends one to the mud. Of course, you have to customize the alias with the skills and/or spells you want to practice. Also note that this particular example is designed to cause a character to autopractice skills and/or spells when fighting. If you simply wish to automate practicing non-fighting skills then add the alias "autoprac" to your ticktimer alias (see the ticktimer section for more details) to cause the autoprac alias to fire every time your ticktimer expires.
Here is the trigger of the autopractice trigger/alias set:
#TRIGGER {^Your} {autoprac} {autop}
This trigger will fire off of the pattern of "^Your", when it fires it calls the autoprac alias, and it is associated with the class name of "autop". So why trigger off of any line that begins with "Your"? Well, when you are fighting (at least on Realms of Despair), whenever you take a swing at a mob the line you see starts with "Your"... For example : "Your kick misses the carrion crawler" or "Your blast brushes Brunhilde the Valkyrie". In this way, fighting styles can be adepted at the quickest speed possible, since styles only go up when you switch between them alot and do damamge to a mob inbetween switching. Casting spells in autopractice when fighting is not generally recommended, because you run out of mana too fast at low levels. However, I have included one spell in the example of the autoprac alias just in case you wanted to use it for that, or wanted to put it in your ticktimer and turn off the trigger to autopractice non-fighting skills and spells.
Here is the alias "autoprac":
#ALIAS autoprac {#var praclist {"kick style-aggressive style-standard cast-'black-hand'"};#var praclistlen %numwords(@praclist);#if (@pracnum > @praclistlen) {#var pracnum 1};#if (@pracnum < 1) {#var pracnum 1};#var pracitem
%word(@biglist,@pracnum);#var pracitem %replace(@pracitem,"-"," ");@pracitem;#math pracnum @pracnum+1} {autop}
This alias consists of 8 lines of commands. Here they are, one by one:
LINE #1 - #var praclist {"kick style-aggressive style-standard cast-'black-hand'"}
--- This sets up the variable @praclist with a list of things to practice. In this example, the first time the alias is called it will enter the "kick" command. The second time will get the "style aggressive" command. The third will get the "style standard" command. The fourth will get the "cast 'black hand'" command. Notice how the commands have dashes in them, but are separated by spaces? This is the format you must use if you want to add more commands or replace the ones here. Any mud command can be placed in this list, provided it has a space before it and has dashes in it instead of the usual spaces. The reason for this will be evident in LINE #2, LINE #5, and LINE #6.
LINE #2 - #var praclistlen %numwords(@praclist)
--- This line looks at how many "space delimited words" are in @praclist and sets the variable @praclistlen to the number of "words" it found. Since there are spaces between the commands set in LINE #1, the @praclistlen would be set to the number "4" for the above example. Without spaces between them, the %numwords function would fail to count the correct number of words.
LINE #3 - #if (@pracnum > @praclistlen) {#var pracnum 1}
--- This line checks the value of @pracnum against the value of @praclistlen, and if @pracnum larger than @praclistlen then @pracnum is set to the value of "1". The number in @pracnum will be used to select which command is pulled from the list and sent to the MUD. If the @pracnum number is higher than the number of available commands, then it is reset to 1 so that there aren't any errors, and to start the practice cycle over again with the first command.
LINE #4 - #if (@pracnum < 1) {#var pracnum 1}
--- This does a simple check to see if @pracnum is smaller than the value "1". If it is, then it is out of range and is set to 1 to avoid any errors. Most often, this is used when the alias is executed for the first time, and keeps it from crashing zmud with invalid values.
LINE #5 - #var pracitem %word(@praclist,@pracnum)
--- This line sets the variable @pracitem to a word from @praclist, indexed by @pracnum. So if @pracnum has a value of 1, this line would set @pracitem to contain "kick", the first word in the list. If @pracnum has a value of 2, this line would set @pracitem to contain "style-aggressive", the second word in the list. It simply pulls the word from the list, indexed by the number in @pracnum, and puts that word in @pracitem. For the %word function to work as coded, the "words" in @praclist would have to be separated by spaces. This is another reason that the commands have dashes in them instead of spaces.
LINE #6 - #var pracitem %replace(@pracitem,"-"," ")
--- This line takes the command in @pracitem and changes every dash to a space. This "fixes" the command so that it can be sent to the mud without dashes in it. The dashes were needed to keep the commands separate in the list, and now that the command has been isolated, it's dashes are replaced with spaces. This would take the command "cast-'black-hand'" an change it to "cast 'black hand'", as it should be before sending to the mud. This may seem like an extra step, but it actually makes the alias easier to customize and less confusing.
LINE #7 - @pracitem
--- This command is just a variable name, on a line by itself. When zMud sees this, it expands (or "replaces") this line with the contents of @pracitem and sends it to the mud. In other words, this takes the command pulled out of the list and sends it to the mud. If the command was "kick" then this line would send "kick" to the mud just as though you had typed kick and hit enter on your command line.
LINE #8 - #math pracnum @pracnum+1
--- This line takes the number in @pracnum, adds 1 to it, and saves it back to @pracnum. In other words, it increments @pracnum by 1. If @pracnum had "1" in it, then it has "2" in it when this line is done. In this way, this autoprac alias "cycles through" all of the words in the list, one by one, before it starts over again.
SCRIPT
#TRIGGER {^Your} {autoprac} {autop}
#ALIAS autoprac {#var praclist {"kick style-aggressive style-standard cast-'black-hand'"};#var praclistlen %numwords(@praclist);#if (@pracnum > @praclistlen) {#var pracnum 1};#if (@pracnum < 1) {#var pracnum 1};#var pracitem
%word(@praclist,@pracnum);#var pracitem %replace(@pracitem,"-"," ");@pracitem;#math pracnum @pracnum+1} {autop}
COLOR SPECIFIC TEXT LINES THE WAY YOU WANT THEM TRIGGER SET
Making any line you want display as any color you want is easily done in zMud. While the color selections are somewhat limited to 10 basic colors, the options exist to change both the text color and the background color for that line. It is also a simple thing to make colors brighter or bolder. Here, then is a list of some simple triggers you can use to color the text you see from various chat channels so that they stand out from the rest:
#TRIGGER {bright} {#cw green} {bright}
--- NOTE: the #CW command colors only one word... so this example will color the word "bright" the color green whenever it comes across your window. This make make for some strange effects, when the word "brighten" comes across and only the letters "bright" are in green!
#TRIGGER {^(%w) chats} {#color 14} {chatcolor}
#TRIGGER {^(%w) asks} {#color 12} {askcolor}
#TRIGGER {^(%w) guildtalks} {#color 13} {guildtalkscolor}
#TRIGGER {^(%w) ordertalks} {#color 13} {ordertalkscolor}
#TRIGGER {^(%w) racetalks} {#color 7} {racetalkscolor}
#TRIGGER {^(%w) newbiechats} {#color 159} {newbiechatcolor}
#TRIGGER {^(%w) counciltalks} {#color 13;#var lasttrig %trigger;#mes @lasttrig} {counciltalkscolor}
NOTE : The last trigger has an extra feature in it. The #MES command takes the text you give it, and creates a popup message box that shows the text for about 10 seconds or so. This can be handy if you are waiting for a tell from someone, or always want to make sure you see a specific channel or text. If overused, the #MES command can get spammy and annoying because it does a focus switch and your cursor leaves your command line... so if you were typing a command it would be cut off and your keystrokes would be lost. But, it is handy to get your attention when your busy with other things.
For your convenience I have included below the text from the help file on how the color command can be programmed.
COLOR Syntax: #CO attribute [pattern] Related: #HIGHLIGHT
Example
If the pattern parameter is left out, this command changes the color of the last line received from the MUD. The color attribute can be a numeric attribute (compatible with the attribute values used by the text modes of DOS) or can be a combination of string values listed below, separated by commas. If the pattern is included, a trigger is created to color any line matching the given pattern with the specified color. Color values: black---0 blue----1 green---2 cyan----3 red-----4 magenta-5 brown---6 grey----7 yellow--14 white---15 bold----128 to make a color brighter, add 8 to the base value. For example, 9 is bright blue. To change the background color, rather than the foreground, multiply the base value by 16. For example, to get a red background, use 4*16 or 64. To make the foreground font bold, add 128 to the value.
Thus, a bold white on a blue background would be 128 + 1*16 + 15 = 159.
SCRIPT
#TRIGGER {bright} {#cw green} {bright}
#TRIGGER {^(%w) chats} {#color 14} {chatcolor}
#TRIGGER {^(%w) asks} {#color 12} {askcolor}
#TRIGGER {^(%w) guildtalks} {#color 13} {guildtalkscolor}
#TRIGGER {^(%w) ordertalks} {#color 13} {ordertalkscolor}
#TRIGGER {^(%w) racetalks} {#color 7} {racetalkscolor}
#TRIGGER {^(%w) newbiechats} {#color 159} {newbiechatcolor}
#TRIGGER {^(%w) counciltalks} {#color 13;#var lasttrig %trigger;#mes @lasttrig} {counciltalkscolor}
Equipment Look Set
This trigger/alias set reads an equipment look-set that comes across your screen (i.e. what someone is wearing in the game) and then reports which item slots are missing. It is implemented in one alias and two triggers. The second trigger is not defined here because it is a prompt trigger and that must be defined by you. However, the command that you need to add to your prompt trigger is included. And in case you were wondering, a prompt trigger is a trigger that goes off every time your prompt comes across the screen.
The main trigger of this set, shown below, triggers off of lines that start with the character "<", so that it can catch every equipment line that comes across. It searches that line for an equipment position identifier, such as "used as light", and sets a variable to 1 if it finds that line. That's all it does is sets variables to 1 when it finds the corresponding line! It also sets the @eqlist variable to 1, to signify that the trigger has gone off and collected equipment data. The alias takes it from there...
#TRIGGER {^<*} {#if (%pos(used as light,%trigger) > 0) {#var eqli 1};#if (%pos(worn on finger,%trigger) > 0) {#math eqfi @eqfi+1};#if (%pos(worn around neck,%trigger) > 0) {#math eqn @eqn+1};#if (%pos(worn on body,%trigger) > 0)
{#var eqb 1};#if (%pos(worn on head,%trigger) > 0) {#var eqhe 1};#if (%pos(worn on legs,%trigger) > 0) {#var eqle 1};#if (%pos(worn on feet,%trigger) > 0) {#var eqfe 1};#if (%pos(worn on hands,%trigger) > 0) {#var eqha 1};#if
(%pos(worn on arms,%trigger) > 0) {#var eqa 1};#if (%pos(worn as shield,%trigger) > 0) {#var eqs 1};#if (%pos(worn about body,%trigger) > 0) {#var eqab 1};#if (%pos(worn about waist,%trigger) > 0) {#var eqawa 1};#if (%pos(worn
around wrist,%trigger) > 0) {#math eqawr @eqawr+1};#if (%pos(wielded,%trigger) > 0) {#var eqw 1};#if (%pos(dual wielded,%trigger) > 0) {#var eqdw 1};#if (%pos(held,%trigger) > 0) {#var eqh 1};#if (%pos(worn on ears,%trigger) > 0)
{#var eqea 1};#if (%pos(worn on eyes,%trigger) > 0) {#var eqey 1};#var eqlist 1} {eq}
The main alias, "eqmissing", reads the variables set by the trigger and reports for each one that is set to 0, meaning that it was not found. It also sets @eqlist to 0, to signify that the eqmissing alias has fired and the report was generated, and clears all equipment slot variables to 0 again.
#ALIAS eqmissing {#var eqlist 0;#show ******** START OF MISSING EQ LIST ********;#if (@eqli = 0) {#show LIGHT IS MISSING};#if (@eqfi < 2) {#show FINGER IS MISSING};#if (@eqn < 2) {#show NECK IS MISSING};#if (@eqb = 0) {#show BODY
IS MISSING};#if (@eqhe = 0) {#show HEAD IS MISSING};#if (@eqle = 0) {#show LEGS IS MISSING};#if (@eqfe = 0) {#show FEET IS MISSING};#if (@eqha = 0) {#show HANDS IS MISSING};#if (@eqa = 0) {#show ARMS IS MISSING};#if (@eqs = 0)
{#show SHIELD IS MISSING};#if (@eqab = 0) {#show ABOUT BODY IS MISSING};#if (@eqawa = 0) {#show ABOUT WAIST IS MISSING};#if (@eqawr < 2) {#show AROUND WRIST IS MISSING};#if (@eqw = 0) {#show WIELDED IS MISSING};#if (@eqdw = 0)
{#show DUAL-WIELDED IS MISSING};#if (@eqh = 0) {#show HELD IS MISSING};#if (@eqea = 0) {#show EARS IS MISSING};#if (@eqey = 0) {#show EYES IS MISSING};#show ******** DONE WITH MISSING LIST ********;#var eqli 0;#var eqfi 0;#var eqn
0;#var eqb 0;#var eqhe 0;#var eqle 0;#var eqfe 0;#var eqha 0;#var eqa 0;#var eqs 0;#var eqab 0;#var eqawa 0;#var eqawr 0;#var eqw 0;#var eqdw 0;#var eqh 0;#var eqea 0;#var eqey 0;#noop set all equipment slot variables to zero}
{eq}
The third part requires that you add the following command to your prompt trigger. This command line checks the @eqlist variable and if it is set to 1 (meaning that the eqmissing trigger has fired and collected missing line data) then it calls the eqmissing alias to report on the findings. Here is the command to add:
#if (@eqlist = 1) {eqmissing}
Here is a sample of a run of this trigger/alias set:
eq You are using: < used as light > the sigil of A'enaar < worn on finger > (Humming) the Ring of Dignity < worn on finger > (Humming) the Ring of Dignity < worn around neck > a blue-silver iron gorget < worn around neck > a blue-silver iron gorget < worn on body > (Magical) the Livery of the Sea King < worn on head > (Glowing) (Humming) Memories of Spring < worn on legs > (Red Aura) (Magical) leggings of dark dragonscale < worn on feet > Silver boots of Camelot < worn on hands > (Glowing) (Humming) dragon's gloves < worn on arms > iron bracers < worn as shield > a bulette carapace shield < worn about body > a mind flayer's robe < worn about waist > a red satin sash < worn around wrist > a gold chain bracelet < worn around wrist > a mind flayer tentacle < wielded > Neptune's Trident < held > (Glowing) the golden staff of the Hunter < worn on ears > (Magical) a sailor's earring < worn on eyes > (Magical) (Glowing) an oracle of prescience
{926/926h|491/491mp|540/540mv|5486321xp|day|387plyrs}******** START OF MISSING EQ LIST ********
DUAL-WIELDED IS MISSING
******** DONE WITH MISSING LIST ********
NOTES: The text "{926/926h|491/491mp|540/540mv|5486321xp|day|387plyrs}" is an example of one of my prompts, and the prompt trigger that went off because that line came across the mud called the "eqmissing" alias because I have the "#if (@eqlist = 1) {eqmissing}" command coded in it's command-list. Also, "DUAL-WIELDED IS MISSING" is the above missing list because the equipment list doesn't include something is dual-wielded.
A final customization: If you do not wish to set up a prompt trigger, or do not have one, then you can simply type the "eqmissing" alias command yourself after inspecting yours or someone else's equipment list. The results will be the same. However, it is better to make this trigger automatic if possible, and a prompt trigger is a handy way to do this.
SCRIPT
#TRIGGER {^<*} {#if (%pos(used as light,%trigger) > 0) {#var eqli 1};#if (%pos(worn on finger,%trigger) > 0) {#math eqfi @eqfi+1};#if (%pos(worn around neck,%trigger) > 0) {#math eqn @eqn+1};#if (%pos(worn on body,%trigger) > 0)
{#var eqb 1};#if (%pos(worn on head,%trigger) > 0) {#var eqhe 1};#if (%pos(worn on legs,%trigger) > 0) {#var eqle 1};#if (%pos(worn on feet,%trigger) > 0) {#var eqfe 1};#if (%pos(worn on hands,%trigger) > 0) {#var eqha 1};#if
(%pos(worn on arms,%trigger) > 0) {#var eqa 1};#if (%pos(worn as shield,%trigger) > 0) {#var eqs 1};#if (%pos(worn about body,%trigger) > 0) {#var eqab 1};#if (%pos(worn about waist,%trigger) > 0) {#var eqawa 1};#if (%pos(worn
around wrist,%trigger) > 0) {#math eqawr @eqawr+1};#if (%pos(wielded,%trigger) > 0) {#var eqw 1};#if (%pos(dual wielded,%trigger) > 0) {#var eqdw 1};#if (%pos(held,%trigger) > 0) {#var eqh 1};#if (%pos(worn on ears,%trigger) > 0)
{#var eqea 1};#if (%pos(worn on eyes,%trigger) > 0) {#var eqey 1};#var eqlist 1} {eq}
#ALIAS eqmissing {#var eqlist 0;#show ******** START OF MISSING EQ LIST ********;#if (@eqli = 0) {#show LIGHT IS MISSING};#if (@eqfi < 2) {#show FINGER IS MISSING};#if (@eqn < 2) {#show NECK IS MISSING};#if (@eqb = 0) {#show BODY
IS MISSING};#if (@eqhe = 0) {#show HEAD IS MISSING};#if (@eqle = 0) {#show LEGS IS MISSING};#if (@eqfe = 0) {#show FEET IS MISSING};#if (@eqha = 0) {#show HANDS IS MISSING};#if (@eqa = 0) {#show ARMS IS MISSING};#if (@eqs = 0)
{#show SHIELD IS MISSING};#if (@eqab = 0) {#show ABOUT BODY IS MISSING};#if (@eqawa = 0) {#show ABOUT WAIST IS MISSING};#if (@eqawr < 2) {#show AROUND WRIST IS MISSING};#if (@eqw = 0) {#show WIELDED IS MISSING};#if (@eqdw = 0)
{#show DUAL-WIELDED IS MISSING};#if (@eqh = 0) {#show HELD IS MISSING};#if (@eqea = 0) {#show EARS IS MISSING};#if (@eqey = 0) {#show EYES IS MISSING};#show ******** DONE WITH MISSING LIST ********;#var eqli 0;#var eqfi 0;#var eqn
0;#var eqb 0;#var eqhe 0;#var eqle 0;#var eqfe 0;#var eqha 0;#var eqa 0;#var eqs 0;#var eqab 0;#var eqawa 0;#var eqawr 0;#var eqw 0;#var eqdw 0;#var eqh 0;#var eqea 0;#var eqey 0;#noop set all equipment slot variables to zero}
{eq}
(Add this part to your prompt trigger:)
#if (@eqlist = 1) {eqmissing}