BUT, I cant seem to get my Parameters to work (never really did understand how to get them to)
I want to be able to toggle autofollow and/or taunt.. but neither is working at all.. here is the code in its current state.
Code: Select all
#Event exp "experience!"
#Event Casting "You begin casting"
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"
Sub Main
/echo Auto-Attack Macro has begun.
/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 targetarray array
/varset startexp $char(exp)
/varset startaaxp $char(aa,exp)
/if "@Param0"=="Follow" /echo "Auto following enabled"
/if "@Param0"=="taunt" /echo "Auto-Taunt enabled"
: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)
/if "@targetarray(3)"=="0" /return
/echo Fighting a level @targetarray(1) @targetarray(0)
/face look
:CloserAF
/if "$target(id)"!=@targetarray(3) /goto :EndAF
/doevents
/call Combatcheck
/if "@Param0"=="Follow" /if n $target(distance,nopredict)>10 /press up
/if "@Param0"=="Follow" /if n $target(distance,nopredict)<10 /press down
/face fast nopredict look
/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"
/if "@Param0"=="taunt" /if n $target(distance,nopredict)<11 /if n $char(ability,"Taunt")>0 /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 targetarray(3) 0
/press Num_5
/delay 4
/return
/if "Param0"=="follow" /if n $target(distance,nopredict)>10 /sendkey down up
/if "Param0"=="follow" /if n $target(distance,nopredict)<10 /sendkey up up
/if "Param0"=="follow" /if n $target(distance,nopredict)<15 /attack on
/if "Param0"=="follow" /if n $target(distance,nopredict)>15 /attack off
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
any help would be appreciated..
Also, is there any way to get archery NOT to turn on $combat ?? every time I pluck an arrow, it starts my combat sub..


