zMUD colours

by Unknown

Back to Mechanic's Corner.

Unknown2006-03-05 20:42:05
I like to be organized, so one of my first acts in Lusternia was to organize my skill lists. If you've ever played Imperian, SKILLS and AB look really nice with the skill names highlighted, etc.

I did it myself with simple triggers like these:
CODE
#TRIGGER {Deathsight} {#cw bold,gold}
It works nicely... but with skills like 'Rift' in Planar, I now see every instance of the letters of 'Rift' in gold. For instance, Singing drifts in from outside, faintly muffled.

My question is, can I make it so that the only time 'Rift' is coloured is when it is completely by itself, with nothing before or after it? Or even further, only when I actually do AB PLANAR?

Thanks a ton,
Lynna
Asarnil2006-03-05 20:51:14
use %q before and after the word. This also works with stringlists (#tr {%q{@variable}%q} {#cw bold,gold} which is what I use for my enemy/ally/cityenemy lists.
Unknown2006-03-05 20:57:50
Thank you very much, worked like a charm!
Soll2006-03-05 21:16:17
The way Asarnil mentions, however, will also run off any sentence with the word 'rift' in.

An alternative:

#alias {AB} {#untrigger "skillchoiceopen";#untrigger "skillchoiceclose";#if (%1!=%null) {#var skillchecklist %1;#temp "skillchoiceopen" {^You have gained the following abilities in @skillchecklist~:$} {#t+ {Skillchoicecolour}};#temp "skillchoiceclose" {^See AB @skillchecklist ~ for more information on an ability.$} {#t- {Skillchoicecolour}};#send {AB %1}} {#send {AB}}}

Then, in the 'skillchoicecolour' folder, put all your colouring triggers with '^' before them. Ie: #trigger {^Survey} {#cw bold,gold} or #trigger {^Rift} {#cw bold,gold}
Unknown2006-03-06 01:55:10
That doesn't seem to work... I thought it might have been because:
CODE
#alias {AB} {#untrigger "skillchoiceopen";#untrigger "skillchoiceclose";#if (%1!=%null) {#var skillchecklist %1;#temp "skillchoiceopen" {^You have gained the following abilities in @skillchecklist~:$} {#t+ {Skillchoicecolour}};#temp "skillchoiceclose" {^See AB @skillchecklist ~ for more information on an ability.$} {#t- {Skillchoicecolour}};#send {AB %1}} {#send {AB}}}

needed to be:
CODE
#alias {AB} {#untrigger "skillchoiceopen";#untrigger "skillchoiceclose";#if (%1!=%null) {#var skillchecklist %1;#temp "skillchoiceopen" {^You have gained the following abilities in @skillchecklist~:$} {#t+ {Skillchoicecolour}};#temp "skillchoiceclose" {^AB @skillchecklist ~ for more information on an ability.$} {#t- {Skillchoicecolour}};#send {AB %1}} {#send {AB}}}

but when I changed it, I was still getting nothing. Basically, I type AB once, then AB COSMIC and nothing is coloured. I do see 'Trigger {skillchoiceclose} removed.', though.