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
christaylor
Newbie


Joined: 29 Dec 2004
Posts: 3

PostPosted: Thu Dec 30, 2004 12:46 am   

Using a coma as a seporater
 
I am trying to make a triger that will extract the room directions and run to a room if a key string is not sent it will run back then to the next direction that was captured untel set string is sent

Barracks (n,ne,sw,w,nw).

The question is how do I make a triger to use the , as a delimiter.
Reply with quote
Erasmus
Wanderer


Joined: 04 Aug 2004
Posts: 82
Location: Philadelphia

PostPosted: Thu Dec 30, 2004 1:38 am   
 
The following will extract the directions from the sample text you provided and put them into a string list.

#TR {Barracks ~((*)~).} {#VARIABLE dirs %replace("%1",",","|")}
_________________
Erasmus
Reply with quote
Vorax
Apprentice


Joined: 29 Jun 2001
Posts: 198
Location: USA

PostPosted: Thu Dec 30, 2004 2:00 am   
 
#TRIGGER {~((*)~).$} {#VARIABLE directions %replace("%1", ",", "|")}
That will put all the directions found between the ( and ) in the room directions into a string list.
The variable @directions will contain the string "n|ne|sw|w|nw"
There's a number of ways you can use that string to do what you want.
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