Chant Kiting Macro

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Protector316
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 19, 2003 1:08 am

Chant Kiting Macro

Post by Protector316 » Sun Oct 19, 2003 1:12 am

Any ideas about this? So far, the circle works, it gets the parameters fine, but it casts too fast, and gives me a can't compare error at this part:

/if @Param == @SELOS /varset timer1 1475

Sorry i forgot who first did this macro, but i love it and so i tried my best for the last couple hours to get it up and running.

Been using macroquest for a while now, and decided to register....now that i'm stuck... :roll:

| - ChantKite.mac -
| /mac Chantkite <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 Exp "You gain "
#event Slow "You slow down"
#event Outran "out of range"
#event NeedTarget "You must first select a target for this spell!"

Sub Main(Psong1 Psong2 Psong3 Psong4 Pselo Pxloc Pyloc Pradius)


/declare timer0 timer
/declare timer1 timer

/declare CASTTIME global
/declare SELOS global
/declare xloc global
/declare yloc global
/declare radius global
/declare song1 global
/declare song2 global
/declare song3 global
/declare song4 global
/declare selo global
/declare cursong global
/declare prevsong global

/varset timer1 0
/varset CASTTIME 31
/varset SELOS 5
/varset cursong 1
/varset song1 @Psong1
/varset song2 @Psong2
/varset song3 @Psong3
/varset song4 @Psong4
/varset selo @Pselo
/varset xloc @Pxloc
/varset yloc @Pyloc
/varset radius @Pradius


/echo Song 1: $char(gem,@song1)
/echo Song 2: $char(gem,@song2)
/echo Song 3: $char(gem,@song3)
/echo Song 4: $char(gem,@song4)
/echo Song 5: $char(gem,@selo)
/echo x,y,radius: @xloc , @yloc , @radius


:Loop
/if @timer1<=$calc(@timer0+@CASTTIME) {
/varset cursong @SELOS
}
/if @timer1<=@CASTTIME {
/varset timer0 1
}
/if @timer0<=0 /call Sing $int(@cursong)
/call circ @xloc @yloc @radius
/doevents
/goto :Loop
/return

Sub Sing(Param)
/varset timer0 @CASTTIME
/if @Param == @SELOS /varset timer1 1475
/stopsong
/cast @Param
/varset prevsong $cursong
/varadd cursong 1
/if @cursong>@nsongs /varset @cursong 1
/call circ @xloc @yloc @radius
/doevents
/return

sub circ(Px Py Pr)
/if $distance(@Px,@Py)<(@Pr/2){
/face heading $calc($heading(@Px,@Py)+180)
} else {
/face heading $calc($heading(@Px,@Py)+$calc(90*$calc(@Pr/$distance(@Px,@Py))))
}
/return

Sub Event_MissedNote
/varset cursong @prevsong
/varset timer0 0
/doevents
/return

Sub Event_Recovered
/varset timer0 0
/varset cursong @prevsong
/doevents
/return

Sub Event_NeedTarget
/tar npc
/call circ @xloc @yloc @radius
/doevents
/return

Sub Event_Exp
/tar npc
/call circ $xloc $yloc $radius
/doevents
/return

Sub Event_Outran
/tar npc
/call circ $xloc $yloc $radius
/doevents
/return

Sub Event_Slow
/varset cursong @SELOS
/varset timer0 0
/return

drax
orc pawn
orc pawn
Posts: 12
Joined: Wed Oct 15, 2003 12:02 am

Post by drax » Sun Oct 19, 2003 3:10 am


Protector316
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 19, 2003 1:08 am

Post by Protector316 » Sun Oct 19, 2003 7:29 am

haven't been able to get the above linked macro to work. :cry:

Protector316
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 19, 2003 1:08 am

Post by Protector316 » Sun Oct 19, 2003 10:47 am

just thought of a few things at work, this really shouldn't be to hard to switch over to the new stuff.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sun Oct 19, 2003 11:01 am

Get rid of the spaces between @Param0 and @Selos.

Code: Select all

/if @Param==@SELOS /varset timer1 1475