If anyone find any errors please say so. im really trying to learn how to code, and im not real good at it.
Update 4-22-04
Added Enrage target watch functions. You will no longer stop attacking if our target is NOT enraged.
If you target yourself and have the macro engaged (Attack enabled), you will now untarget yourself.
Stoping Attack, stops the macro from functioning. this is intentional. just start attacking again to have it take over.
Added a few more melee abilitys.
4-23-04
Cleaned up the code a tad. (thanks Bob for the help).
removed paramiter for player set max distance.
Added auto-distance
Code: Select all
|Stik.mac
|4-23-14
|
|Syntax:
| Usage: /macro stick
|
|
|Functions:
| Now automatically sets Max Distances for you.
| Will auto Kick, Beg, and disarm.
| Will turn off attack on ENRAGE, only if it is your mob that is enraged.
| Stoping attack while the macro is running will stop movment.
|-Stix
#event rageon "has become ENRAGED."
#event rageoff "is no longer enraged"
#event stunned "while stunned"
sub main
/echo STICK MAC STARTED
:main
/doevents
/if (${Me.Combat}) /goto :mob
/goto :main
:mob
/if (${Target.Distance}>100) {
/echo (${Target}) IS OOR
/attack off
/goto :main
}
/if (${Target.ID}) {
/zapvars
/declare MaxD global
/varset MaxD "${Target.MaxRange}"
/echo Attacking (${Target}) at @MaxD distance.
/goto :combat
}
/goto :main
:combat
/doevents
/if (${String[${Target}].Equal[${Me}]}) /attack off
/if (!${Me.Combat}) /goto :main
/face fast nolook
/if (${Target.Distance}>@MaxD-2) /keypress forward hold
/if (${Target.Distance}<=@MaxD-4) /keypress forward
/if (${Target.Distance}<@MaxD-7) /keypress back hold
/if (${Target.Distance}<@MaxD-2) /if (${Me.AbilityReady[Kick]}) /doability "Kick"
/if (${Target.Distance}<@MaxD-2) /if (${Me.AbilityReady[Disarm]}) /doability "Disarm"
/if (${Target.Distance}<@MaxD-2) /if (${Me.AbilityReady[begging]}) {
/attack off
/face fast nolook
/delay 1
/doability "begging"
/if (!${Target.ID}) /goto :main
/attack on
}
/if (${Target.ID}) /goto :combat
/keypress back
/goto :main
/return
sub event_rageon
/if (${Target.CurrentHPs}>10) /return
/popup ENRAGED ATTACK OFF
/echo Rage On
/attack off
/return
sub event_rageoff
/if (${Target.CurrentHPs}>10) /return
/popup Rage OFF, ATTACKING NOW
/echo Rage Off
/attack on
/return
sub event_stunned
/popup STUNNED STUNNED STUNNED
/delay 1s
/returnAlso cant seem to get the macro to stop moving while casting (tried the one bob listed, didnt work). if any one has any suggestions please post.


