Code: Select all
| rogue.mac
| Grimjack's Rogue helper scripts for 2 boxing.
| Many pieces are pulled from the macro depot on macroquest2.com
| with some modifications. I would like to thank all the authors who's code I used
| to complete this.
| This particular script is designed to be used in tandem with my getbehind script.
| I use this script to auto evade, move to mob, and backstab when the mob's back is facing me.
| Originaly I had the script automaticly moving behind the mobs but when you get aggro it can
| Look really wierd.
| 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,
| and backstab when mob is in correct position.
|
| The healthcheck sub is designed to use my click heal bp when I am not attacking and below
| 90 health and have no target. 0 is the key pressed to activate the
| hotkey my BP slot is in.
|
| 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 Checkbehind
/if $Combatstatus=="1" /call Evadeit
/if $Combatstatus=="1" /call Checkbehind
/if $Combatstatus=="0" /call Healthcheck
/doevents
/goto :Mainloop
/return
Sub Healthcheck
/if n $CastTimer>0 /return
/if n $char(hp,pct)<90 {
/if $combat!="TRUE" {
/if $target()=="FALSE" {
/press 0
/varset CastTimer 16s
}
}
}
/return
Sub Checkbehind
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))<8 {
/if $Combatstatus=="1" /call Backstabit
}
/return
Sub Evadeit
/if n $char(ability,"Hide")!=-2 {
/if $Combatstatus=="1" {
/attack off
/doability "Hide"
/if $EnrageVar!="1" /attack
}
}
/return
Sub Backstabit
/if n $char(ability,"Backstab")!=-2 {
/if $target()=="TRUE" {
/face fast nopredict
/doability "Backstab"
}
}
/return
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



