|
christaylor Newbie
Joined: 29 Dec 2004 Posts: 3
|
Posted: 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. |
|
|
|
Erasmus Wanderer
Joined: 04 Aug 2004 Posts: 82 Location: Philadelphia
|
Posted: 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 |
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: 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. |
|
|
|
|
|
|
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
|
|