Heres the code.
Code: Select all
|arch.mac Auto-Archery
/zapvars
#include spellcast.inc
#turbo 40
#Event exp "#*#experience!#*#"
#Event Casting "#*#You begin casting#*#"
#event haste "#*#The quickening spirit departs#*#"
#event eagle "#*#The avian presence departs#*#"
Sub Main
/echo "Auto-Arch Macro has begun."
/declare startexp int outer
/declare startaaxp int outer
/declare currentxp int outer
/declare xpgain int outer
/declare currentaa int outer
/declare aagain int outer
/declare targetarray[4] string outer
/varset startexp ${Math.Calc[${Me.Exp}/3.33]}
/varset startaaxp ${Math.Calc[${Me.AAExp}/3.33]}
/if (${Defined[Param0]} && ${String[${Param0}].Equal[forage]}) {
/echo "Auto-Forage enabled"
}
:mainloop
/if (${Me.Combat} && ${Target.ID} && ${Target.CleanName.NotEqual[${Me.Name}]}) /call Archery
/if (${String[${Param0}].Equal[forage]} && ${Me.AbilityReady[Forage]}) {
/doability Forage
/delay 20
/if (${Cursor.ID}) /autoinv
}
/doevents
/goto :mainloop
/return
Sub Archery
/attack off
/varset targetarray[1] ${Target.CleanName}
/varset targetarray[2] ${Target.Level}
/varset targetarray[3] ${Target.Name}
/varset targetarray[4] ${Target.ID}
/echo Fighting a ${targetarray[2]} ${targetarray[1]}
/face nolook
:CloserAF
/if (${Target.Distance}>30) /ranged
/if (${String[${Param0}].Equal[forage]} && ${Me.AbilityReady[Forage]}) {
/doability Forage
/delay 20
/if (${Cursor.ID}) /autoinv
}
/doevents
/if (${Target.Distance}<18) /call closecombat
/if (${Target.ID}!=${targetarray[4]}) /goto :EndAF
/doevents
/if (!${Target.ID}) /goto :EndAF
/doevents
/goto :CloserAF
/return
:EndAF
/echo a ${targetarray[2]} ${targetarray[1]} is dead
/keypress Num_5
/return
Sub closecombat
/attack on
/face nolook
:stillclose
/if (${String[${Param0}].Equal[forage]} && ${Me.AbilityReady[Forage]}) {
/attack off
/doability Forage
/delay 20
/if (${Cursor.ID}) /autoinv
/attack on
}
[color=red]/doability Disarm
/doability Kick[/color]
/if (${Target.ID}!=${targetarray[4]}) /goto :endclose
/doevents
/if (!${Target.ID}) /goto :endclose
/if (${Target.Distance}<18 && ${Target.ID} && ${Target.CleanName.NotEqual[${Me.Name}]}) /goto :stillclose
:endclose
/attack off
/return
Sub Event_exp
/varset currentxp ${Math.Calc[${Me.Exp}/3.33]}
/varset xpgain ${Math.Calc[${currentxp}-${startexp}]}
/varset currentaa ${Math.Calc[${Me.AAExp}/3.33]}
/varset aagain ${Math.Calc[${currentaa}-${startaaxp}]}
/popup "Gain: ${xpgain}% xp - ${aagain}% aa ## Cur: ${currentxp}% xp - ${currentaa}% aa"
/echo "Gain: ${xpgain}% xp - ${aagain}% aa ## Cur: ${currentxp}% xp - ${currentaa}% aa"
/varset startexp ${Math.Calc[${Me.Exp}/3.33]}
/varset startaaxp ${Math.Calc[${Me.AAExp}/3.33]}
/return
Sub event_eagle
/call Cast "Eagle Eye" gem6
/delay 5s
/return
Sub event_haste
/call Cast "Eyepatch of Plunder" item
/delay 4s
/return
sub Event_Casting
:checkcast
/delay 1
/if (${Me.Casting.ID}) /goto :checkcast
/return
I want to use
Code: Select all
/if (${Me.RangeAttackReady}) /ranged I want to use
Code: Select all
/if (${Me.AbilityReady[Kick]}) /doability Kick
/if (${Me.AbilityReady[Disarm]}) /doability Disarmalso, in the experience display code, It used to display the decimal experience, now it rounds it.. I want the decimals back.. any idea how?
This is updated code from my old archery macro, with proximity checking added to auto melee when in range of mob, and only do archery when you are far enough away from the mob to use archery.
help please.. = ) 8)


