|
Morgul_Wraith Newbie
Joined: 25 Dec 2001 Posts: 5 Location: Canada
|
Posted: Tue Dec 25, 2001 5:25 am
A problem with two characters that get in my way.. |
I tried to write a trigger, as follows...
#trigger {Your powerlevel increased by [%w].} {@PL += %1}
The major problem however, is that zMUD won't read it correctly... it won't read the [] or look for the number in between it... can you tell me how to fix this? |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Tue Dec 25, 2001 7:31 am |
You should also place the quote character in front of the ] too. You must enclose the %d in parentheses to capture the data. Also, zMUD doesn't support +=. Use the #ADD command instead.
#trigger {Your powerlevel increased by ~[(%d)~].} {#ADD PL %1}
Troubadour |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Dec 25, 2001 8:29 am |
You should familiarize yourself with the special characters that zmud uses. Those have to be quoted out as Troubador indicated.
Give a man a fish and he is fed for a day...
Teach a man to fish and he is fed for life... |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Dec 25, 2001 5:16 pm |
quote:
You should familiarize yourself with the special characters that zmud uses. Those have to be quoted out as Troubador indicated.
Give a man a fish and he is fed for a day...
Teach a man to fish and he is fed for life...
Technically, they only have to be quoted out when you are using them in their specialized roles. So long as you don't need to depend on variable pattern-matching (such as 'You get (*)'), you can simply turn on verbatim mode for the trigger.
Likewise, if you need to deal with such characters inside of a variable, you need only use %expand() and specify how much expansion you wish to have--with, I think, -3 indicating no expansion at all.
li'l shmoe of Dragon's Gate MUD |
|
|
|
Morgul_Wraith Newbie
Joined: 25 Dec 2001 Posts: 5 Location: Canada
|
Posted: Wed Dec 26, 2001 9:51 am |
Just to note, but the solution you gave me didn't work... the pattern test works, but when I receive the actual text from the mud, nothing at all happens...
I go by many names under the skies. I am known to some as Phobos, to others as simply Fear. To some I am Death, to others I am the Reaper. |
|
|
|
|
|