Code: Select all
Cleared the following: Timers Vars Arrays
[MacroQuest] Song 1: Tuyen`s Chant of Ice
[MacroQuest] Song 2: Tuyen`s Chant of the Plague
[MacroQuest] Song 3: Tuyen`s Chant of Flame
[MacroQuest] Song 4: Tuyen`s Chant of Poison
[MacroQuest] Song 5: Selo`s Accelerating Chorus
Ending macro: Calculate encountered a '
chantkite.mac@109 (circ): /face heading $calc($heading(@Param0,@Param1)+$calc(90*$calc(@Param2/$distance(@Param0,@Param1))))
chantkite.mac@86 (Main): /call circ @xloc @yloc @radius
Cleared the following: Timers Vars Arrays
The current macro has ended.
Code: Select all
| - ChantKite.mac -
| /mac Chantkite <GEM> <GEM> <GEM> <GEM> <SELOS GEM> <XLOC> <YLOC> <RADIUS>
| Note, since the lvl 49 Selo's lasts 2.5 minutes, this macro WONT WORK
| IF YOU HAVEN'T GOT THE 2.5 MINUTE SELOS DON'T TRY, DON'T BITCH IT WON'T
#event MissedNote "You miss a note, bringing your song to a close!"
#event Recovered "You haven't recovered yet..."
#event NeedTarget "You must first select a target for this spell!"
#event Slow "You slow down"
#event Outran "out of range"
#event Outran "You cannot see"
Sub Main
/zapvars
/declare CASTTIME global
/declare cursong global
/declare nsongs global
/declare targcount global
/declare xloc global
/declare yloc global
/declare radius global
/declare chorus global
/declare prevsong global
/declare SELOS global
/declare timer0 timer
/declare timer1 timer
/declare songarray array2
/varset CASTTIME 32
/varset SELOS 5
/varset cursong 1
/varset targcount 0
/varset nsongs 5
/varset timer1 0
/if @Param5!="" /if @Param5!=NULL {
/varset xloc @Param5
} else /varset xloc $target(y)
/if @Param6!="" /if @Param6!=NULL {
/varset yloc @Param6
} else /varset yloc $target(x)
/if @Param7!="" /if @Param7!=NULL {
/varset radius @Param7
} else /varset radius 75
| -----------------------
/if @Param0!="" /if @Param0!=NULL {
/varset songarray(0,1) @Param0
} else /varset songarray(0,1) 1
/echo Song 1: $char(gem,@songarray(0,1))
/if @Param1!="" /if @Param1!=NULL {
/varset songarray(0,2) @Param1
} else /varset songarray(0,2) 2
/echo Song 2: $char(gem,@songarray(0,2))
/if @Param2!="" /if @Param2!=NULL {
/varset songarray(0,3) @Param2
} else /varset songarray(0,3) 3
/echo Song 3: $char(gem,@songarray(0,3))
/if @Param3!="" /if @Param3!=NULL {
/varset songarray(0,4) @Param3
} else /varset songarray(0,4) 4
/echo Song 4: $char(gem,@songarray(0,4))
/if @Param4!="" /if @Param4!=NULL {
/varset songarray(0,5) @Param4
} else /varset songarray(0,5) 5
/echo Song 5: $char(gem,@songarray(0,5))
:Loop
/if n @timer1<=$calc(@timer0+@CASTTIME) {
/varset cursong SELOS
}
/if n $t1<=CASTTIME {
/varset timer0 1
}
/if n @timer0<=0 {
/call Sing $int(@songarray(0,@cursong))
}
/call circ @xloc @yloc @radius
/doevents
/goto :Loop
/return
Sub Sing
/varset timer0 CASTTIME
/if n $cursong==SELOS /varset t1 1500
/stopsong
/cast @Param0
/varset prevsong $cursong
/varadd cursong 1
/if n @cursong>@nsongs /varset cursong 1
/call circ @xloc @yloc @radius
/doevents
/return
sub circ
/if n $distance(@Param0,@Param1)<(@Param2/2){
/face heading $calc($heading(@Param0,@Param1)+180)
} else {
/face heading $calc($heading(@Param0,@Param1)+$calc(90*$calc(@Param2/$distance(@Param0,@Param1))))
}
/return
Sub Event_MissedNote
/varset cursong @Paramrevsong
/varset timer0 0
/doevents
/return
Sub Event_Slow
/varset cursong SELOS
/varset timer0 0
/return
Sub Event_Outran
/varset timer0 0
/varadd targcount 1
/if n $targcount>=4 {
/varset targcount 0
/tar npc
}
/call circ @xloc @yloc @radius
/doevents
/return
Sub Event_Recovered
/varset timer0 0
/varset cursong @Paramrevsong
/doevents
/return
Sub Event_NeedTarget
/varadd targcount 1
/if n $targcount>=2 {
/varset targcount 0
/tar npc
}
/call circ @xloc @yloc @radius
/doevents
/return

