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
sepe
Novice


Joined: 09 Feb 2002
Posts: 39
Location: USA

PostPosted: Sat Apr 15, 2006 8:48 pm   

Many trigger or just one?
 
OK trying to trigger off exit directions. Got it set up so that every location I enter I do a command to see all the exits. I get this from the Mud...


You are able to see by the light of the charm. You notice exits northeast, southeast, west, and up.

(This is all on one line)

OK here is the question or rather problem, the word "and" near the end. unless there is only one exit, and is always just before the last exit listed. Since this changes the pattern every time do I have to make 10 different triggers for each possibility (10 total directions) or is there a way to do this with one?

For the above example I'm using...

You are able to see by the light of the charm. You notice exits (%w)~, (%w)~, (%w)~, and (%w)
_________________
Dazed glazed and having fun
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Sat Apr 15, 2006 9:17 pm   
 
#TR {You notice exits (*).} {exits=%replace("%1", "and ", "");exits=%replace( @exits, ", ", "|")}

makes a variable array @exits containing all current exits
_________________
Discord: Shalimarwildcat
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