Anyway, here's the code-
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 0
/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 10s
/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 nolook 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 nolook 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 nolook 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
}
}
/return

