Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Gwaethiel
Beginner


Joined: 23 Feb 2011
Posts: 13

PostPosted: Fri Dec 27, 2013 3:19 pm   

#repeat question
 
Hello.

So, i thought that it will be easy, but it is not for me.

#alias {drz %d}
{
#repeat %d {action1;#wa 18000}
#repeat %d {action2;#wa 18000}
#repeat %d {action3;#wa 18000}
#repeat %d {action4;#wa 18000}
}

That was my idea, but it seemed wrong. So, i want from my script to repeat those actions as many times, as i want. So, when i type drz 3, it will repeat 3 times action 1 with 18s wait before each repeat, then 3 times action 2 etc. How can i fix my script to do it?
Reply with quote
shalimar
GURU


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

PostPosted: Wed Jan 08, 2014 12:10 am   
 
%d is used in pattern matching and has no meaning outside of it

#ALIAS drz {
$loop=%if(%params, %params, 1)
#LOOP $loop {action1;#WAIT 18000}
etc
}
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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