|
jgstroll Newbie
Joined: 13 Feb 2021 Posts: 4
|
Posted: Sat Feb 13, 2021 10:14 pm
Color a word and not other words with that word in it... |
So how do I color the word Cat and not have it color the first three letters of Cathode too?
I am coloring names of guild characters and some are 3 and 4 letter names that pop up frequently in room descriptions, room names, and general conversation.
#CLASS {Assassins}
#ALIAS addassassin {#ADDITEM assassinlist}
#ALIAS delassassin {#DELITEM assassinlist}
#VAR assassinlist {Moop|Juohn|Tim|Star|Cat|Caterine|Bob}
#TRIGGER {{@assassinlist}} {#CW 57} "" {case}
#CLASS 0
Also the add and delete commands don't seem to work anymore. I think these were from Zmud. Should I be using something else in Cmud? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Sun Feb 14, 2021 7:57 pm |
Use the %q word boundary wildcard:
#TR {%q{@assassinList}%q} {#CW 57} "" {case} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
jgstroll Newbie
Joined: 13 Feb 2021 Posts: 4
|
Posted: Sun Feb 14, 2021 9:17 pm |
Thank you! That works perfectly now.
Any idea why the add\delete commands are not working? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Mon Feb 15, 2021 1:56 am |
You are essentially passing it nothing so it adds and removes nothing.
Implied concatenation doesn't always work.
#ALIAS addassassin {#ADDITEM assassinlist %params} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
jgstroll Newbie
Joined: 13 Feb 2021 Posts: 4
|
Posted: Mon Feb 15, 2021 2:00 am |
In zmud that alias would let me type
addassassin Billy
and it would add Billy to the assassinlist... |
|
Last edited by jgstroll on Mon Feb 15, 2021 2:05 am; edited 2 times in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Mon Feb 15, 2021 2:01 am |
Right, that is the implied concatenation I was talking about.
Add the %params and it will start working again. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
jgstroll Newbie
Joined: 13 Feb 2021 Posts: 4
|
Posted: Mon Feb 15, 2021 2:05 am |
Thank you! That works great
|
|
|
|
|
|