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


Joined: 10 Dec 2001
Posts: 7
Location: USA

PostPosted: Tue Dec 11, 2001 5:46 pm   

trigger help repeat
 
Sorry to be a bother, but can someone help me with the trigger.

I need to make something to randomly input commands in groups of 10. and also I need it not tto repeat the groups. the commands are as follows jab,round,side,shin,elbow,knee,headbutt,sweep I would appreciate any help this has me throughly stumped. Thank you in advance
Reply with quote
iljhar
GURU


Joined: 10 Oct 2000
Posts: 1116
Location: USA

PostPosted: Tue Dec 11, 2001 10:50 pm   
 
Okay, so you want an alias/trigger that outputs 10 random commands and once it's done that, never to see that same set of commands again? Is that what you mean by not repeating the groups?

If so, you can try something like this:

#var done ""
#var actions {jab|round|side|shin|elbow|knee|headbutt|sweep}


#alias dothis {#var found 0;#while (!@found) {#var sList %item(@actions, %random(1,8));#9 {#var sList %concat(@sList, ";", %item(@actions, %random(1,8)))};#if (!%ismember(@sList, @done)) {#var found 1;#additem done @sList}};#exec @sList}


Haven't tested it, but the theory behind it looks good ;) Keep in mind that the list will get long and it will take longer and longer to go through this alias. You may not even want to go this route, but at least it's a start.

Iljhar
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