|
Jezuit Beginner
Joined: 02 Nov 2002 Posts: 27 Location: USA
|
Posted: Tue Feb 03, 2004 5:37 am
Matching Text from a Trigger |
I can usually take %1 from a trigger and test to see if it matches, but for some reason it's simply not letting me in this case:
Vial107790%s({empty|an elixir of health})%s(%d)%s(%d)
But here's the problem - When I try to match the "empty" or "an elixir of health" with %1, it simply doesn't match. Here's the pattern:
Code: |
#IF (%1 = "empty") {
#ADDITEM vhealthempty {107790}
#ECHO {%1 - Empty?}
#DELITEM vhealth {107790}
} {
#ADDITEM vhealth {107790}
#ECHO {%1 - Full?}
#DELITEM vhealthempty {107790}
} |
The reason I have the echo is to check to see what ZMud perceives %1 as. Yet, if the vial is empty, it will ECHO empty, yet it doesn't recognize that it's empty, if that makes any sense. It will go through the if statement as if it does not say empty, yet it repeats to me, in an echo, that it IS empty.
Help? |
|
|
|
user0101 Apprentice
Joined: 01 Aug 2003 Posts: 100 Location: USA
|
Posted: Tue Feb 03, 2004 6:17 am |
#IF ((%1) = "empty") {
#ADDITEM vhealthempty {107790}
#ECHO {%1 - Empty?}
#DELITEM vhealth {107790}
} {
#ADDITEM vhealth {107790}
#ECHO {%1 - Full?}
#DELITEM vhealthempty {107790}
} |
|
|
|
Jezuit Beginner
Joined: 02 Nov 2002 Posts: 27 Location: USA
|
Posted: Tue Feb 03, 2004 6:41 am |
Thanks for that, who'd have thought one set of parens can make an entire script go FUBAR. I appreciate it!
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|