Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- listshuffle = [
- _tmplist = $arg1
- bloop i (listlen $arg1) [
- if (> $i 1) [
- _tmpindex = (- $i 1)
- _tmpitem = (at $_tmplist $_tmpindex)
- _rndindex = (rnd $i)
- _rnditem = (at $_tmplist $_rndindex)
- _tmplist = (listreplace $_tmplist $_rndindex $_tmpitem)
- _tmplist = (listreplace $_tmplist $_tmpindex $_rnditem)
- ]
- ]
- result $_tmplist
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement