Code: Select all
| playlist.mac - by IceIsFun
| Version 1.0 2004-04-23 3:00am EST
| Adapted from stwist.mac (SimpleTwist) by Raebis
| usage: /mac playlist <Songs>
|
| This example will twist the songs in gems 2, 3, 4, 5, 3, 4, and then 5...in that order:
| /mac stwist 2345345
|
#turbo
Sub Main(SongBlock)
/zapvars
/declare SongTimer timer
/declare Songs array
/declare CurSong global
/declare PrevSong global
/declare nSongs global
/declare EachSong local
/varset nSongs ${String[@SongBlock].Length}
/for EachSong 1 to @nSongs
/varset Songs(@EachSong) ${String[@SongBlock].Mid[@EachSong,1]}
/echo Song @EachSong: ${Me.Gem[@Songs(@EachSong)].Name}
/next EachSong
/echo Found @nSongs in the playlist.
/varset CurSong 1
/call Event_Timer
:Loop
/doevents
/if (!${Window[CastingWindow].Open}) {
/varset CurSong @PrevSong
/call Event_Timer
}
/goto :Loop
/return
Sub Event_Timer(TimerName)
/delay 2
/stopsong
/cast @Songs(@CurSong)
/varset PrevSong @CurSong
/varset SongTimer 30
/varadd CurSong 1
/if (@CurSong>@nSongs) /varset CurSong 1
/return

