Code: Select all
| -!- This Script Uses spell_routines.inc by Rusty
| -!- This Script Uses advpath.inc
| -!- Wait4Rez snippet from wait4rez.mac by fantum409
| -!- Original core script from Hubba's shaman mac
#chat group
#chat tell
#event Invite "#1# invites you to join a group."
#Event ToggleVariable "[MQ2] Toggle #1#"
#Event ToggleVariable "[MQ2] Toggle #1# #2#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event OutDoor "#*#outdoors#*#"
#Event NoMount "You can not summon a mount here."
#Event ImDead "You have been slain by#*#"
#Event Invited "#*#To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#"
#Event UnderAttack "#*#YOU for#*#points of damage."
#Event UnderAttack "#*#YOU, but YOU#*#!"
#Event UnderAttack "#*#YOU, but misses!"
| GM's and Guides ALWAYS open conversation saying who they are
#event GMInZone "#*#tells you,#*# GM #*#"
#event GMInZone "#*#tells you,#*# Guide #*#"
#event GMInZone "#*#tells you,#*# gamemaster #*#"
#event GMInZone "#*#tells you,#*# Game Master #*#"
#event GMInZone "#*#tells you,#*# Customer Service #*#"
#event GMInZone "#*#tells you,#*# CSR #*#"
/declare noInvis int outer 1
#include Spell_Routines.inc
#include advpath.inc
#define DEBUG_1 "/squelch /echo"
Sub Main
/call InitAPFVars 1 15 40
| ########### Make changes in spells as you need.
| The % of your spell duration bonus.
/declare SpellDurationBonus outer 0
|- If you have no focus item, leave it blank.
/declare BuffFocusItem outer ""
/declare SpellSlow outer Mark of the Righteous
/declare SpellSlowGem outer 8
/declare SpellDoT outer
/declare SpellDoTGem outer 2
/declare SpellNuke outer Condemnation
/declare SpellNukeGem outer 8
|Pet doesn't work yet
/declare SpellPet outer
/declare SpellPetGem outer 8
/declare SpellDeBuff outer Mark of Kings
/declare SpellDeBuffGem outer 8
/declare SpellGroupHeal outer Ethereal Elixir
/declare SpellGroupHealGem outer 4
/declare SpellCompleteHeal outer Complete Healing
/declare SpellCompleteHealGem outer 3
/declare SpellHeal outer Supernal Light
/declare SpellHealGem outer 1
/declare SpellHoT outer Supernal Elixir
/declare SpellHoTGem outer 2
/declare SpellInvulnerability outer Divine Barrier
/declare SpellInvulnerabilityGem outer 5
/declare SpellYaulp outer Yaulp VI
/declare SpellYaulpGem outer 8
/declare HammerSpell outer Hammer of Damnation
/declare HammerSpellGem outer 8
/declare SpellRoot outer Root
/declare SpellRootGem outer 4
/declare Mount outer Tan Rope Bridle
/declare SpellBuffsGem outer 8
| ############ The Magic of single spell buffs...
| ############
| ############ /declare SpellBuff[2,2] string outer
| ############ Do only change the 1st number in [#,#]
| ############ If you have three single spells to cast change the 1st number to 3.
| ############ /declare SpellBuff[3,2] string outer
| ############
| ############ /varset SpellBuff[1,1] "Spirit of Sense"
| ############ This is the 1st line that is needed, Here you write your spell name
| ############ /varset SpellBuff[1,2] "Warrior,Monk,Cleric,Shaman,Enchanter,"
| ############ The 2nd line is for the classes who gets the buff.
| ############ NOTE: Only classes in group will get buffed
| ############ NOTE: End the class line with a , If not you can BLOW up your computer. ;P
| /declare SpellBuff[9,4] string outer
/declare SpellBuff[5,3] string outer
/varset SpellBuff[1,1] Armor of the Zealot
/varset SpellBuff[1,2] "Cleric,"
/varset SpellBuff[1,3] TRUE
/varset SpellBuff[2,1] Virtue
/varset SpellBuff[2,2] "Bard,Beastlord,Berserker,Cleric,Druid,Enchanter,Magician,Monk,Necromancer,Paladin,Ranger,Rogue,Shadowknight,Shaman,Warrior,Wizard,"
/varset SpellBuff[2,3] TRUE
/varset SpellBuff[3,1] Symbol of Kazad
/varset SpellBuff[3,2] "Bard,Beastlord,Berserker,Cleric,Druid,Enchanter,Magician,Monk,Necromancer,Paladin,Ranger,Rogue,Shadowknight,Shaman,Warrior,Wizard,"
/varset SpellBuff[3,3] TRUE
/varset SpellBuff[4,1] Faith
/varset SpellBuff[4,2] "Bard,Beastlord,Berserker,Cleric,Druid,Enchanter,Magician,Monk,Necromancer,Paladin,Ranger,Rogue,Shadowknight,Shaman,Warrior,Wizard,"
/varset SpellBuff[4,3] FALSE
/varset SpellBuff[5,1] Blessing of Reverence
/varset SpellBuff[5,2] "Beastlord,Cleric,Druid,Enchanter,Magician,Necromancer,Paladin,Ranger,Shadowknight,Shaman,Wizard,"
/varset SpellBuff[5,3] TRUE
| Automatically click the following buffs off
/declare BounceBuff[11] string outer
| /varset BounceBuff[1] "Speed of Vallon"
| /varset BounceBuff[2] "Spiritual Vigor"
| /varset BounceBuff[3] "Spirit of the Predator"
| /varset BounceBuff[4] "Spirit of the Hunter"
/varset BounceBuff[5] "Talisman of Kragg"
/varset BounceBuff[6] "Focus of Soul"
/varset BounceBuff[7] "Focus of Spirit"
/varset BounceBuff[8] "Khura's Focusing"
/varset BounceBuff[9] "Focus of the Seventh"
/varset BounceBuff[10] "Talisman of Wunshi"
/varset BounceBuff[11] "Wunshi's Focusing"
| ############ Group buffs...
/declare SpellGrpBuff[0] string outer
| /varset SpellGrpBuff[1] Hand of Virtue
/declare DoSingleBuffs outer TRUE
/declare AssistAt int outer 100
/declare CombatAt int outer 99
/declare CastDoTat int outer 98
/declare MinDoTat int outer 40
/declare MinNukeat int outer 15
/declare MinManaForNuke int outer 80
/declare Rootat int outer 30
/declare NukeAt int outer 90
/declare CasterHeals int outer 90
/declare MeleeHeals int outer 75
/declare TankHeal int outer 45
/declare DelayBetweenNukes int outer 0
/declare DoMelee outer FALSE
/declare Closeness int outer 50
/declare DoMalo outer FALSE
/declare DoSlow outer FALSE
/declare FastSlow outer FALSE
/declare DoRoot outer FALSE
/declare DoRootParking outer FALSE
/declare SummonPet outer FALSE
/declare ShouldBuffPet outer FALSE
/declare HealPets outer TRUE
/declare DoDoT outer FALSE
/declare DoBuffs outer TRUE
/declare DoNuke outer TRUE
/declare DoGroupHeal outer TRUE
/declare DoCompleteHeal outer TRUE
/declare DoHeal outer TRUE
/declare DoHoT outer TRUE
/declare Verbose outer TRUE
/declare BuffInBattle outer TRUE
/declare AnnounceLOM outer TRUE
/declare quitOnZone outer FALSE
/declare AutoMove outer TRUE
/declare AllowAutoFollow outer TRUE
/declare NoMount outer FALSE
|**
ClassHeals<class> array:
1: Complete heal - if HP drops below this, cast a cheal
2: Quick Heal - if HP drops below this, cast a quick heal
3: HOT - if HP drops below this, cast a HOT
Will always try to cast the one set to the LOWEST value first,
so if you have HOT set to 80, and CHeal set to 70, and tank01's
hp is at 60, it will cast CHeal, not HOT...
Likewise, if HOT is 70, and CHEAL is 80, it would cast HOT first
and cheal after.
If it starts casting a CHEAL and has to interupt for a quick heal
(determined by f(HP < QHeal*0.66 && (TimeTilChealLands) > 5seconds))
then it will perform a temporary adjustment on cheal for that class,
making it cast cheal earlier next time... this is handy for greater
efficiency on named pulls and such, since it provides better efficiency
and will slowly scale cast time back to preset values over time without
user interaction.
4 & 5 are for internal program usage for dynamic heal adjustments
Adjust the values for 1, 2, and 3 in the function below...
Separated into functions so that you can easily add more functions for
different zones, and just comment out the function call to switch zones.
**|
/declare i int local
/declare ClassHeals[5] string outer
/for i 1 to 17
/declare ClassHeals${i}[5] string outer
/next i
/call SetHealsPrimaryHealer
| /call SetHealsSupportHealer
| /call SetHealsSupportHealerTemp
|**---------------------TrickyDA Config---------------------|
The following are HP buffs cleric will click off, in order,
to get above 40% HP and avoid low HP aggro. Clr will then
click off DA and resume duties, beg new buffs, etc. To
enable, set trickyda to 1, 0 will disable
|---------------------------------------------------------**|
/declare trickyda int outer 1
/if (${trickyda}==1) {
/declare intcount int outer 0
/declare trickybuff[20] string outer
/varset trickybuff[1] Virtue
/varset trickybuff[2] Hand of Virtue
/varset trickybuff[3] Conviction
/varset trickybuff[4] Hand of Conviction
/varset trickybuff[5] Focus of Soul
/varset trickybuff[6] Focus of the Seventh
/varset trickybuff[7] Wunshi's Focusing
/varset trickybuff[8] Talisman of Wunshi
/varset trickybuff[9] Protection of the 9
/varset trickybuff[10] Blessing of the Nine
/varset trickybuff[11] Steeloak Skin
/varset trickybuff[12] Blessing of Steeloak
/varset trickybuff[13] Symbol of Kazad
/varset trickybuff[14] Kazad`s Mark
/varset trickybuff[15] Symbol of Balikor
/varset trickybuff[16] Balikor's Mark
/varset trickybuff[17] Brell's Stalwart Shield
/varset trickybuff[18] Brell's Brawny Bulwark
/varset trickybuff[19] Spiritual Vigor
/varset trickybuff[20] Spiritual Vitality
}
|-------------------End TrickyDA Config---------------------|
| ########### ! No Changes Are Needed From Here !
| ########### ! No Changes Are Needed From Here !
| ########### ! No Changes Are Needed From Here !
| ########### ! No Changes Are Needed From Here !
| ########### ! No Changes Are Needed From Here !
/squelch /alias /domalo /echo toggle malo
/squelch /alias /doslow /echo toggle slow
/squelch /alias /dofastslow /echo toggle fastslow
/squelch /alias /doroot /echo toggle root
/squelch /alias /dopet /echo toggle pet
/squelch /alias /dodot /echo toggle dot
/squelch /alias /donuke /echo toggle nuke
/squelch /alias /nukeat /echo toggle nukeat
/squelch /alias /dobuffs /echo toggle buffs
/squelch /alias /dosow /echo toggle sow
/squelch /alias /assistat /echo toggle assistat
/squelch /alias /dotat /echo toggle dotat
/squelch /alias /rootat /echo toggle rootat
/squelch /alias /combatat /echo toggle combatat
/squelch /alias /healmeleeat /echo toggle healmeleeat
/squelch /alias /healcastersat /echo toggle healcastersat
/squelch /alias /healtankat /echo toggle healtankat
/squelch /alias /doassist /echo toggle assist
/squelch /alias /healat /echo toggle healat
/squelch /alias /status /echo toggle show
/squelch /alias /show /echo toggle show
/squelch /alias /bothelp /echo toggle help
/squelch /alias /verbose /echo toggle verbose
/squelch /alias /resetbuffs /echo toggle resetbuffs
/squelch /alias /clearpathing /echo toggle clearpathing
/squelch /alias /dohot /echo toggle dohot
/squelch /alias /doheal /echo toggle doheal
/squelch /alias /HealPets /echo toggle HealPets
/squelch /alias /DoRootParking /echo toggle DoRootParking
/squelch /alias /buff /echo toggle buff
/squelch /alias /DoMelee /echo toggle DoMelee
/squelch /alias /pause /echo toggle pause
/squelch /alias /CastATK /echo toggle CastATK
/squelch /alias /dofollow /echo toggle dofollow
/squelch /alias /ClearBuffees /echo toggle ClearBuffees
/declare M_Assist string outer
/declare OutDoors outer TRUE
/declare SpDuration outer
/declare SpCastTime outer
/declare SpDurBonus outer
/declare MainItem outer
/declare MeLoM outer FALSE
/declare TargetArray[4] string outer
/declare MobMaloed outer FALSE
/declare MobSlowed outer FALSE
/declare PetOn outer FALSE
/declare MobRooted outer FALSE
/declare MobDoTed outer FALSE
/declare CombatOn outer TRUE
/declare Exper float outer
/declare AAExp float outer
/varset Exper ${Me.Exp}
/varset AAExp ${Me.AAExp}
/squelch /declare ATKBuffed0 timer global 0
/squelch /declare ATKBuffed1 timer global 0
/squelch /declare ATKBuffed2 timer global 0
/squelch /declare ATKBuffed3 timer global 0
/squelch /declare ATKBuffed4 timer global 0
/squelch /declare ATKBuffed5 timer global 0
/declare CallManaTmr timer outer 0
/varset MobRooted FALSE
/varset MobMaloed FALSE
/varset MobSlowed FALSE
/varset PetOn FALSE
/varset MobDoTed FALSE
/varset MobRooted FALSE
/varset MobMaloed FALSE
/varset MobSlowed FALSE
/varset PetOn FALSE
/varset MobDoTed FALSE
/varset CombatOn FALSE
/varset TargetArray[1] NULL
/varset TargetArray[2] NULL
/varset TargetArray[3] NULL
/varset TargetArray[4] NULL
/declare GroupMemHoTTime timer outer 0
/declare GroupMemHoTTime0 timer outer 0
/declare GroupMemHoTTime1 timer outer 0
/declare GroupMemHoTTime2 timer outer 0
/declare GroupMemHoTTime3 timer outer 0
/declare GroupMemHoTTime4 timer outer 0
/declare GroupMemHoTTime5 timer outer 0
/declare GroupMemPetHoTTime0 timer outer 0
/declare GroupMemPetHoTTime1 timer outer 0
/declare GroupMemPetHoTTime2 timer outer 0
/declare GroupMemPetHoTTime3 timer outer 0
/declare GroupMemPetHoTTime4 timer outer 0
/declare GroupMemPetHoTTime5 timer outer 0
/declare DebuffTimers[10] int outer
/declare grpBuffTimer timer outer
/declare grpBuffTimesAttempted int outer
/declare j int local 1
/declare following string outer FALSE
/declare tookAction int outer 0
/declare WaitingOnSpell int outer 0
/declare didCanni int outer 0
/declare noMoveCount int outer 0
/declare underAttack timer outer 0
/declare underAttackBy int outer NULL
/declare LastSLAdded int outer
/squelch /declare SafeLocs[20,2] float global
/declare PrevLoc[2] float outer
/varset PrevLoc[1] 0
/varset PrevLoc[2] 0
/declare DotTime timer outer
/declare MoveToTmr timer outer
/declare DoingMove outer 0
/declare PrevMana outer 0
/squelch /declare otherBuffees[0] string global
/declare nukeTimer timer outer 0
/declare delayMoveTimer timer outer 0
/declare paused outer 0
/declare Healing[2] int outer
/declare castTimer timer outer
/declare healTimer timer outer
/declare buffsDone int outer
/declare theTarget int outer
/declare tmpBuff string local
/declare Sticking int outer 0
/for i 1 to 17
/varset ClassHeals${i}[4] 0
/next i
| /call MemSpells
| ############### Target a player as Main Assist
/if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) {
/echo Your target is NOT a player, make sure its a player character!
/endmacro
} else {
/varset M_Assist ${Target.CleanName}
/echo Assist set to ${M_Assist}
/assist off
}
:Main_Loop
/varset Healing[1] 0
/varset Healing[2] 0
/varset tookAction 0
/varset WaitingOnSpell 0
/if (${paused}) {
/doevents
/delay 5
/goto :Main_Loop
}
/call BounceBuffs
DEBUG_1 Checkpoint 1
|- Check for new events in chat etc etc...
/doevents
/if (!${MoveToTmr} && !${FollowFlag}) {
|/if (${TargetArray[4]} && ${Target.ID}==${TargetArray[4]}) /face fast
/if (${TargetArray[4]}) /target id ${TargetArray[4]}
/if (!${underAttack} && (${Me.PctMana} < 60 || !${CombatOn} || !${DoMelee} || !${buffsDone} || (${Target.ID} != ${TargetArray[4]} || ${Target.Distance} >= 100 || ${Target.Type.Equal[Corpse]}))) {
/if (!${Me.State.Equal[SIT]}) /sit on
/varset DoingMove 0
/attack off
} else {
/if (${Me.PctHPs} <= 30) /if (${Me.SpellReady[${SpellInvulnerability}]}) {
/call FullStop
/call cast "${SpellInvulnerability}" gem${SpellInvulnerabilityGem} 2s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/g I am INVULNERABLE - no heals for 18 seconds!
/varset underAttack 0
/sit on
/varset DoingMove 0
}
}
}
}
/if (${PrevLoc[1]}!=${Me.X} || ${PrevLoc[2]}!=${Me.Y}) /if (!${DoingMove}) {
/varset PrevLoc[1] ${Me.X}
/varset PrevLoc[2] ${Me.Y}
/call AddSafeLoc
}
DEBUG_1 Checkpoint 2
/call GetTarget
DEBUG_1 Checkpoint 3
/if (!${MoveToTmr} && !${FollowFlag}) /if (${DoingMove}) {
/call StickOff
}
/if (${FollowFlag}) {
/if (${CombatOn}) {
/varset FollowFlag 0
/echo Combat Detected. No longer following. Resuming program.
/keypress FORWARD
/goto :Main_Loop
}
/call StickOff
| -------- You need to add this call to your loop section in Main. ------------------------------------------
/call AdvPathPoll
/delay 1
/if (!${Me.Moving}) {
/if (${Me.State.Equal[Stand]} && !${underAttack}) /sit
/vardata noMoveCount Math.Calc[${noMoveCount}+1]
}
/if (${noMoveCount} > 30) {
/varset noMoveCount 0
/goto :Hold_Main
}
/goto :Main_Loop
}
|- Do we move?
:Hold_Main
/if (!${FollowFlag} && ${Me.Moving}) /goto :Main_Loop
|**
/if (${Me.State.Equal[Stand]} && !${MoveToTmr} && !${FollowFlag} && !${Me.Moving}) {
|/if (${TargetArray[4]} && ${Target.ID}==${TargetArray[4]}) /face fast
/if (!${underAttack} && (${Me.PctMana} < 60 || !${CombatOn} || !${DoMelee} || !${buffsDone})) {
/call StickOff
/sit on
/varset DoingMove 0
} else /if (${CombatOn}) /if (${DoMelee} && !(${DoRootParking} && ${underAttack})) {
/stand
/attack on
/call StickOn
}
}
**|
|- Let the group know Im LOM
/if (${Me.PctMana} <= 30 && ${CallManaTmr} <= 0) {
/if (${Verbose} || ${AnnounceLOM}) /gsay I'm LOM - ${Me.PctMana}% Mana
/varset CallManaTmr 900
}
|- Am I LoM?
/if (${Me.PctMana} < 25) /varset MeLoM TRUE
/if (${MeLoM}) /if (${Me.PctMana} > 35) /varset MeLoM FALSE
/if (${underAttackBy} && ${DoRootParking}) {
/target id ${underAttackBy}
/call FullStop
/call cast "${SpellRoot}" gem${SpellRootGem} 0 CheckForHeal
/if (${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_CANNOTSEE]} || ${Macro.Return.Equal[CAST_IMMUNE]}) {
/echo Rooted ${Target.CleanName}
}
/call AttemptAvoid
/goto :Main_Loop
}
DEBUG_1 Checkpoint 4
|- Wait until spells are ready it doesn't think it can cast slow yet if it's been chain healing
/if (!${Me.SpellReady[1]} && !${Me.SpellReady[2]} && !${Me.SpellReady[3]} && !${Me.SpellReady[4]}) /goto :Main_Loop
/if ((${trickyda}==1)&&(${Me.Buff[${SpellInvulnerability}].ID})) /call TrickyDA
DEBUG_1 Checkpoint 5
|- Group Heals
/call Check_grpHPs
/if (${tookAction}) /goto :Main_Loop
DEBUG_1 Checkpoint 6
/if (${HealPets}) /call Check_grpPetHPs
/if (${tookAction}) /goto :Main_Loop
DEBUG_1 Checkpoint 7
/if (${DoSlow}) /call CheckDebuffTimers
/if (${tookAction} && !${WaitingOnSpell}) /goto :Main_Loop
DEBUG_1 Checkpoint 8
/if (${DoSlow}) /call CheckSlowRadius
/if (${tookAction} && !${WaitingOnSpell}) /goto :Main_Loop
|/if (${Me.CurrentHPs} < ${Math.Calc[${Me.MaxHPs}-900]}) /call CheckMyHPs
|/if (${tookAction}) /goto :Main_Loop
/if (${CombatOn} && !${MobMaloed} && ${DoMalo} && ${Target.ID}==${TargetArray[4]}) {
/call DeBuff
/if (${tookAction}) /goto :Main_Loop
}
/if (${TargetArray[4]}) /target id ${TargetArray[4]}
/if (!${underAttack} && (${Me.PctMana} < 60 || !${CombatOn} || !${DoMelee} || !${buffsDone} || (${Target.ID} != ${TargetArray[4]} || ${Target.Distance} >= 100 || ${Target.Type.Equal[Corpse]}))) {
} else {
/if (!${Me.Mount.ID}) {
/varset tmpBuff "Speed of Vallon"
/if (${Me.Buff[${tmpBuff}].ID}) /nomodkey /notify BuffWindow BW_Buff${Int[${Math.Calc[${Me.Buff[${tmpBuff}].ID}-1]}]}_Button leftmouseup
/varset tmpBuff "Spiritual Vigor"
/if (${Me.Buff[${tmpBuff}].ID}) /nomodkey /notify BuffWindow BW_Buff${Int[${Math.Calc[${Me.Buff[${tmpBuff}].ID}-1]}]}_Button leftmouseup
/varset tmpBuff "Spirit of the Predator"
/if (${Me.Buff[${tmpBuff}].ID}) /nomodkey /notify BuffWindow BW_Buff${Int[${Math.Calc[${Me.Buff[${tmpBuff}].ID}-1]}]}_Button leftmouseup
/varset tmpBuff "Spirit of the Hunter"
/if (${Me.Buff[${tmpBuff}].ID}) /nomodkey /notify BuffWindow BW_Buff${Int[${Math.Calc[${Me.Buff[${tmpBuff}].ID}-1]}]}_Button leftmouseup
/if (!${Me.Buff["${SpellYaulp}"].ID}) /if (${Me.SpellReady["${SpellYaulp}"]}) {
/call FullStop
/call cast "${SpellYaulp}" gem${SpellYaulpGem}
}
}
/if (${CombatOn}) /if (${DoMelee} && !(${DoRootParking} && ${underAttack}) && (${Target.ID} == ${TargetArray[4]} && ${Target.Distance} < 100) && !${Target.Type.Equal[Corpse]}) {
/if (${Me.Mount.ID}) {
/dismount
}
/stand
/attack on
/call StickOn
}
}
}
|- Summon drogmore
/if ((!${CombatOn} || !${DoMelee} || (${DoMelee} && ${Me.PctMana} < 60) || !${buffsDone}) && (!${Me.Mount.ID} && ${OutDoors} && !${NoMount})) {
/call FullStop
/call cast "${Mount}" item 4s CheckForHeal
/goto :Main_Loop
}
/if (!${CombatOn} && ${Me.Hunger} < 1000) {
/call FullStop
/call cast "Abundant Food" gem8 0 CheckForHeal
/delay 1s
/autoinventory
/goto :Main_Loop
}
/if (!${CombatOn} && ${Me.Thirst} < 1000) {
/call FullStop
/call cast "Abundant Drink" gem8 0 CheckForHeal
/delay 1s
/autoinventory
/goto :Main_Loop
}
DEBUG_1 Checkpoint 9
/varset buffsDone 0
/if (${Me.PctMana} < 60) {
/goto :Main_Loop
}
/if (!${Me.Inventory[13].ID}) {
/call FullStop
/call cast "${HammerSpell}" gem${HammerSpellGem}
/sit on
/delay 2s
/autoinventory
}
DEBUG_1 Checkpoint 10
|- Group Buffs
/if (${Me.PctMana} > 40) /if (!${grpBuffTimer}) /if (!${CombatOn} || ${BuffInBattle} || (${CombatOn} && !(!${MobMaloed} && ${DoMalo}) && !(!${MobSlowed} && ${DoSlow}))) /if (${DoBuffs}) /call GrpBuffs
/if (${WaitingOnSpell}) /goto :FollowingBuffs
/if (${tookAction}) /goto :Main_Loop
DEBUG_1 Checkpoint 11
|- Single Buff !
/if (${Me.PctMana} > 40) /if (!${CombatOn} || ${BuffInBattle} || (${CombatOn} && !(!${MobMaloed} && ${DoMalo}) && !(!${MobSlowed} && ${DoSlow}))) /if (${DoSingleBuffs}) /call SingleBuffs
/if (${WaitingOnSpell}) /goto :FollowingBuffs
/if (${tookAction}) /goto :Main_Loop
DEBUG_1 Checkpoint 12
|- Pet
/varset buffsDone 1
|- Check for mobs and do combat stuff
/if (${CombatOn}) /call Combat
/if (${tookAction}) /goto :Main_Loop
:FollowingBuffs
DEBUG_1 Checkpoint 13
/goto :Main_Loop
/return
Sub MemSpells
/echo Memming spells. Hang on.
/if ( !${Me.Gem["${SpellCanni}"]} ) {
/memspell ${SpellCanniGem} "${SpellCanni}"
/delay 25
}
/if ( !${Me.Gem["${SpellSlow}"]} ) {
/memspell ${SpellSlowGem} "${SpellSlow}"
/delay 20
}
/if ( !${Me.Gem["${SpellATK}"]} ) {
/memspell ${SpellATKGem} "${SpellATK}"
/delay 20
}
/if ( !${Me.Gem["${SpellHeal}"]} ) {
/memspell ${SpellHealGem} "${SpellHeal}"
/delay 20
}
/if ( !${Me.Gem["${SpellHoT}"]} ) {
/memspell ${SpellHoTGem} "${SpellHoT}"
/delay 20
}
/if ( !${Me.Gem["${SpellDoT}"]} ) {
/memspell ${SpellDoTGem} "${SpellDoT}"
/delay 30
}
|/if ( ${Window[SpellBookWnd].Open} ) /windowstate SpellBookWnd close
/echo Spells are memmed.
/return
| ################# Ensures that the spell is memmed and ready to cast,
| # so we're not waiting for 5 minutes for the recast timer to tick down
Sub checkCanCast(string spellName,string spellGem)
/if ( ${Me.SpellReady[${spellName}]} ) /return 1
/if ( !${Spell[${spellName}].ID} ) {
/echo ${spellName} not found in spellbook!
}
/if ( !${Me.Gem[${spellName}]} ) {
:mem_spell
/if ( ${Cursor.ID} ) {
/autoinventory
/delay 5
/goto :mem_spell
}
/call StickOff
/memspell ${spellGem.Right[1]} "${spellName}"
/delay 6s ${Me.Gem[${spellName}]}
}
/varset tookAction 1
/varset WaitingOnSpell 1
/return 0
Sub FullStop
:WaitForStop
/call StickOff
/keypress forward
/keypress right
/keypress left
/keypress back
/keypress strafe_left
/keypress strafe_right
/delay 1
/if (${Me.Moving}) /goto :WaitForStop
/return
Sub StickOff
/if (${Sticking}) {
/keypress forward
/keypress right
/keypress left
/keypress back
/keypress strafe_left
/keypress strafe_right
/squelch /stick off
/squelch /moveto off
}
/varset Sticking 0
/return
Sub StickOn
/squelch /stick ${Closeness}% pin moveback
/varset Sticking 1
/return
| ################# Checks for expired slow/debuff timers
Sub CheckDebuffTimers
/declare i int local 1
/for i 1 to ${DebuffTimers.Size}
/if (${DebuffTimers[${i}]}) /if (!${Spawn[${DebuffTimers[${i}]}].ID} || ${Spawn[${DebuffTimers[${i}]}].State.Equal[DEAD]}) {
/if (${Defined[DebuffTimer${DebuffTimers[${i}]}]}) {
/deletevar DebuffTimer${DebuffTimers[${i}]}
}
/varset DebuffTimers[${i}] 0
}
/if (${DebuffTimers[${i}]}) /if (${Defined[DebuffTimer${DebuffTimers[${i}]}]}) /if (${DebuffTimer${DebuffTimers[${i}]}}<=6) {
/target id ${DebuffTimers[${i}]}
/call Slow
}
/next i
/return
Sub SetDebuffTimer(int id,timer t)
/declare i int local 1
/for i 1 to ${DebuffTimers.Size}
/if (!${DebuffTimers[${i}]}) {
/varset DebuffTimers[${i}] ${id}
/if (!${Defined[DebuffTimer${DebuffTimers[${i}]}]}) {
/declare DebuffTimer${DebuffTimers[${i}]} timer outer ${t}
} else {
/varset DebuffTimer${DebuffTimers[${i}]} ${t}
}
/return
}
/next i
/return
Sub CheckSlowRadius
/declare s string local
/declare sID int local
/declare i int local 1
/declare g int local 1
/declare h int local 1
/for i 1 to 10
:CheckSlowRadiusLoop1
/varset s ${Me.NearestSpawn[${i},npc].ID}
/if (${Spawn[${s}].Distance}>${Spell[${SpellSlow}].Range}) /next i
/if ((${DoMalo} && !${MobMaloed} && ${Spawn[${s}].ID}==${TargetArray[4]}) || (${Me.CurrentMana}<${Spell[${SpellSlow}].Mana})) /next i
/call CheckAttacking ${Spawn[${s}].ID}
/if (${Target.Type.Equal[NPC]} && ${Macro.Return}) {
/for g 0 to ${Math.Calc[${Group.Members}+${otherBuffees.Size}]}
/if (${g}<=${Group.Members}) {
/varset sID ${Group.Member[${g}].ID}
} else {
/varset sID ${Spawn[pc ${otherBuffees[${Math.Calc[${g}-${Group.Members}]}]}].ID}
}
/if (${Spawn[${sID}].ID}) /if (${Math.Distance[${Spawn[${s}].X},${Spawn[${s}].Y}:${Spawn[${sID}].X},${Spawn[${sID}].Y}]} <= 50) {
/for h 1 to ${DebuffTimers.Size}
/if (${DebuffTimers[${h}]}==${s}) {
/varset i ${Math.Calc[${i}+1]}
/if (${i}>10) /return
/goto :CheckSlowRadiusLoop1
| /next i
}
/next h
|/if (${LineOfSight[${Me.X},${Me.Y},${Me.Z}:${Spawn[${s}].X},${Spawn[${s}].Y},${Spawn[${s}].Z}]}) {
| /if (${LineOfSight[${Spawn[${sID}].X},${Spawn[${sID}].Y},${Spawn[${sID}].Z}:${Spawn[${s}].X},${Spawn[${s}].Y},${Spawn[${s}].Z}]}) {
/target id ${s}
/delay 5
|/if (${DoMalo} && ${Target.Type.Equal[NPC]}) {
| /call DeBuff
|}
/if (${DoSlow} && ${Target.Type.Equal[NPC]}) {
/call Slow
}
/if (${tookAction}) /return
| }
|}
}
/next g
}
/next i
/return
| ################# This will check what Main Assist has in target.
Sub GetTarget
/declare temp int inner 0
|/squelch /target clear
/assist ${M_Assist}
/delay 10
|${Target.ID}
/if (${Target.ID} != ${TargetArray[4]} || ${Target.Distance} > 100) /call StickOff
/if (${Target.Type.Equal[NPC]}) /if (${Target.Distance}<=${AssistAt} && ${Target.ID}!=${TargetArray[4]} && ${Target.PctHPs}<=${CombatAt}) {
/varset TargetArray[1] ${Target.CleanName}
/varset TargetArray[2] ${Target.Level}
/varset TargetArray[3] ${Target.Name}
/varset TargetArray[4] ${Target.ID}
/varset CombatOn TRUE
/varset MobRooted FALSE
/varset MobMaloed FALSE
/varset MobSlowed FALSE
/varset PetOn FALSE
/varset MobDoTed FALSE
/varset DotTime 0
}
/return
| ################### Check target and do stuff like slow, dot, pet attack etc.
Sub Combat
/target id ${TargetArray[4]}
/delay 3 ${Target.ID}==${TargetArray[4]}
DEBUG_1 Checkpoint 12.1
/if (${Target.ID}==${TargetArray[4]}) /if (${Target.PctHPs}<=${CombatAt} && ${Target.Type.Equal[NPC]}) {
/if (${DoSlow}) /if (${Target.Distance}>${Spell[${SpellSlow}].Range}) /call AttemptAvoid
}
DEBUG_1 Checkpoint 12.2
/if (!(${Defined[DebuffTimer${Target.ID}]} && ${DebuffTimer${Target.ID}} > 60) && ${DoSlow}) /call SetDebuffTimer ${underAttackBy} 0
DEBUG_1 Checkpoint 12.3
| /if (${CombatOn} && !${MobSlowed} && ${DoSlow} && ${Target.ID}==${TargetArray[4]}) {
| /call Slow
| /return
| }
/if (${CombatOn} && !${PetOn} && ${Target.ID}==${TargetArray[4]}) {
/pet back off
/pet attack
/varset PetOn TRUE
}
DEBUG_1 Checkpoint 12.4
/if (${CombatOn} && ${DoDoT}) /if (!${underAttack}) /if ((${Defined[DebuffTimer${Target.ID}]} && ${DebuffTimer${Target.ID}} > 60) || !${DoSlow}) /if (${Defined[DebuffTimer${Target.ID}]} && ${DebuffTimer${Target.ID}} > 0) /if (${DotTime}<=0) /if (${Me.PctMana} > 65) /if (${Target.PctHPs}<=${CastDoTat} && ${Target.PctHPs}>=${MinDoTat}) {
DEBUG_1 Checkpoint 12.5
/call checkCanCast "${SpellDoT}" gem${SpellDoTGem}
/if (!${Macro.Return}) /return
/call FullStop
/call cast "${SpellDoT}" gem${SpellDoTGem} 0 CheckForHeal
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset DotTime ${Math.Calc[${Spell["${SpellDoT}"].Duration}*60-${Spell["${SpellDoT}"].CastTime}*10]}
} else /if (${Macro.Return.Equal[CAST_OUTOFRANGE]}) {
/call AttemptAvoid
} else {
/varset DotTime 50
}
/varset tookAction 1
/return
}
DEBUG_1 Checkpoint 12.6
/if (!${underAttack}) /if ((${Defined[DebuffTimer${Target.ID}]} && ${DebuffTimer${Target.ID}} > 60) || !${DoSlow}) /if (${Me.PctMana} > ${MinManaForNuke}) /if (!${nukeTimer}) /if (${CombatOn} && ${DoNuke} && ${Target.PctHPs}<=${NukeAt} && ${Target.PctHPs}>=${MinNukeat}) {
DEBUG_1 Checkpoint 12.7
/call checkCanCast "${SpellNuke}" gem${SpellNukeGem}
/if (!${Macro.Return}) /return
/call FullStop
/call cast "${SpellNuke}" gem${SpellNukeGem} 0 CheckForHeal
/if (${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_RESISTED]}) {
/varset nukeTimer ${DelayBetweenNukes}
} else /if (${Macro.Return.Equal[CAST_OUTOFRANGE]}) {
/call AttemptAvoid
}
/varset tookAction 1
/return
}
DEBUG_1 Checkpoint 12.8
/if ((${Defined[DebuffTimer${Target.ID}]} && ${DebuffTimer${Target.ID}} > 0) || !${DoSlow}) /if (!${MobRooted} && ${CombatOn} && ${DoRoot} && ${Target.PctHPs}<=${Rootat}) {
DEBUG_1 Checkpoint 12.9
/call checkCanCast "${SpellRoot}" gem${SpellRootGem}
/if (!${Macro.Return}) /return
/call FullStop
/call cast "${SpellRoot}" gem${SpellRootGem} 0 CheckForHeal
/varset tookAction 1
/varset MobRooted TRUE
}
DEBUG_1 Checkpoint 12.10
|- EndCombat
/target id ${TargetArray[4]}
/if (!${Target.Name.Equal[${TargetArray[3]}]} || !${Target.ID}) {
/varset MobRooted FALSE
/varset MobMaloed FALSE
/varset MobSlowed FALSE
/varset PetOn FALSE
/varset MobDoTed FALSE
/varset CombatOn FALSE
/varset DotTime 0
/varset TargetArray[1] NULL
/varset TargetArray[2] NULL
/varset TargetArray[3] NULL
/varset TargetArray[4] NULL
/varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]}
/varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]}
| /echo EXP: ${Exper}:${Me.PctExp}% - AAXP: ${AAExp}:${Me.PctAAExp}% - ${Math.Calc[${Macro.RunTime}/60]} minutes
| /popup EXP: ${Exper}:${Me.PctExp}% - AAXP: ${AAExp}:${Me.PctAAExp}% - ${Math.Calc[${Macro.RunTime}/60]} minutes
| /varset Exper ${Me.PctExp}
| /varset AAExp ${Me.PctAAExp}
/if (!${following.Equal[FALSE]}) {
/echo Combat over. Resume following ${following}.
/call FollowFunction "${following}"
}
}
/return
Sub DeBuff
:DeBuff_Loop
/if (${Target.PctHPs}<=${CombatAt} && ${Target.Type.Equal[NPC]}) {
/if (${Me.CurrentMana}<${Spell[${SpellDeBuff}].Mana}) {
|/echo *** Shid ! I don't have mana to Malo %T
} else {
/call checkCanCast "${SpellDeBuff}" gem${SpellDeBuffGem}
/if (!${Macro.Return}) /return
/call FullStop
/call cast "${SpellDeBuff}" gem${SpellDeBuffGem} 6s
|/varset underAttack 80
/varset tookAction 1
/if (!${Macro.Return.Equal["CAST_SUCCESS"]}) {
/return
} else /if (${Macro.Return.Equal[CAST_OUTOFRANGE]}) {
/call AttemptAvoid
}
/varset MobMaloed TRUE
}
}
/return
Sub Slow
/if (${DoMalo} && !${MobMaloed} && ${Target.ID}==${TargetArray[4]}) /return
|/if (${Target.PctHPs}<=${CombatAt} && ${Target.Type.Equal[NPC]}) {
/if (${Me.CurrentMana}<${Spell[${SpellSlow}].Mana}) {
|/echo Shid ! I don't have mana to Malo %T
} else {
:Slow_Loop
/call checkCanCast "${SpellSlow}" gem${SpellSlowGem}
/if (!${Macro.Return}) /return
/call FullStop
/call cast "${SpellSlow}" gem${SpellSlowGem} 6s
/varset underAttack 80
/varset tookAction 1
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /return
/if (${Macro.Return.Equal["CAST_IMMUNE"]}) {
|/if (${Verbose})
|/gsay < %T > is IMMUNE to slow !
/call SetDebuffTimer ${Target.ID} ${Math.Calc[${Spell[${SpellSlow}].Duration}*6000-100]}
/varset MobSlowed TRUE
}
/if (${Macro.Return.Equal["CAST_RESISTED"]}) {
/if (!${FastSlow}) {
|/if (${Verbose})
|/gsay < %T > RESISTED slow ! Trying again...
/call SetDebuffTimer ${Target.ID} ${Math.Calc[${Spell[${SpellSlow}].Duration}*6000-100]}
/return
}
/varset MobSlowed TRUE
}
/if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
|/if (${Verbose})
|/gsay < %T > is SLOWED
/varset MobSlowed TRUE
/call SetDebuffTimer ${Target.ID} ${Math.Calc[${Spell[${SpellSlow}].Duration}*60-100]}
} else /if (${Macro.Return.Equal[CAST_OUTOFRANGE]} || ${Macro.Return.Equal[CAST_CANNOTSEE]}) {
/call AttemptAvoid ${Target.ID}
}
/if (${Macro.Return.Equal["CAST_CANNOTSEE"]}) {
/call SetDebuffTimer ${Target.ID} 150
/echo Cannot See: ${Target.CleanName}
}
}
|}
/return