problems: making sure you root the mob
-being out of spell casting range after running to anchor point
-snare getting resisted
-bunch of other stuff...
-this is all untested~
some useful info:
$target(animation) will return 32 if rooted, 17 if snared, and 18 if not snared
Code: Select all
|afkdotter.mac
|
|macro to root rot mobs in HoH basement or Tactics
|the locations are specific, and i will work them out later
|
|
|
|includes Plazmics SPellcast.inc
#include spellcast.inc
|events~
#event ensnare "Your Ensnare spell has worn off"
#event savageroots "Your Savage Roots spell has worn off"
#event wingeddeath "Your Winged Death spell has worn off"
#event Dronesdoom "Your Drones of Doom spell has worn off"
#event immoofro "Your Immolation of Ro spell has worn off"
#event epic "Your Wrath of Nature spell has worn off"
#event snared "has been ensnared"
#event slain "have been slain by"
#event xp "experience!!"
Sub Main
/declare epichotkey global
/varset epichotkey 3
/declare invishotkey global
/varset invishotkey 1
/declare droneshotkey global
/varset droneshotkey 5
/declare resnare timer
/varset resnare 2h
/declare eastanchor global
/varset eastanchor -692.39,497.25
/declare westanchor global
/varset westanchor -588.73,907.65
/declare northanchor global
/varset northanchor -545.57,615.58
/declare rooted global
/declare heading global
/declare hastarget global
/declare mob global
/declare pull global
/declare drones global
/declare immo global
/declare epicdot global
/declare wings global
:loop
/if n @resnare<=0 /call Cast "Ensnare"
/if n @hastarget==0 /call gettarget
/if n @hastarget==1 /if n @pull==0 /call pullmob
/doevents
/goto :loop
/return
Sub gettarget
:nocaster
/tar npc
/if $target(class)=="Shadow Knight" /goto :nocaster
/varset mob "$target(name)"
/varset hastarget 1
/return
Sub pullmob
/press @invishotkey
/if $char(state)!="STANDING" /sit off
/if @mob=="bad monkey" /call gettarget
/tar @mob
:gettomob
/face fast
/press up
/press Num_lock
/if $target(distance)<=100 {
/press down
/call Cast "Ensnare"
:gotoanchor
/face fast loc @westanchor
/press up
/press Num_lock
/if n $distance(@westanchor)<=5 {
/press up
/varset pull 1
/call dots
}
/goto :gotoanchor
}
/goto :gettomob
/return
Sub dots
:rootcheck
/if $target(distance)<=120 /call safedistance
/call Cast "Savage Roots"
/if $target(animation)!=32 /goto :rootcheck
/if $target(animation)==32 /varset rooted 1
/if $target(distance)<=120 /call safedistance
/call Cast "Immolation of Ro"
/if $target(distance)<=120 /call safedistance
/call Cast "Winged Death"
/if $target(distance)<=120 /call safedistance
/press @droneshotkey
:Waitdrone1
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :Waitdrone1
}
/if $target(distance)<=120 /call safedistance
/press @epichotkey
:Waitepic
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :Waitepic
}
|event subs for spells
Sub Event_snared
/varset resnare 14m
/echo $target(name,clean) has been resnared!
/return
Sub Event_wingeddeath
/sit
/stand
/if $target(distance)<=120 /if rooted==1 /call safedistance
/call Cast "Winged Death"
/echo $target(name,clean) has been dotted with Winged Death!
/return
Sub Event_immoofro
/sit
/stand
/if $target(distance)<=120 /if rooted==1 /call safedistance
/call Cast "Immolation of Ro"
/echo $target(name,clean) has been dotted with Immolation of Ro!
/return
Sub Event_Dronesdoom
/sit
/stand
/if $target(distance)<=120 /if rooted==1 /call safedistance
/press @droneshotkey
:Waitdrone
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :Waitdrone
}
/echo $target(name,clean) has been dotted with Drones of Doom!
/return
Sub Event_epic
/sit
/stand
/if $target(distance)<=120 /if rooted==1 /call safedistance
/press @epichotkey
:Waitepic
/if "$char(casting)"=="TRUE" {
/delay 1
/goto :Waitepic
}
/echo $target(name,clean) has been dotted with Drones of Doom!
/return
||||||MOST IMPORTANT SUB|||||
Sub Event_savageroots
/echo $target(name,clean) is unrooted!
/varset rooted 0
/if $target(distance)<=120 /call safedistance
}
/return
Sub safedistance
:run
/if n $distance(@northanchor)<=5 /varset heading west
/if n $distance(@westanchor)<=5 /varset heading east
/if n $distance(@easthanchor)<=5 /varset heading north
/if heading=="west" {
/face fast loc @westanchor
/press Num_Lock
/if n $distance(@westanchor)<=5 /press up
}
/if heading=="east" {
/face fast loc @eastanchor
/press Num_Lock
/if n $distance(@westanchor)<=5 /press up
}
/if heading=="north" {
/face fast loc @northanchor
/press Num_Lock
}
/if $target(distance)<=120 /goto :run
/return
Sub Event_XP
/varset rooted 0
/varset hastarget 0
/varset pull 0
/varset mob "bad monkey"
Sub Event_slain
/delay 2m
/echo you died...
/sit
/camp
/end
/return
