Code: Select all
| Melee.mac
|I give credit to Grimjack and Macrokit as the source for the code used
| This particular script is designed to be used in tandem with my getbehind script.
| This is designed to be an always on script. It will automaticly move to the mob that you have
| targeted when you turn on attack. It will also auto evade, turn off/on attack for enrage,
| If there are any improvments that you see can be made let me know please.
| useage:
|/macro rogue.mac [minimum distance to mob] [maximum distance to mob] [distance at which to move fast]
#define RangeMin v50
#define RangeMax v51
#define FastRange v52
#Turbo 72
#define Combatstatus v60
#define CastTimer t1
#define EnrageVar v61
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"
Sub Main
/varset RangeMin $p0
/varset RangeMax $p1
/varset FastRange $p2
/varset Combatstatus 0
/varset EnrageVar 0
:Mainloop
/call Combatcheck
/if $Combatstatus=="1" /call RangeSub
/if $Combatstatus=="1" /call Melee
/doevents
/goto :Mainloop
/return
sub Melee
/varset a(8,3) $target(id)
/face
/sendkey down up
:CloserAF
/if "$target(id)"!="$a(8,3)" /endmacro
/if n $target(distance)>15 /sendkey down up
/if n $target(distance)<6 /sendkey down down
/if n $target(distance)<16 /sendkey up up
/if n $target(distance)>5 /sendkey up down
/if n $target(distance)<15 /attack on
/if n $target(distance)>19 /attack off
/face fast nopredict
/if n $char(ability,"Flying Kick")>0 /doability "Flying Kick"
/if n $char(ability,"Disarm")>0 /doability "Disarm"
/goto :CloserAF
Sub Combatcheck
/if $EnrageVar=="1" {
/if $target()=="TRUE" {
/return
} else {
/varset EnrageVar 0
/varset Combatstatus 0
}
}
/if $target()=="FALSE" {
/varset Combatstatus 0
/if $combat=="TRUE" {
/attack off
}
/return
}
/if $target()=="TRUE" {
/if $combat=="TRUE" {
/varset Combatstatus 1
/return
}
}
/varset Combatstatus 0
/return
Sub Rangesub
/face fast nopredict
/if n $target(distance)>=$FastRange /call Fastmove
/if n $target(distance)>$RangeMax {
/press up
}
/if n $target(distance)<$RangeMin {
/press down
}
/return
Sub Event_Enraged
/if $target()=="TRUE" {
/varset EnrageVar 1
/attack off
}
/return
Sub Fastmove
:fastmoveloop
/if $target()=="FALSE" {
/varset Combatstatus 0
/sendkey up up
/if $combat=="TRUE" {
/attack off
/return
}
}
/face fast nopredict
/if n $target(distance)>$FastRange {
/sendkey down up
/attack off
}
/if n $target(distance)<=$FastRange {
/if $Combatstatus=="1" {
/if $EnrageVar=="0" {
/attack on
}
}
/sendkey up up
/return
}
/goto :fastmoveloop
/return
Sub Event_Offrage
/if $target()=="TRUE" {
/varset EnrageVar 0
/attack
}
}
/return PS: Grimjack, I still can't get your movebehind.mac to work right. Regardless of what I do it still goes chaotic running around in circles.

