Sorry, didn't know the extent to how much the system has changed. In the macro below, p0-p3 are just integers representing a song # in spell list. Am trying to figure how to edit the if statements to work properly with the new system. I get numeric errors with the if false statements.
if there's something i could read to make figuring this out easier, just point me that way :)
Also confused to the code structure of the portion in red.
Code: Select all
#event MissedNote "You miss a note, bringing your song to a close!"
#event Recovered "You haven't recovered yet..."
#event Cantsee "You cannot see your target"
#event Hitbymob "hits for"
#turbo
Sub Main(p0,p1,p2,p3)
/zapvars
/declare a array
/declare nsongs global
/declare cursong global
/declare t0 timer
/declare v6 local
/declare notarg global
/if ($defined(p0)==false) {
/echo usage: /mac twisting.mac song1 song2 song3 song4
/end
}
/varset nsongs 1
/varset a(1) @p0 | First song
/echo Song 1: $char(gem,@p0)
/if ($defined(p1)!=false) {
/varadd nsongs 1
/varset a(2) @p1
/echo Song 2: $char(gem,@p1)
}
/if ($defined(p2)!=false) {
/varadd nsongs 1
/varset a(3) @p2
/echo Song 3: $char(gem,@p2)
}
/if ($defined(p3)!=false) {
/varadd nsongs 1
/varset a(4) @p3
/echo Song 4: $char(gem,@p3)
}
/varset cursong 0
/varset t0 1
:Loop
/if (n @t0<=0) {
/stopsong
/delay 1
/varset t0 32
/varadd cursong 1
[color=red]/if (n @cursong>@nsongs) /varset cursong 1
| /echo starting song @a(@cursong) [/color]
/cast @a(@cursong)
/delay 2
}
/delay 3
/doevents
/delay 2
/goto :Loop
/return
Sub Event_MissedNote
/varcalc cursong @cursong-1
/varset t0 0
/return
|Sub Event_Cantsee
| /echo "Cant see target yo."
| /varcalc cursong @cursong-1
| /varset t0 0
|/return
Sub Event_Recovered
/varcalc cursong @cursong-1
/varset t0 0
/return
|Sub Event_Hitbymob
| /echo "Yo a mob hit you"
| /stop
| /alt activate 212
| /end
|/return