Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
[_SnArF_]
Beginner


Joined: 16 Nov 2000
Posts: 20
Location: USA

PostPosted: 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.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: 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
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Apr 13, 2002 11:24 pm   
 
How about
#TR {You yell ~'Help~!*Snarf} {c word}

LightBulb
Vague questions get vague answers
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net