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


Joined: 04 May 2005
Posts: 4

PostPosted: Sun May 08, 2005 9:55 pm   

About splitting a random string...
 
Well i was wondering how could i split a random string in a trigger...
For instance...
The mud sends to me
Go! { se cb sd }

And between the "{}'s" there is from 1 to 5 comands
Which are
se, cb, sd, ca

There is a way that the trigger gets the string and split it in 1 to 5 comands for instance in the following example
Go! { se cb sd }
would send
%1 @target
%2 @target
%3 @target

But im having problem in getting it from 1 to 5 in the same trigger and splitting in separeted commands each line...
Thx in advance =]
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sun May 08, 2005 11:01 pm   
 
try:


#TR {Go! ~{(*)~}} {#FORALL {%replace(%trim(%1), " ", "|")} {%i @target}}
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
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