|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Sat Dec 22, 2007 8:35 pm
Wildcard matching |
Hello! I've been looking for the proper way to do this for awhile with no luck finding exactly what I want. I am trying to trigger button colors to change as defenses are stripped. Often the message goes more than one line and I do not need to trigger the whole phrase such as:
You caress the tattoo and immediately you feel a cloak of protection surround your body.
what I really car to see for the trigger is:
you feel a cloak of protection surround
So I tried:
(*)you feel a cloak of protection surround(*) as the trigger but this is probably about the worst way to trigger this especially with the (*) at the start as it probably needs to check every line recieved. Also I don't think the brackets are doing anything and don't even think it works but I used to get it to work in ZMud. Can I just trigger the text I want and will it pull it out of the middle of a line? Such as:
you feel a cloak of protection surround
or can I just trigger the first line like:
You caress the tattoo and immediately you feel a cloak
and not worry about wildcards or ending spaces etc at all? It seems CMud doesn't like the * and also doesn't like the quotes "" to define text. I realize I am pretty messed up with this but please help.
Thanks in advance |
|
|
|
Rolly Wanderer
Joined: 16 Oct 2006 Posts: 62
|
Posted: Sat Dec 22, 2007 8:52 pm |
One other thing to clarify, I already have a defense system triggrting these but do not want to add my commands to the existing triggers or copy them directly because I do not want to loose my added code stuff every time I update my defense system or need to reinstall or confuse my system with multiple exact trigges with different commands so I keep them in a different package and want to shorten them so they are different (not sure that helps though). These are generally defenses that allow a setup for sticking me with various afflictions but that I can live without for a while so I want to track them via button colors and put them up manually if needed by pushing the corresponding button. I realize it is not the best thing to have multiple triggers of the same text but there are not many of these. Just enough to catch the important defenses like Kola and fitness etc. since these defenses are commonly attacked with the intent to confuse them into not resetting.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat Dec 22, 2007 10:10 pm Re: Wildcard matching |
Rolly wrote: |
Can I just trigger the text I want and will it pull it out of the middle of a line? |
Yes.
#trig {omg} {#say boo}
#say omg
#say atomgasf
#say who is this crazy person? omg, I'm going to gag them.
The only thing this won't do is match the text if it's spread over more than one line by server-side word wrapping. That's why I recommend turning off server-side wrapping.
You also mention CMUD "not liking" the * wildcard - I certainly haven't seen anything this posted before. What do you mean?
You also ONLY need to put a wildcard in brackets if you intend to use what the wildcard matched later on in the script via the %1-%99 variables. If you don't care about what it matches, don't use the brackets. |
|
|
|
|
|