I wrote this when looking Gabriela's twist macro. So i guess this mac is dedicated to her
Tested for a bit, works with as many songs as you throw at it.
Code: Select all
| stwist.mac - SimpleTwist by Raebis
| Version: REV1 Jan 13 18:45
|
| usage: /mac stwist <Songs>
|
| This example will twist the songs in gems 3, 4, 5, and 6:
| /mac stwist 3456
|
| You can also use it to twist a song only once every other twist, i.e.:
| /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 $strlen(@SongBlock)
/for EachSong 1 to @nSongs
/varset Songs(@EachSong) $mid($calc(@EachSong-1),1,@SongBlock)
/echo Song @EachSong: $char(gem,@Songs(@EachSong))
/next EachSong
/varset CurSong 1
/call Event_Timer
:Loop
/doevents
/if $char(casting)==FALSE {
/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 n @CurSong>@nSongs /varset CurSong 1
/return