| AFMELEE.mac initial version v04.01.08
| 04.01.09 added leashing
| 04.26.09 added param based arguments
| 05.12.09 added many checks for zone
#include spell_routines.inc
#include ChatParse.inc
#turbo 5
#Event ComeTo "#*#come with me my minions#*#"
#Event Hidem "#*#Hide Em#*#"
#Event Rest "#*#Rest up#*#"
#Event Zoned "LOADING, PLEASE WAIT...
#Event follow "#*#Minions stick close#*#"
Sub Main
/stick off
|------------READ THIS SECTION AND EDIT IF NEEDED-----------|
|-- Set spell casting order here
/declare mainassist string outer ${Param0}
/declare autoassist int outer 1
/declare autoassisthealth int outer ${Param1}
/declare autoleash bool outer ${Param2}
/declare stakeX int outer ${Me.X}
/declare stakeY int outer ${Me.Y}
/declare leashlength int outer 50
/declare leashholder string outer Nobody
/declare leashflex int outer 25
/declare dis string outer ${Param3}
/declare r string outer ${Param4}
/declare StartZone int outer ${Zone.ID}
/declare groupbuff string outer Stormblood's Unity Rk. III
/declare grouphealthbuff string outer Spiritual Vivification Rk. II
/declare grouphembuff string outer Spiritual Elaboration Rk. II
/declare healspell string outer Deltro's Mending Rk. II
/declare healspellrange int outer 100
/declare DoTColor string outer Red
/declare dot1 string outer Polybiad Blood Rk. II
/declare dot2 string outer Ekron's Chill Rk. II
/declare dot3 string outer Elkikatar's Endemic Rk. II
/noparse /declare DoTConditions1 string outer (!${Me.Moving} && ${Me.PctMana}>=20 && ${Target.PctHPs}<=94 && ${Me.Buff[Al`ele's Vindication Effect III].ID}>0 && ${Cast.Ready["Polybiad Blood Rk. II"]} && !${Target.Buff["Polybiad Blood Rk. II"].Caster.Equal[${Me}]}) /Casting "Polybiad Blood Rk. II" gem4
/noparse /declare DoTConditions2 string outer (!${Me.Moving} && ${Me.PctMana}>=20 && ${Target.PctHPs}<=94 && ${Me.Buff[Al`ele's Vindication Effect III].ID}>0 && ${Cast.Ready["Elkikatar's Endemic Rk. II"]} && !${Target.Buff["Elkikatar's Endemic Rk. II"].Caster.Equal[${Me}]}) /Casting "Elkikatar's Endemic Rk. II" gem5
/noparse /declare DoTConditions3 string outer (!${Me.Moving} && ${Me.PctMana}>=20 && ${Target.PctHPs}<=94 && ${Me.Buff[Al`ele's Vindication Effect III].ID}>0 && ${Cast.Ready["Ekron's Chill Rk. II"]}) /Casting "Ekron's Chill Rk. II" gem3
/noparse /declare DoTConditions4 string outer (!${Me.Moving} && ${Me.PctMana}>=50 && ${Target.PctHPs}<=94 && ${Cast.Ready["Polybiad Blood Rk. II"]} && !${Target.Buff["Polybiad Blood Rk. II"].Caster.Equal[${Me}]} && ${Target.BuffDuration[Polybiad Blood Rk. II]}<=12000) /Casting "Polybiad Blood Rk. II" gem4
/noparse /declare DoTConditions5 string outer (!${Me.Moving} && ${Me.PctMana}>=60 && ${Target.PctHPs}<=94 && ${Cast.Ready["Ekron's Chill Rk. II"]} && !${Target.Buff["Ekron's Chill Rk. II"].Caster.Equal[${Me}]} && ${Target.BuffDuration[Ekron's Chill Rk. II]}<=12000) /Casting "Ekron's Chill Rk. II" gem3
/noparse /declare DoTConditions6 string outer (!${Me.Moving} && ${Me.PctMana}>=70 && ${Target.PctHPs}<=94 && ${Cast.Ready["Elkikatar's Endemic Rk. II"]} && !${Target.Buff["Elkikatar's Endemic Rk. II"].Caster.Equal[${Me}]} && ${Target.BuffDuration[Elkikatar's Endemic Rk. II]}<=12000 && ${Me.Song["Focused Paragon of Spirit XXII"].ID}) /Casting "Elkikatar's Endemic Rk. II" gem5
/declare DDColor string outer Purple
/declare dd1 string outer Beramos' Maelstrom Rk. II
/declare dd2 string outer Frozen Toxin Rk. II
/declare dd3 string outer Mawmun's Bite Rk. II
/declare dd4 string outer Frostbite Lance Rk. II
/declare dd5 string outer Roar at the Moon Rk. II
/noparse /declare DDConditions1 string outer (!${Me.Moving} && ${Me.PctMana}>30 && ${Target.PctHPs}<= ${autoassisthealth} && !${Me.Buff[Al`ele's Vindication Effect III].ID})
/declare i int local
/declare CurrentSub string outer
/declare pl int local
/declare petyhealspell string outer Salve of Blezon
/declare petyhealspellrange int outer 100
/declare selfhealpoint int outer 70
/declare tankhealpoint int outer 65
/declare casterpatchpoint int outer 70
/declare necshmpatchpoint int outer 50
/declare defaultpatchpoint int outer 75
/declare minorhurt int outer 0
/declare majorhurt int outer 0
/declare worsthurt string outer NULL
/declare worsthurtid int outer
/declare worsthp int outer 100
/declare worstclass string outer NULL
/declare ghealhurtcount int outer 0
/declare gmember int outer
/declare rm int outer
/declare lords int outer 0
/declare mainassistid int outer
/for rm 0 to ${Raid.Members}
/if (${Raid.Member[${rm}].Class.ShortName.Equal[BST]}) /varcalc lords ${lords}+1
/next rm
|------------END EDITING------------------------------------|
/declare boolInCombat bool inner FALSE
/if (!${Defined[Param0]}) {
/echo Proper usage: /macro assist TankName assisthealth autoleash
/end
}
/echo Assisting: ${mainassist}, at ${autoassisthealth}, and leashing: ${autoleash} distance ${dis}
|------------BEGIN ROUTINES------------------------------------|
/if (${Raid.Members}>=13) {
/target ${mainassist} PC
/varset mainassistid ${Target.ID}
/if (${Target.Distance}>=50) /stick ID ${mainassistid}
}
/echo AFMelee Active
:mainloop
/if (${GameState.Equal[CHARSELECT]}) /end
/if (${Zone.ShortName.Equal[GuildLobby]}) {
/sit
/delay 10m
/camp desktop
}
/if (${Zone.ID} != ${StartZone}) {
/sit
/delay 10m
/camp desktop
}
/call CheckEvents
/if (!${Me.Gem[Venomous Alliance Rk. III]} && ${lords}>=2 && ${Me.Buff["Shared Merciless Ferocity Rk. III"].ID}) /multiline ; /memorize 50346 gem13 ; /echo memming
/if (${Raid.Members}>=13 && !${Me.Gem[Roar at the Moon Rk. II]}) /multiline ; /memorize 57466 gem1 ; /echo memming
/if (${Raid.Members}<=13 && !${Me.Gem[Deltro's Mending Rk. II]}) /multiline ; /memorize 57390 gem1 ; /echo memming
|-----------------------------
|-- check to see if I should attack
/delay 1
/if (${Me.XTarget[1].ID}) /assist ${mainassist}
/delay 1
|&& !${Me.CombatState.Equal[COMBAT]}
/if (${Raid.Members}>=13 && !${Stick.Active} && !${Me.CombatState.Equal[COMBAT]}) /stick ID ${mainassistid}
/if (${Spell[Familiar: Emperor Ganak].Stacks} && !${Me.Buff[Familiar: Emperor Ganak].ID} && !${Me.Moving} && !${Me.Invis}) /useitem Emperor Ganak Familiar
/if (${Spell[Pact of the Wurine VI].Stacks} && !${Me.Buff[Pact of the Wurine VI].ID} && !${Me.Moving} && !${Me.Invis} && !${Me.Buff[Group Spirit of the Black Wolf VI].ID} && !${Me.Buff[Group Spirit of the Black Wolf VII].ID}) /alt activate 3709
/if (${Spell["Natural Cooperation Rk. II"].Stacks} && !${Me.Buff["Natural Cooperation Rk. II"].ID} && !${Me.Moving} && ${Me.PctMana}>=20 && !${Me.Invis}) /alt activate 1508
/if (!${Me.Moving} && ${Me.PctMana}<=90 && ${Me.AltAbilityReady[1239]}) /alt activate 1239
/if (${Me.Pet.ID} && !${Me.Moving} && !${Me.Invis} && ${Me.AltAbilityReady[666]} && !${Me.PetBuff[Taste of Blood VII]}) /alt activate 666
/if (${Me.Pet.ID} && !${Me.Moving} && !${Me.Invis} && ${Me.AltAbilityReady[126]} && !${Me.PetBuff[Hobble of Spirits VI]}) /alt activate 126
/if (${Me.Pet.ID} && ${Me.Pet.PctHPs}<=75 && ${Me.CurrentMana}>=2079 && !${Me.Moving} && !${Me.Invis}) /casting "Salve of Artikla Rk. II" gem2 1s
/if (${Raid.Members}<=13 && ${Me.PctHPs}<=75 && ${Cast.Ready[Deltro's Mending Rk. II]}) /multiline ; /target ${Me} ; /casting "Deltro's Mending Rk. II" gem1 2.5s ; /keypress esc
/if (${Spell["Shared Merciless Ferocity"].Stacks} && !${Me.Buff["Shared Merciless Ferocity Rk. III"].ID} && !${Me.Moving} && ${Me.PctMana}>10 && !${Me.Invis} && ${Cast.Ready[Shared Merciless Ferocity Rk. III]}) /Casting "Shared Merciless Ferocity Rk. III" gem13 2s
/if (${Me.PctMana}<=75 && ${Me.AltAbilityReady[3817]} && !${Me.Song["Paragon of Spirit XXXII"].ID}) /multiline ; /delay 10 ; /target ${Me} PC ; /alt activate 3817 ; /keypress esc
/if (${Me.Pet.ID} && !${Me.Moving} && !${Me.Invis} && !${Me.PetBuff[Might of the Wild Spirits]}) /useitem Spiritcaller Totem of the Feral
/if (!${Me.Pet.ID} && ${Me.CurrentMana}>=900 && !${Me.Moving} && !${Me.Invis}) /casting "Spirit of Akalit" gem12 5s
/if (${Me.Pet.ID} && ${Me.CurrentMana}>=2000 && !${Me.Moving} && !${Me.Invis} && !${Me.PetBuff[Spirit of Beramos Rk. II]}) /casting "Companion's Unity" gem12 5s
/if (${Me.Pet.ID} && ${Me.CurrentMana}>=900 && !${Me.Moving} && !${Me.Invis} && !${Me.PetBuff[Virzak's Aggression Rk. II]}) /casting "Virzak's Aggression Rk. II" gem12 5s
/if (${Me.Pet.ID} && ${Me.CurrentMana}>=900 && !${Me.Moving} && !${Me.Invis} && !${Me.PetBuff[Convivial Warder Rk. II]}) /casting "Convivial Warder Rk. II" gem12 5s
/if (${Spell["Growl of the Sabretooth Rk. II"].Stacks} && !${Me.Song["Growl of the Sabretooth Rk. II"].ID} && !${Me.Moving} && ${Me.PctMana}>10 && ${Cast.Ready[Growl of the Sabretooth Rk. II]} && !${Me.Song["Savage Rancor Rk. II"].ID}>0) /Casting "Growl of the Sabretooth Rk. II" gem10 2s
/if (${Me.PctMana}<=75 && ${Me.AltAbilityReady[3817]} && !${Me.Song["Paragon of Spirit XXXII"].ID} && !${Me.Song["Focused Paragon of Spirit XXV"].ID}) /multiline ; /delay 10 ; /target ${Me} PC ; /alt activate 3817 ; /keypress esc
/if (${Me.Pet.Taunt} && ${Me.TargetOfTarget.Class.ShortName.Equal[WAR]} && ${Raid.Members}>=13) /pet taunt off
/if (!${Me.Pet.Taunt} && ${Me.TargetOfTarget.Class.ShortName.NotEqual[WAR]} && ${Raid.Members}>=13) /pet taunt on
/if (${Me.Pet.Taunt} && ${Me.TargetOfTarget.Class.ShortName.Equal[WAR]} && ${Group.Members}>=3) /pet taunt off
/if (!${Me.Pet.Taunt} && ${Me.TargetOfTarget.Class.ShortName.NotEqual[WAR]} && ${Group.Members}>=3) /pet taunt on
/if (${Raid.Members}<=13) /for pl 0 to 5
/if (${Raid.Members}<=13 && ${Me.Buff[Al`ele's Vindication Effect III].ID}==0 && ${Group.Member[${pl}].PctHPs}<=30 && ${Group.Member[${pl}].PctHPs}>0 && !${SpawnCount[${Group.Member[${pl}]} corpse]}) {
/squelch /tar ${Group.Member[${pl}]} PC
/delay 1s ${Target.ID}==${Group.Member[${pl}].ID}
/casting "${healspell}" gem1 1s
/delay 2
/squelch /tar clear
}
/if (${Raid.Members}<=13) /next pl
|-----------------------------
|-- check to see if I am in combat, if I am, then set it as such, so I don't go and reassist.
/if (${Melee.Status.NotEqual[WAITING]}) {
/varset boolInCombat FALSE
} else {
/varset boolInCombat TRUE
}
|-----------------------------
|-- if not in combat, and I should be assisting, and killing, do so;
|-- the boolInCombat flag keeps from from banging autoattack over and over.
/if ((${autoassist}==1) && (${Target.Type.Equal[NPC]}) && (${Target.PctHPs}<= ${autoassisthealth}) && (${boolInCombat} == FALSE) && ${${mainassist}.Distance}<50) {
/varset boolInCombat TRUE
/attack on
/if (${Raid.Members}<=13) /face fast nolook
/if (${Me.PctAggro}>=60 && ${Me.AltAbilityReady[11073]}) /casting 11073 alt
/if (${Me.Feigning}) /stand on
/if (${Target.Distance}>=30 && ${Target.Distance}<=${dis} && !${Me.Moving} && ${Raid.Members}>13) /stick on
/if (${Me.CombatState.Equal[COMBAT]} && ${Target.PctHPs}<=94 && ${Cast.Ready[151355]}) /useitem Scaled Dragonbrood Tunic
/if (${Target.Distance}<=40) /pet attack
/if (${Spell["Dichotomic Fury"].Stacks} && !${Me.Song["Dichotomic Fury 6"].ID} && !${Me.Song["Ruaabri's Fury Rk. III"].ID} && ${Me.PctMana}>10 && ${Cast.Ready[Dichotomic Fury]} && ${Target.PctHPs}>=50) /Casting "Dichotomic Fury" gem11 1s
/if (${Spell["Growl of the Sabretooth Rk. II"].Stacks} && !${Me.Song["Growl of the Sabretooth Rk. II"].ID} && !${Me.Moving} && ${Me.PctMana}>10 && ${Cast.Ready[Growl of the Sabretooth Rk. II]} && !${Me.Song["Savage Rancor Rk. II"].ID}>0) /multiline ; /pet attack ; /Casting "Growl of the Sabretooth Rk. II" gem10 2s
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[2068]} && ${Target.PctHPs}<=94) /alt activate 2068
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[128]} && ${Me.PctMana}<=55 && !${Me.Song["Focused Paragon of Spirit XXV"].ID} && ${Raid.Members}<=13) /alt activate 128
/if (!${Me.Moving} && ${Me.PctMana}>40 && ${Target.PctHPs}<=94 && ${Cast.Ready[Beramos' Maelstrom Rk. II]} && !${Me.Buff[Al`ele's Vindication Effect III].ID}) /Casting "Beramos' Maelstrom Rk. II" gem6 1s
/if (!${Me.Moving} && ${Me.PctMana}>50 && ${Target.PctHPs}<=94 && !${Me.Buff[Al`ele's Vindication Effect III].ID} && ${Cast.Ready[Mawmun's Bite Rk. II]}) /Casting "Mawmun's Bite Rk. II" gem9 .5s
/if (!${Me.Moving} && ${Me.PctMana}>30 && ${Target.PctHPs}<=94 && !${Me.Buff[Al`ele's Vindication Effect III].ID} && ${Me.PctAggro}<=50) /Casting "Frozen Toxin Rk. II" gem7 .5s
/if (!${Me.Moving} && ${Me.PctMana}>30 && ${Target.PctHPs}<=94 && !${Me.Buff[Al`ele's Vindication Effect III].ID} && ${Cast.Ready[Frostbite Lance Rk. II]}) /Casting "Frostbite Lance Rk. II" gem8 1s
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[127]} && ${Target.PctHPs}<=94) /alt activate 127
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[1432]} && ${Target.PctHPs}<=94) /alt activate 1432
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[443]} && ${Target.PctHPs}<=94) /alt activate 443
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[985]} && ${Target.PctHPs}<=94 && !${Me.Song["Bestial Alignment XIII"].ID}) /alt activate 985
/if (${Me.CombatAbilityReady[Savage Rancor Rk. II]} && ${Target.PctHPs}<=94 && ${Melee.Combat} && !${Me.Song["Bestial Alignment XIII"].ID}) /disc Savage Rancor Rk. II
/if (${Me.CombatAbilityReady[Ruaabri's Fury Rk. III]} && ${Target.PctHPs}<=94 && ${Melee.Combat} && !${Me.Song["Dichotomic Fury 6"].ID} && !${Me.Song["Frenzy of Spirit IX"].ID}) /disc Ruaabri's Fury Rk. III
/if (${Me.CombatAbilityReady[Reflexive Sundering Rk. III]} && ${Target.PctHPs}<=94 && ${Melee.Combat}) /disc Reflexive Sundering Rk. III
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[15073]} && ${Target.PctHPs}<=94) /alt activate 15073
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[241]} && ${Target.PctHPs}<=94) /alt activate 241
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[1240]} && ${Target.PctHPs}<=94) /alt activate 1240
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[966]} && ${Target.PctHPs}<=94 && !${Me.Song["Savage Rancor Rk. II"].ID}) /alt activate 966
/if (${Me.Pet.ID} && ${Me.Pet.PctHPs}<=75 && ${Me.CurrentMana}>=2079) /casting "Salve of Artikla Rk. II" gem2 1s
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[981]} && ${Target.PctHPs}<=94) /alt activate 981
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[245]} && ${Target.PctHPs}<=94 && !${Me.Song["Group Bestial Alignment V"].ID}) /alt activate 245
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[362]} && ${Target.PctHPs}<=94) /alt activate 362
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.AltAbilityReady[11080]} && ${Target.PctHPs}<=94) /alt activate 11080
/if (${Melee.Combat} && ${Target.PctHPs}<=94 && ${Me.CombatAbilityReady[Al`ele's Vindication Rk. III]} && ${Me.PctMana}>50) /disc Al`ele's Vindication Rk. III
/if (!${Me.Moving} && ${Me.PctMana}>=20 && ${Target.PctHPs}<=94 && ${Me.Buff[Al`ele's Vindication Effect III].ID}>0 && ${Cast.Ready["Polybiad Blood Rk. II"]} && !${Target.Buff["Polybiad Blood Rk. II"].Caster.Equal[${Me}]}) /Casting "Polybiad Blood Rk. II" gem4
/if (!${Me.Moving} && ${Me.PctMana}>=20 && ${Target.PctHPs}<=94 && ${Me.Buff[Al`ele's Vindication Effect III].ID}>0 && ${Cast.Ready["Elkikatar's Endemic Rk. II"]} && !${Target.Buff["Elkikatar's Endemic Rk. II"].Caster.Equal[${Me}]}) /Casting "Elkikatar's Endemic Rk. II" gem5
/if (!${Me.Moving} && ${Me.PctMana}>=20 && ${Target.PctHPs}<=94 && ${Me.Buff[Al`ele's Vindication Effect III].ID}>0 && ${Cast.Ready["Ekron's Chill Rk. II"]}) /Casting "Ekron's Chill Rk. II" gem3
/if (!${Me.Moving} && ${Me.PctMana}>=20 && ${Target.PctHPs}<=94 && !${Target.Buff[Venomous Alliance Rk. III].Caster.Equal[${Me}]} && ${lords}>=2 && ${Cast.Ready[Venomous Alliance Rk. III]} && ${Target.Buff["Polybiad Blood Rk. II"].Caster.NotEqual[${Me}]}) /Casting "Venomous Alliance Rk. III" gem13
/if (!${Me.Moving} && ${Me.PctMana}>=50 && ${Target.PctHPs}<=94 && ${Cast.Ready["Polybiad Blood Rk. II"]} && !${Target.Buff["Polybiad Blood Rk. II"].Caster.Equal[${Me}]} && ${Target.BuffDuration[Polybiad Blood Rk. II]}<=12000) /Casting "Polybiad Blood Rk. II" gem4
/if (!${Me.Moving} && ${Me.PctMana}>=60 && ${Target.PctHPs}<=94 && ${Cast.Ready["Ekron's Chill Rk. II"]} && !${Target.Buff["Ekron's Chill Rk. II"].Caster.Equal[${Me}]} && ${Target.BuffDuration[Ekron's Chill Rk. II]}<=12000) /Casting "Ekron's Chill Rk. II" gem3
/if (!${Me.Moving} && ${Me.PctMana}>=70 && ${Target.PctHPs}<=94 && ${Cast.Ready["Elkikatar's Endemic Rk. II"]} && !${Target.Buff["Elkikatar's Endemic Rk. II"].Caster.Equal[${Me}]} && ${Target.BuffDuration[Elkikatar's Endemic Rk. II]}<=12000 && ${Me.Song["Focused Paragon of Spirit XXII"].ID}) /Casting "Elkikatar's Endemic Rk. II" gem5
/if (${Me.CombatAbilityReady[Bestial Savagery Rk. II]} && ${Target.PctHPs}<=94 && ${Melee.Combat}) /disc Bestial Savagery Rk. II
/if (${Me.CombatAbilityReady[Mangle Rk. II]} && ${Target.PctHPs}<=94 && ${Melee.Combat}) /disc Mangle Rk. II
/if (${Me.CombatState.Equal[COMBAT]} && ${Me.CombatAbilityReady[Focused Clamor of Claws Rk. IiI]} && ${Me.PctEndurance}>50 && ${Target.PctHPs}<=98) /disc Focused Clamor of Claws Rk. III
/if (!${Me.Moving} && ${Me.PctMana}>40 && ${Target.PctHPs}<=94 && !${Me.Buff[Al`ele's Vindication Effect III].ID} && ${Cast.Ready["Roar at the Moon Rk. II"]}) /Casting "Roar at the Moon Rk. II" gem1 1s
/if (!${Me.Buff[Al`ele's Vindication Effect III].ID}) /call Instant dd
/call Instant dot
}
|-----------------------------
|-- should I leash?
/if ((${autoleash} == TRUE) && ${leashholder.Equal[Nobody]} && !${Me.CombatState.Equal[COMBAT]} && (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>${leashlength})) {
/if (!${Me.CombatState.Equal[COMBAT]}) /goto :LeashStart
}
/goto :mainloop
|-----------------------------
|-- leashing, ganked from RH
:LeashStart
/if (${leashholder.Equal[Nobody]} && (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>${Math.Calc[${leashlength}*${leashflex}/100]})) {
/echo Moving closer to the Stake... ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]} ft. away
/face ${If[${Me.Underwater},,nolook]} loc ${stakeY},${stakeX}
/keypress forward hold
/delay 1s ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<${Math.Calc[${leashlength}*${leashflex}/100]}
/keypress forward
/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<${Math.Calc[${leashlength}*${leashflex}/100]}) {
/echo Arrived near enough to the Stake.
/face fast ${If[${Me.Underwater},,nolook]} away loc ${stakeY},${stakeX}
/keypress esc
/goto :mainloop
}
/if (${Zone.ID} != ${StartZone}) {
/sit
/delay 10m
/camp desktop
}
/goto :LeashStart
/return
Sub CheckEvents
/delay 1
/doevents
/return
Sub Instant(subname,int force)
/varset CurrentSub ${subname}
/declare i int local
/for i 1 to 20
/if (!${Defined[${subname}${i}]}) /return
/if (${${subname}Conditions${i}}||!${Defined[${subname}Conditions${i}]}) {
/if (${FindItem[${${subname}${i}}].InvSlot} && !${FindItem[${${subname}${i}}].Timer} && ${${subname}${i}.NotEqual[Axe of the Demolisher]} ) {
/Casting "${${subname}${i}}" item ${If[${Defined[${CurrentSub}Color]},${${CurrentSub}Color},Orange]}
}
/if (${Me.AltAbilityReady[${${subname}${i}}]}) /Casting "${${subname}${i}}" alt ${If[${Defined[${CurrentSub}Color]},${${CurrentSub}Color},Orange]}
/if (${Me.CombatAbilityReady[${${subname}${i}}]}) /Casting "${${subname}${i}}" disc ${If[${Defined[${CurrentSub}Color]},${${CurrentSub}Color},Orange]}
/if (${Cast.Ready[${${subname}${i}}]} && ${Me.PctMana}>=20 && ${Cast.Ready[${${subname}${i}}]} && !${Target.Buff[${${subname}${i}}].Caster.Equal[${Me}]} && ${Target.BuffDuration[${${subname}${i}}]}<=12000 && !${Me.Buff[Al`ele's Vindication Effect III].ID}) /Casting "${${subname}${i}}"
/if (${Cast.Ready[${${subname}${i}}]} && ${Me.PctMana}>=20 && ${Cast.Ready[${${subname}${i}}]} && ${Me.Buff[Al`ele's Vindication Effect III].ID} && !${Target.Buff[${${subname}${i}}].Caster.Equal[${Me}]}) /Casting "${${subname}${i}}"
/if (!${Me.Moving} && ${Me.PctMana}>=20 && ${Me.Buff[Al`ele's Vindication Effect III].ID}>0 && ${Cast.Ready["${dot2}"]} && ${Target.Buff[${dot3}].Caster.Equal[${Me}]} && ${Target.Buff[${dot1}].Caster.Equal[${Me}]}) /Casting "${dot2}" gem3
|/if (${Cast.Ready[${${subname}${i}}]}) /Casting "${${subname}${i}}"
}
/next i
/return
Sub Event_Hidem
/echo Hiding corpses
/hidecorpse npc
/return
Sub Event_Rest
/echo Resting
/sit
/return
Sub Event_Buffs
/echo Casting Buffs
/alt activate 992
/delay 20
/Casting "${groupbuff}" gem11 5s
/delay 6s
/return
|--------------------------------------------------------------------------------
|SUB: Zoned
|--------------------------------------------------------------------------------
Sub Event_Zoned
/echo Zoned
/444
Sub Event_follow
/mac stick
/return