Usage: macro rogue-assist.mac <MinRange> <MaxRange> <FastRange>
MinRange = Range at which the macro does a /press down
MaxRange = Range at which the macro does a /press up
FastRange = Range at which macro uses /sendkey down up
Example /macro rogue-assist.mac 10 12 18
Code: Select all
|rogue-assist.mac
|Rogue Melee assist macro.
|version 3
#Turbo 72
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"
Sub Main
/declare RangeMin global
/declare RangeMax global
/declare FastRange global
/declare Combatstatus global
/declare CastTimer timer
/declare EnrageVar global
/declare DoHeal global
/declare HealItem global
/declare DoDisarm global
|--------------------------------------
|Edit this to change autoheal
/varset DoHeal 1
/varset HealItem "Brigand's Chestguard"
|Edit this to chang auto disarm
/varset DoDisarm 1
|---------------------------------------
/varset RangeMin @Param0
/varset RangeMax @Param1
/varset FastRange @Param2
/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 Disarmit
/if @Combatstatus=="1" /call Checkbehind
/if @Combatstatus=="0" /call Healthcheck
/doevents
/goto :Mainloop
/return
Sub Healthcheck
/if n @DoHeal==0 /return
/if $char(casting)=="TRUE" /return
/if $char(ismoving)=="TRUE" /return
/if n $char(hp,pct)<90 {
/if $combat!="TRUE" {
/if $target()=="FALSE" {
/delay 1s
/cast item "@HealItem"
}
}
}
/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 Disarmit
/if n @DoDisarm==0 /return
/if n $char(ability,"Disarm")!=-2 {
/doability "Disarm"
}
/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
/delay 2
/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
/stand
/face fast
/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
}
}
/stand
/face fast
/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
}
}
/returnUsed as a hotkey to move behind mob when using rogue-assist macro. Takes the same input so that It can restart rogue-assist with the correct distances.
Code: Select all
|movebehind.mac
|Movebehind macro to be used in tandem with rogue-assist
|version 2.1
Sub Main
/declare RangeMin global
/declare RangeMax global
/declare FastRange global
/if "$char(state)=="SIT" /stand
/varset RangeMin @Param0
/varset RangeMax @Param1
/varset FastRange @Param2
/attack off
/if $target()==FALSE {
/attack off
/sendkey up up
/macro rogue-assist @RangeMin @RangeMax @FastRange
}
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))<3 /goto :noneed
/sendkey down up
:gotopointloop
/if $combat=="TRUE" /attack off
/if $target()==FALSE {
/attack off
/sendkey up up
/macro rogue-assist @RangeMin @RangeMax @FastRange
}
/if "$char(state)=="SIT" /stand
/face nolook fast loc $calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10)
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>1 /goto :gotopointloop
/sendkey up up
/face fast
:noneed
/attack on
/macro rogue-assist @RangeMin @RangeMax @FastRange
/return

