|
[_SnArF_] Beginner
Joined: 16 Nov 2000 Posts: 20 Location: USA
|
Posted: Sat Apr 13, 2002 6:20 am
Figuring out if a string is in a variable.. |
Ok, say I have this trigger:
You yell 'Help! (*)'
where * = a range of things, from 'Snarf is bashing me', 'I'm being attacked by Snarf', etc.
How can I find out if Snarf is in the * anywhere? I just want it to trigger if Snarf is in there somewhere, if not, go about your business else "c word" ... I would have searched, but I didn't have a clue what to search for.
---------------
We're going to eat all of your food and steal all of your beer. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Apr 13, 2002 6:24 am |
#TRIGGER {^You yell ~'Help! (*)~'} {#IF %pos("Snarf","%1") > 0) {c word;#ECHO Snarf is in there} {#NOOP Go about your business}}
Ton Diening |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Apr 13, 2002 11:24 pm |
How about
#TR {You yell ~'Help~!*Snarf} {c word}
LightBulb
Vague questions get vague answers |
|
|
|
|
|