Bug 2: The events that are only supposed to happen if Flying Kick is ready are constantly occuring, whether or not the button is pressed or ready..
I don't know how to fix these so I'm tossing the ball to you =p
Code: Select all
|K I L L . M A C
|B Y ~ N O T A D R U I D ! ! !
|Usage: /mac kill. It's that simple!
|Intended for monks. moves to the mob, autoattackks
|Uses flying kick and celestial fists.
|autoattack off on enrage
|Mends automatically if below 70% life
|~ ~ Version 2.6 ~ ~
#turbo 90
#Event enraged " has become ENRAGED."
#Event toofar "Your target is too far away, get closer!"
#Event tooclose "You cannot see your target."
Sub Main
/if "$target()"=="False" /end
/echo Running ~ K I L L . M A C ~ by Notadruid! "Feel the pwnage!" ~ Version 2.6
/declare RangeMax global
/declare RangeMin global
/declare FastRange global
/varset RangeMax 10
/varset RangeMin 5
/varset FastRange 12
/face fast nolook
/call move
/attack on
:fight
/face fast nolook
[color=red] /if n $char(ability,"Flying Kick")>0 {[/color]
/do "Flying Kick"
/cast item "Celestial Fists"
}
/if n $char(hp,pct)<=70 {
/if $char(ability,"Mend")>0 {
/do "Mend"
}
}
/call move
/doevents
/if "$target()"=="False" {
/sendkey up up
/attack off
/end
}
/goto :fight
/return
Sub move
/face fast nolook
/doevents enraged
/if n $target(distance)>=@FastRange /call fastmove
/if n $target(distance)>@RangeMax {
[color=red] /press up[/color]
}
/if n $target(distance)<@RangeMin {
[color=red] /press down[/color]
}
/return
Sub fastmove
:fastmoveloop
/doevents enraged
/if $target()=="FALSE" {
/sendkey up up
/end
}
/face fast nolook
/if n $target(distance)>@FastRange {
[color=red] /sendkey down up[/color]
}
/if n $target(distance)<=@FastRange {
/sendkey up up
/return
}
/goto :fastmoveloop
/return
Sub Event_toofar
[color=red] /press up[/color]
/if n $target(distance)<@RangeMax {
|RangeMax is too large.
|Adjust RangeMax to current distance
|Adjust RangeMin and FastRange
|to eliminate impossible constraints
/varset RangeMax $target(distance)
/varset RangeMin $calc(@RangeMax-5)
/varset FastRange $calc(@RangeMax+5)
}
/return
Sub Event_tooclose
[color=red] /press down[/color]
/if n $target(distance)>@RangeMin {
|RangeMin is too small.
|Adjust RangeMin to current distance
|Adjust RangeMax and FastRange
|to eliminate impossible constraints
/varset RangeMin $target(distance)
/varset RangeMax $calc(@RangeMin+5)
/varset FastRange $calc(@RangeMax+5)
}
/return
Sub Event_enraged
/attack off
/press esc
/end
/return


