I know its ugly, but hey, it works..
Code: Select all
|atk.mac Auto-Attack Macro for everyday use.
|Mashed together from other assorted macros.
|has the ability to toggle taunting, and autofollowing
|for those situations wher you jusnt might not want ta
|follow that mob.
|
|Usage:
|/macro atk.mac follow taunt (to follow and taunt)
|/macro atk.mac follow (to just follow)
|/macro atk.mac taunt (to just taunt)
|/macro atk.mac (to neither taunt nor follow)
#Event exp "experience!"
#Event Casting "You begin casting"
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"
Sub Main(FirstArg,SecondArg)
/echo "Auto-Attack Macro has begun."
/declare Toggle local
/declare Toggle2 local
/declare startexp global
/declare startaaxp global
/declare EnrageVar global
/declare Combatstatus global
/declare currentxp global
/declare xpgain global
/declare currentaa global
/declare aagain global
/declare taunttoggle global
/declare followtoggle global
/declare targetarray array
/varset Toggle @FirstArg
/varset Toggle2 @SecondArg
/varset startexp $char(exp)
/varset startaaxp $char(aa,exp)
/if "@Toggle"=="Follow" {
/echo "Auto-Follow enabled"
/varset "followtoggle" 1
}
/if "@Toggle2"=="taunt" {
/echo "Auto-Taunt enabled"
/varset "taunttoggle" 1
}
/if "@Toggle"=="taunt" {
/echo "Auto-Taunt enabled"
/varset "taunttoggle" 1
}
:mainloop
/if "$combat"=="TRUE" /call melee
/delay 3
/doevents
/goto :mainloop
/return
Sub melee
/varset targetarray(0) "$target(name,clean)"
/varset targetarray(1) $target(level)
/varset targetarray(2) $target(name)
/varset targetarray(3) $target(id)
/delay 3
/if "@targetarray(3)"=="0" /return
/if "$combat"!="TRUE" /return
/echo Fighting a level @targetarray(1) @targetarray(0)
/face nopredict
/varset Combatstatus 1
:CloserAF
/if "$target(id)"!=@targetarray(3) /goto :EndAF
/doevents
/call Combatcheck
/if "@followtoggle"==1 {
/if n $target(distance,nopredict)>25 /sendkey down up
/if n $target(distance,nopredict)>10 /if n $target(distance,nopredict)<25 {
/press Num_9
/delay 3
/sendkey down up
/press Num_9
}
/if n $target(distance,nopredict)<10 /sendkey up up
)
/face fast nopredict
/if n $target(distance,nopredict)<11 /if n $char(ability,"Kick")>0 /doability "Kick"
/if n $target(distance,nopredict)<11 /if n $char(ability,"Disarm")>0 /doability "Disarm"
[color=red]|here it doesnt want to taunt if I do a "/if n $char(ability,"Taunt")>0 statement, dont know why, so I just left that out.[/color]
/if "@taunttoggle"==1 /doability taunt
/delay 4
/goto :CloserAF
/return
:EndAF
/echo The level @targetarray(1) @targetarray(0) is dead...
/sendkey up up
/sendkey up down
/attack off
/varset Combatstatus 0
/varset targetarray(3) 0
/press Num_5
/delay 4
/return
Sub AF
/if n $target(distance,nopredict)>25 /sendkey down up
/if n $target(distance,nopredict)>10 /if n $target(distance,nopredict)<25 {
/press Num_9
/delay 3
/sendkey down up
/press Num_9
}
/if n $target(distance,nopredict)<10 /sendkey up up
/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
}
/return
Sub Event_Enraged
/if $target()=="TRUE" {
/if n @Combatstatus==1 {
/varset EnrageVar 1
/attack off
}
/varset EnrageVar 1
}
/return
Sub Event_Offrage
/if $target()=="TRUE" {
/if n @Combatstatus==1 {
/varset EnrageVar 0
/attack
}
/varset EnrageVar 0
}
/return
Sub Event_exp
/varset currentxp $char(exp)
/varcalc xpgain @currentxp-@startexp
/varset currentaa $char(aa,exp)
/varcalc aagain @currentaa-@startaaxp
/echo "You've gained @xpgain% xp and @currentaa% aaxp."
/varset @startexp $char(exp)
/varset startaaxp $char(aa,exp)
/return
Sub Casting
:checkcast
/delay 3
/if "$char(casting)"=="TRUE" goto :checkcast
/return

