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
poploco
Beginner


Joined: 14 Oct 2003
Posts: 18
Location: Canada

PostPosted: Thu Jan 15, 2004 7:03 am   

shuffling/random alias-script
 
Ok well here's the thing. I'm trying to create a shuffling alias that will take all "meat" items (renamed items) from a bag and then put them back in the bag "dream" but in a random order/shuffling.

the alias name I made is mixdream. I'd then enter mixdream 20 (if I have 20 dream cards to mix up) And the script would enter all "meat" item in the bag "dream" but in random order.... using 20 as the variable entered (into dreams_total).

This script I made is obviously flawed... but i'm not all that good at this... any help is appreciated.

Thanks,
Pop.



#var dreams_total %1
#IF (dream_total=0){gt dream mixing complete} {
#var put_away %ramdom(@dreams_total)
put (@put_away).meat dream
#add @dreams_total -1
}
Reply with quote
Seyne
Newbie


Joined: 26 Aug 2001
Posts: 3

PostPosted: Thu Jan 15, 2004 7:22 am   
 
OK, I'm not good at this really, either. But I DO have a couple of things to point out to fix, if that's a cut and paste directly from your script.

You define the variable named: dreams_total
Your #IF statement needs the @ symbol, and use the same syntax for the variable, otherwise it won't recognize it (dream_total, or dreamS_total)
%random is misspelled
And finally, the #add doesn't need the @ sign.

#var dreams_total %1
#IF (@dreams_total=0){gt dream mixing complete} {
#var put_away %random(@dreams_total)
put (@put_away).meat dream
#add dreams_total -1
}

See how that does ya, and if it still doesn't work, you need a better expert.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Jan 15, 2004 8:17 pm   
 
#AL mixdream {get all.meat dream;#LOOP %1,1 {put %random( 1, %i).meat dream};gt dream mixing complete}
Reply with quote
poploco
Beginner


Joined: 14 Oct 2003
Posts: 18
Location: Canada

PostPosted: Tue May 07, 2013 10:44 pm   
 
It did work. Sorry for the long overdue reply! HAHA!
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