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
dane
Beginner


Joined: 27 Apr 2005
Posts: 18

PostPosted: Sun Apr 27, 2008 11:14 pm   

Trigger question.
 
Here's the problem.

I have a walking script which tracks from monster to monster.

### You sense a trail south from here...
Is the message I see. And easily enough, I just pull out the direction and send it to the mud.

The problem rises when the imms like to mess with it and change it to.
### You sense a trail quit from here...

It makes me quit obviously.

The question is how can I change it so that I only take directions.

Can I do something like ### You sense a trail {west,north,south,east,down,up} from here...

I can't quite make it work for me.

Thanks
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Sun Apr 27, 2008 11:21 pm   
 
Code:


#var GoodDirs {west|north|south|east|down|up}
#trigger {~#~#~# You sense a trail (%w) from here~.~.~.} {#if (%ismember(%1,@GoodDirs)) {%1} {#say Imms are messing, pay attention!}}



Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
dane
Beginner


Joined: 27 Apr 2005
Posts: 18

PostPosted: Sun Apr 27, 2008 11:22 pm   
 
Thanks!
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Apr 28, 2008 2:07 am   
 
You could try the %t wildcard, but I haven't bothered to get familiar with exactly how it works. I've thought to use it several times only to get frustrated as to why it wasn't working correctly. According to the helpfile, it's supposed to work on directions but it doesn't clarify if it's the entire word, the short version, or just the #DIRECTION version (which is often the short version anyways, but would also match reverse directions).
_________________
EDIT: I didn't like my old signature
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