 |
poploco Beginner
Joined: 14 Oct 2003 Posts: 18 Location: Canada
|
Posted: 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
} |
|
|
 |
Seyne Newbie
Joined: 26 Aug 2001 Posts: 3
|
Posted: 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. |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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}
|
|
|
 |
poploco Beginner
Joined: 14 Oct 2003 Posts: 18 Location: Canada
|
Posted: Tue May 07, 2013 10:44 pm |
It did work. Sorry for the long overdue reply! HAHA!
|
|
|
 |
|
|