• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

chanty macro (1 Viewer)

geostone

New member
Joined
Feb 6, 2005
RedCents
anyone got a chanty macro that works? ive gotten some but none seem to work well. id like it to auto slow, crowd control tash and nuke. maybe that will give you something to work on sidd
 
Rich (BB code):
| autoenc.mac 
| By Rusty~ 
| Last update 10/27/2004 
| 
| /macro autoenc [ma name][sa name][radius #][minhp #] 
| 
| Description: 
| Will assist the person set as main assist. If the main assist dies, it will assist the person 
| set as secondary assist if there is one. Once a target is aquired, and is varified as being aggro 
| it will then wait till the mob is engaged by the tank. Then it will wait till mob is under the spcified hp, 
| or the specified time has expired since the tank has engaged, and it will tash, slow, and nuke, if enabled. 
| Will mez any adds within the set radius, and debuff them if it's enabled. 
| This will also keep self buffs up, and buff people on request (with the spells specified in ini). 
| 
| 
| After running the macro for the first time, you should open the ini file generated (Auto_Yourname.ini) 
| Most of the options are self explanatory 
| Here's an example how the ini based buffs work: 
| 
| BuffList1=c6 
| BuffName1=clairvoyance 
| BuffType1=gem4 
| 
| BuffList is a list of words (or phrases) that will trigger the buff, separated by commas 
| BuffName is the name of the spell or item 
| BuffType is either item, gem1-9, or alt, for items, spells, or aa abilities respectively 
| 
| BuffName can also be a "shortcut" name. Shortcut names will cast different buffs depending on certain 
| circumstances. For example, putting "c6" as the BuffName, will cast Voice of Clairvoyance if it's up, 
| or else it will cast Clairvoyance. Following is a list of shortcut buffs and what they do: 
| 
| c6 - Will cast Voice of Clairvoyance if you have no C6 on and are in a group, else will cast Clairvoyance 
| c5 - Voice of Quellious 
| c4 - Will use C4 pants if you have them, else will cast Tranquility 
| c3 - Will use C3 wand if you have it, else will cast Koadic's Endless Intellect 
| c2 - Clairty II 
| c1 - Will cast Rod of Infinite thought if you have, else will cast Clarity 
| haste - If you have group haste memmed (spell name specified in ini), it will cast group haste 
| else it will cast single haste. If you are under 60% mana and have elemental legs 
| it will cast them instead of single or group haste spells 
| shissar - Will cast epic 1.0 
| 
| 
| 
| For each self buff and clicky buff, there's a place to put all the buffs that don't stack with it: 
| 
| Clicky1=Velium Coldain Insignia Ring 
| ClickyNoStack1=Call of Earth,Call of the Rathe,Guard of the Earth,Illusion Fire Elemental 
| 
| *note* To mem spells after death, save a spellset, and put the name of it in your ini under SpellSet 
| 
| 
|----------------------------------------------------------------------------------------------------------+ 
| slash commands: | 
|----------------------------------------------------------------------------------------------------------+ 
| /setma name - sets main assist | 
| /setsa name - sets secondary assist | 
| /buff # - mode 1 buffs all the time, self buff and tells | 
| - mode 2 does self buffs and tells when you have no target | 
| - mode 3 does self buffs only, all the time | 
| - mode 4 does self buffs only, only when you have no target | 
| /debuff on|off - turns auto debuffing on or off | 
| /mez on|off - turns auto mezzing on or off | 
| /mount on|off - turns auto mounting on or off | 
| /nukedelay # - sets the minimum amount of deciseconds between nukes | 
| /engagedelay # - amount of deciseconds before you start nuking mob | 
| /anchor # - sets the leash length when using an anchor | 
| /minhp # - sets the minimum hp % that you'll begin nuking at | 
| /cleanup on|off - turns on auto looting of any droppable loot | 
| /checknamed on|off - turns alerts on for named in your current zone | 
| /runehp # - sets the health % at which you'll cast your rune item or spell| 
| /nukemode 0, 1, 2 - mode 0 turns nukes off completely | 
| - mode 1 uses robe if enabled, and slows nukes if low mana | 
| - mode 2 chain nukes, with only delay being the set /nukedelay | 
| /manarobe mode #|min #|max # - mode 1 uses manrobe all the time | 
| - mode 2 uses your set % to start robing | 
| /radius # - sets the distance at which you'll engage the main assist's | 
| target | 
|----------------------------------------------------------------------------------------------------------+ 

#include spell_routines.inc 
#include gen_routines.inc 
#include move.inc 

#turbo 40 

#chat group 
#chat tell 
#chat chat 
#chat say 

#event AutoStun "[MQ2] AutoStun #1#" 
#event Gate "|${Target.DisplayName}| begins to cast the gate spell#*#" 
#event Mez "[MQ2] mez" 
#event RageOff "#*#is no longer enraged#*#" 
#event RageOn "#*#has become ENRAGED#*#" 
#event Ranger "[MQ2] Ranger" 


Sub Main 
/call GeneralDeclares 

/call DeclareIniVar mainAssist string Settings 
/call DeclareIniVar secondAssist string Settings 
/call DeclareIniVar minRadius int Settings 150 /radius 
/call DeclareIniVar engageDelay int Settings 55 /engagedelay 
/call DeclareIniVar minHP int Settings 95 /minhp 
/call DeclareIniVar autoBuff int Settings 1 /buff 
/call DeclareIniVar useMount int Settings 0 /mount 
/call DeclareIniVar useMez int Settings 1 /mez 
/call DeclareIniVar useDebuff int Settings 1 /debuff 
/call DeclareIniVar nukeMode int Settings 1 /nuke 
/call DeclareIniVar useCharm int Settings 0 /charm 
/call DeclareIniVar useTashFocus int Settings 0 /tash 
/call DeclareIniVar useDPS int Settings 0 /dps 
/call DeclareIniVar hasteGroup int Settings 0 /haste 
/call DeclareIniVar privateChannel string Settings 
/call DeclareIniVar channelAnnounce int Settings 1 
/call DeclareIniVar noInterrupt int Settings 0 
/call DeclareIniVar useManaStone int Settings 0 /manastone 
/call DeclareIniVar checkNamed int Settings 0 /checknamed 
/call DeclareIniVar noInvis int Settings 1 
/call DeclareIniVar useManaRobe int Settings 1 
/call DeclareIniVar manaRobeMode int Settings 1 
/call DeclareIniVar manaRobeMinMana int Settings 70 
/call DeclareIniVar manaRobeMaxMana int Settings 90 
/call DeclareIniVar nukeMana int Settings 50 /nukemana 
/call DeclareIniVar nukeDelay int Settings 0 /nukedelay 
/call DeclareIniVar nukeMode int Settings 1 /nukemode 
/call DeclareIniVar ignoreList string Settings 
/call DeclareIniVar runeHP int Settings 70 
/call DeclareIniVar cleanUp int Settings 0 /cleanup 
/call DeclareIniVar spellSet string Settings "default raid" 
/call DeclareIniVar mezDuration string Settings 500 
/call DeclareIniVar tashDuration string Settings 14m 
/call DeclareIniVar slowDuration string Settings 2100 
/call DeclareIniVar autoAnnounce string Settings 1 
/call DeclareIniVar announceTells string Settings 0 /announcetells 
/call DeclareIniVar rodBitch string Settings 
/call DeclareIniVar noKnockBack string Settings 0 /usezoom 
/call DeclareIniVar usePet int Settings 1 /companion 

/call DeclareIniVar nuke1 string Spells "Psychosis" 
/call DeclareIniVar nuke2 string Spells "Insanity" 
/call DeclareIniVar mezSpell string Spells "Bliss" 
/call DeclareIniVar tashSpell string Spells "Howl of Tashan" 
/call DeclareIniVar slowSpell string Spells "Serpent of Vindication" 
/call DeclareIniVar slowType string Spells "item" 
/call DeclareIniVar charmSpell string Spells "Command of Druzzil" 
/call DeclareIniVar aeMezSpell string Spells "Bliss of the Nihil" 
/call DeclareIniVar shielding string spells "Mystic Shield" 
/call DeclareIniVar singleHasteSpell string Spells "Speed of Salik" 
/call DeclareIniVar groupHasteSpell string Spells "Hastening of Salik" 
/call DeclareIniVar selfRune string Spells "Ethereal Rune" 
/call DeclareIniVar petSpell string Spells "Salik's Animation" 
/call DeclareIniVar selfBuff1 string Spells " " 
/call DeclareIniVar selfBuffNoStack1 string Spells " " 
/call DeclareIniVar selfBuff2 string Spells " " 
/call DeclareIniVar selfBuffNoStack2 string Spells " " 
/call DeclareIniVar selfBuff3 string Spells " " 
/call DeclareIniVar selfBuffNoStack3 string Spells " " 
/call DeclareIniVar selfBuff4 string Spells " " 
/call DeclareIniVar selfBuffNoStack4 string Spells " " 
/call DeclareIniVar selfBuff5 string Spells " " 
/call DeclareIniVar selfBuffNoStack5 string Spells " " 
/call DeclareIniVar buffList1 string Spells "c6,crack,clarity,c5,c" 
/call DeclareIniVar buffName1 string Spells "c6" 
/call DeclareIniVar buffType1 string Spells "gem4" 
/call DeclareIniVar buffList2 string Spells "haste,sov,salik,speed,pants" 
/call DeclareIniVar buffName2 string Spells "haste" 
/call DeclareIniVar buffType2 string Spells "gem4" 
/call DeclareIniVar buffList3 string Spells "mr,grm,god" 
/call DeclareIniVar buffName3 string Spells "guard of druzzil" 
/call DeclareIniVar buffType3 string Spells "gem4" 
/call DeclareIniVar buffList4 string Spells "shissar,snake" 
/call DeclareIniVar buffName4 string Spells "staff of the serpent" 
/call DeclareIniVar buffType4 string Spells "item" 
/call DeclareIniVar buffList5 string Spells "c3" 
/call DeclareIniVar buffName5 string Spells "koadic's endless intellect" 
/call DeclareIniVar buffType5 string Spells "gem4" 

/call DeclareIniVar hpRobe string Items "${InvSlot[chest].Item.Name}" 
/call DeclareIniVar clicky1 string Items "Girdle of Efficiency" 
/call DeclareIniVar clickyNoStack1 string Items " " 
/call DeclareIniVar clicky2 string Items "Veil of the Inferno" 
/call DeclareIniVar clickyNoStack2 string Items " " 
/call DeclareIniVar clicky3 string Items " " 
/call DeclareIniVar clickyNoStack3 string Items " " 
/call DeclareIniVar clicky4 string Items " " 
/call DeclareIniVar clickyNoStack4 string Items " " 
/call DeclareIniVar clicky5 string Items " " 
/call DeclareIniVar clickyNoStack5 string Items " " 
/call DeclareIniVar useFood int Items 1 
/call DeclareIniVar statFood string Items "Bristlebanes Party Platter" 
/call DeclareIniVar food1 string Items "Halas 10lb Meat Pie" 
/call DeclareIniVar food2 string Items "Misty Thicket Picnic" 
/call DeclareIniVar food3 string Items "Holy Cake" 
/call DeclareIniVar food4 string Items " " 
/call DeclareIniVar food5 string Items " " 
/call DeclareIniVar meleeWep string Items "Staff of the Silent Star" 
/call DeclareIniVar invisItem string Items "Opaline Charm" 
/call DeclareIniVar dispellItem string Items "Wand of the Vortex" 
/call DeclareIniVar tashFocusItem string Items "Sharp Ended Broken Lever" 
/call DeclareIniVar normalMainhand string Items "${InvSlot[mainhand].Item.Name}" 


/squelch /custombind add ma 
/squelch /custombind add sa 
/squelch /alias /anchor /echo SetAnchor 
/squelch /alias /manarobe /echo Mana Robe 
/squelch /alias /setma /custombind set ma /assist 
/squelch /alias /setsa /custombind set sa /assist 

/declare i int local 
/declare j int local 
/declare oldTarget int local 
/declare tempTimer timer local 0 
/varset castSub CheckForAdds 
:check_params 
/if ( ${Defined[Param${i}]} ) { 
/if ( ${Param${i}.Equal[ma]} ) { 
/varcalc i ${i}+1 
/call SetIniVar mainAssist Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[sa]} ) { 
/varcalc i ${i}+1 
/call SetIniVar secondAssist Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[radius]} ) { 
/varcalc i ${i}+1 
/call SetIniVar minRadius Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[minhp]} ) { 
/varcalc i ${i}+1 
/call SetIniVar minHP Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[buff]} ) { 
/call SetIniVar autoBuff Settings 1 
} else /if ( ${Param${i}.Equal[nobuff]} ) { 
/call SetIniVar autoBuff Settings 0 
} else /if ( ${Param${i}.Equal[nuke]} ) { 
/call SetIniVar nukeMode Settings 1 
} else /if ( ${Param${i}.Equal[nonuke]} ) { 
/call SetIniVar nukeMode Settings 0 
} else /if ( ${Param${i}.Equal[mez]} ) { 
/call SetIniVar useMez Settings 1 
} else /if ( ${Param${i}.Equal[nomez]} ) { 
/call SetIniVar useMez Settings 0 
} else /if ( ${Param${i}.Equal[debuff]} ) { 
/call SetIniVar useDebuff Settings 1 
} else /if ( ${Param${i}.Equal[nodebuff]} ) { 
/call SetIniVar useDebuff Settings 0 
} 
/varcalc i ${i}+1 
/goto :check_params 
} 
/if ( !${Me.Gem[${mezSpell}]} ) { 
/if ( ${Me.Gem[bliss]} ) { 
/call SetIniVar mezSpell Spells Bliss 
} else /if ( ${Me.Gem[sleep]} ) { 
/call SetIniVar mezSpell Spells Sleep 
} else /if ( ${Me.Gem[apathy]} ) { 
/call SetIniVar mezSpell Spells Apathy 
} else /if ( ${Me.Gem[glamour of kintaz]} ) { 
/call SetIniVar mezSpell Spells "Glamour of Kintaz" 
} else /if ( ${Me.Gem[felicity]} ) { 
/call SetIniVar mezSpell Spells Felicity 
} else /if ( ${Me.Gem[euphoria]} ) { 
/call SetIniVar mezSpell Spells Euphoria 
} 
} 

/if ( !${InvSlot[chest].Item.Name.Equal[mana robe]} ) /call SetIniVar hpRobe Items "${InvSlot[chest].Item.Name}" 

/call SwapStatFood 1 

/squelch /alert clear 6 

/if ( ${autoAnnounce} ) /announce on 

/echo AutoEnc Mode Activated 
/if ( ${nukeMode} || ${useDebuff} || ${useMez} ) { 
/echo Main Assist: ${mainAssist} 
/if ( ${Bool[${secondAssist}]} ) /echo Secondary Assist: ${secondAssist} (if ${mainAssist} dies) 
} 
/if ( ${nukeMode} ) /echo Nuke Mode: ${nukeMode} 
/if ( ${useDebuff} ) /echo Auto Debuffs Enabled 
/if ( ${useMez} ) { 
/echo Auto Mez adds within a radius of ${minRadius} 
/if ( !${Me.Gem[${mezSpell}]} ) /memspell 7 "${mezSpell}" 
} 
/if ( ${autoBuff} ) /echo AutoBuff Mode: ${autoBuff} 
/if ( ${useMount} ) /echo Mount is enabled. 
/if ( ${manaRobeMode} ) /echo ManaRobe Mode: ${manaRobeMode} 
:wait_for_target 
/if ( ${nukeMode} || ${useDebuff} || ${useMez} ) /echo Waiting for target... 
/varset newAdds 0 
/varset validTarget 0 
:wait_for_target2 
/if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist} radius ${minRadius}].ID} ) ) { 
/varset mainTank ${secondAssist} 
} else { 
/varset mainTank ${mainAssist} 
} 
/if ( !${Corpse.Open} && ${Spawn[${mainAssist}].NearestSpawn[npc radius ${Math.Calc[${minRadius}*2]}].ID} && ( ${nukeMode} || ${useDebuff} || ${useMez} ) ) { 
/if ( ${Me.Casting.ID} ) /call WaitCast 
/assist ${mainTank} 
/call ManaRobe 
/varset oldTarget ${Target.ID} 
/varset tempTimer 5 
/call CheckRune 100 
:wait_for_assist1 
/call CheckTarget 
/if ( ${tempTimer} && !${validTarget} ) /goto :wait_for_assist1 
} 
/call CheckTarget 
/if ( !${validTarget} || ( !${nukeMode} && !${useDebuff} && !${useMez} ) ) { 
/doevents 
/call CheckBuffs 
/call CheckPet 
/call CheckRune ${runeHP} 
/if ( ${useAnchor} ) /call CheckLoc 
/call ManaRobe 
/goto :wait_for_target2 
} 
/echo Target Aquired >> ${Target.DisplayName} << 
/varset petAttacking false 
/varset engaged 0 
/varset nukeWaitTimer 0 
/varset mobID ${Target.ID} 
/varset mobHPStart ${Target.PctHPs} 
/call UpdateMobList 
/call AddToList mobList ${mobID} 
/if ( ${Defined[mezTimer${mobID}]} ) /deletevar mezTimer${mobID} 
/declare mezTimer${mobID} int outer -1 
/varset newAdds 0 
/varset nukeWaitTimer 0 
/varset fightStartTime 0 
/varset totalNonMeleeDmg 0 
/varset totalMeleeDmg 0 
/if ( ${Defined[waitTimer${mobID}]} ) /deletevar waitTimer${mobID} 
/declare waitTimer${mobID} int outer -1 
:check_add_loop 
/if ( ( ${Target.PctHPs}>${minHP} && ${waitTimer${mobID}} ) || !${assistWaitTimer} ) { 
/if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist} radius ${minRadius}].ID} ) ) { 
/varset mainTank ${secondAssist} 
} else { 
/varset mainTank ${mainAssist} 
} 
/if ( ${Me.Casting.ID} ) /call WaitCast 
/assist ${mainTank} 
/if ( ${useManaRobe} && ( ${refreshTime} || ${nukeWaiTimer} || !${nukeMode} ) ) /call ManaRobe 
/varset tempTimer 8 
:wait_for_assist 
/call CheckForAdds 
/doevents Timer 
/if ( ${tempTimer} && ${Target.ID}==${mobID} ) /goto :wait_for_assist 
/if ( ${Target.ID} && ${Target.ID}!=${mobID} ) { 
/if ( ${Defined[mezTimer${mobID}]} ) /deletevar mezTimer${mobID} 
/call DeleteFromList mobList ${mob} 
/goto :wait_for_target 
} 
/varset assistWaitTimer 5s 
} 
/varset addIndex 1 
:check_add_loop2 
/call CheckForAdds 
/if ( ${addIndex}>1 ) /goto :check_add_loop2 
/if ( ${newAdds} ) /call MezAdds 
/call CheckPet 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Type.Equal[pet]} ) /goto :mob_dead 
/if ( !${nukeMode} && !${useDebuff} && !${useMez} ) /goto :wait_for_target 
/target id ${mobID} 
/if ( ( ${Target.PctHPs}<${mobHPStart} ) && ${Spawn[pc ${mainTank}].NearestSpawn[radius ${Math.Calc[${Spawn[${mobID}].MaxRangeTo}+10]} id ${mobID}].ID} && ${waitTimer${mobID}}<0 && ${Spawn[${mobID}].Distance3D}<=${minRadius} ) { 
/deletevar waitTimer${mobID} 
/declare waitTimer${mobID} timer outer ${engageDelay} 
} 
/doevents 
/target id ${mobID} 

/if ( ${Target.PctHPs}>${minHP} && ${waitTimer${mobID}} ) /goto :check_add_loop 
/if ( ${newAdds} ) /call MezAdds 
/if ( !${engaged} ) { 
/varset engaged 1 
/echo Engaging >> ${Target.DisplayName} << 
} 
/if ( ${Me.Pet.ID} && !${petAttacking} && !${Me.PetBuff[word of worell]} ) { 
/pet attack 
/varset petAttacking true 
} 
/call UpdateMobList 
/doevents Timer 
/if ( ${useDebuff} && !${newAdds} ) /call DebuffMobs 
/if ( ${Spawn[${mobID}].Type.Equal[NPC]} || ( !${Spawn[${mobID}].Master.Type.Equal[PC]} && ${Spawn[${mobID}].Type.Equal[pet]} ) ) { 
/target id ${mobID} 
} else { 
/goto :mob_dead 
} 
/if ( !${newAdds} && ( ${slowTimer${mobID}}>1 || ${slowTimer${mobID}}<0 || !${useDebuff} ) ) { 
/call CheckRune 100 
/call CheckBuffs 
/target id ${mobID} 
/if ( ${Target.Type.Equal[npc]} && ( ${Target.Class.CanCast} || ${Zone.ID}>=300 ) ) { 
/if ( ${Me.Gem[Scryer's Trespass]} && !${spellRecastTimer${Me.Gem[Scryer's Trespass]}} ) /call Cast "Scryer's Trespass" spell 0 CheckForAdds 
/if ( ${Me.Gem[Theft of Thought]} && !${spellRecastTimer${Me.Gem[Theft of Thought]}} ) /call Cast "Theft of Thought" spell 0 CheckForAdds 
} 
/target id ${mobID} 
/if ( ${refreshTime}<20 && ( ${Target.PctHPs}<${mobHPStart} || ${minHP}==100 ) && !${newAdds} && ${Target.LineOfSight} && !${Me.TargetOfTarget.Name.Equal[${Me.Name}]} && !${nukeWaitTimer} && ${nukeMode} && ( ${Me.PctMana}>=${nukeMana} || ${nukeMode}==2 ) && ( ${Target.Type.Equal[NPC]} || ${Target.Type.Equal[pet]} ) ) { 
/if ( !${fightStartTime} ) /varset fightStartTime ${MacroQuest.Running} 
/call Cast "${nuke1}" gem1 0 CheckForAdds 
/if ( ${Macro.Return.Equal[CAST_NOTREADY]} ) { 
/if ( ${Me.Gem[${nuke2}]} ) { 
/call Cast "${nuke2}" gem2 0 CheckForAdds 
} else { 
/call ManaRobe 
} 
} 
/if ( ${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_RESISTED]} ) { 
/if ( ${nukeMode}==1 ) { 
/varcalc nukeWaitMod 5*(90 - ${Me.PctMana}) 
} else { 
/varset nukeWaitMod 0 
} 
/if ( ${nukeDelay}>${nukeWaitMod} ) { 
/varset nukeWaitTimer ${nukeDelay} 
} else { 
/varset nukeWaitTimer ${nukeWaitMod} 
} 
} 
} else { 
/call ManaRobe 
} 
} 
/goto :check_add_loop 
:mob_dead 
/call UpdateMobList 
/echo Target Dead! 
/doevents 
/if ( ${useDPS} ) { 
/call DisplayDPS 
} 
/goto :wait_for_target
Sub CheckForAdds 
/if ( ${Me.Casting.ID} ) { 
/doevents gate 
/doevents rageon 
/doevents rageoff 
/doevents uquakey 
/doevents setvar 
/if ( ${castEndTime}>5 ) /doevents chat 
/if ( !${castReturn.Equal[CAST_CANCELLED]} && ${castEndTime} && ${castEndTime}<=5 && ( !${startCastingLoc.Arg[1].Equal[${Me.X}]} || !${startCastingLoc.Arg[2].Equal[${Me.Y}]} ) ) { 
/keypress forward 
/keypress left 
/squelch /zoom ${startCastingLoc} 
} 
/if ( ${useMez} && ${newAdds} && !${Me.Casting.Name.Equal[${mezSpell}]} && !${Spawn[${petID}].Type.Equal[NPC]} ) /call Interrupt 
} 
/if ( ${Target.ID}==${mobID} && ${Me.TargetOfTarget.Type.Equal[pc]} && ${Me.TargetOfTarget.Class.Name.Equal[cleric]} && ${Me.TargetOfTarget.PctHPs}<=50 && ${Me.AltAbilityReady[soothing words]} ) { 
/if ( ${Me.TargetOfTarget.ID}==${Group[1].ID} || ${Me.TargetOfTarget.ID}==${Group[2].ID} || ${Me.TargetOfTarget.ID}==${Group[3].ID} || ${Me.TargetOfTarget.ID}==${Group[4].ID} || ${Me.TargetOfTarget.ID}==${Group[5].ID} ) { 
/if ( ${Me.Casting.ID} && !${Me.Casting.Name.Equal[${mezSpell}]} && !${Spawn[${petID}].Type.Equal[NPC]} ) /call Interrupt 
/call Cast "soothing words" alt 
} 
} 

/if ( ${useCharm} ) /call CheckPet2 
:check_add_loop 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} && !${petOff} ) { 
/varset addIndex 1 
/varset newAdds 0 
/return 
} 
/if ( ${petCheck} ) { 
/varset addID ${NearestSpawn[${addIndex},npc radius ${minRadius}].ID} 
} else { 
/varset addID ${NearestSpawn[${addIndex},pet radius ${minRadius}].ID} 
} 
/if ( ${addID} ) { 
/if ( ( ${mezTimer${addID}}<=${Math.Calc[${mezDuration}-50]} || !${mezTimer${addID}} ) && ${Spawn[${addID}].Distance3D}<=${minRadius} && ${addID}!=${petID} && ${Spawn[${addID}].LineOfSight} && ${aggroAnim.Find[|${Spawn[${addID}].Animation}|]} && ${mezTimer${addID}}!=-1 && ( ( !${Spawn[${addID}].Master.Type.Equal[PC]} && ${Spawn[${addID}].Type.Equal[pet]} ) || ( ${Spawn[${addID}].Type.Equal[NPC]} && ${addID}!=${Spawn[${mobID}].Master.ID} ) ) ) { 
/call AddToList addList ${addID} 
/call AddToList mobList ${addID} 
/if ( ${Macro.Return.Equal[1]} ) { 
/if ( !${Defined[waitTimer${addID}]} ) /declare waitTimer${addID} timer outer ${engageDelay} 
/echo Add detected! >> ${Spawn[${addID}].DisplayName} << 
} 
/varset newAdds 1 
} 
/varcalc addIndex ${addIndex}+1 
} else { 
/varcalc petCheck !${petCheck} 
/varset addIndex 1 
} 
/return 

Sub CheckPet2 
/if ( ${Zone.ID}!=${currentZone} ) /call Event_Zone 
/if ( ${petOff} && ${Me.Pet.ID} ) { 
/varset petOff 0 
/if ( !${addList.Find[[]} ) /varset newAdds 0 
} 
/if ( ${Spawn[${petID}].Type.Equal[NPC]} && !${petOff} && ${useCharm} && ${petID} ) { 
/echo Pet Off! 
/varset petAttacking false 
/varset newAdds 1 
/varset petOff 1 
/if ( ${useCharm}>1 && ${Me.Casting.ID} && ${useMez} && ${newAdds} && !${Me.Casting.Name.Equal[${mezSpell}]} && !${Me.Casting.Name.Equal[word of morell]} && !${Me.Casting.Name.Equal[howl of tashan]} && !${Me.Casting.Name.Equal[${charmSpell}]} ) /call Interrupt 
/if ( ${useCharm}==1 ) { 
/beep 
/timed 7 /g PET OFF!! snare/malo pls! 
/target id ${petID} 
} 
} 
/return 

Sub CheckPet 
/if ( !${FindItem[${normalOffhand}].ID} && ${InvSlot[offhand].Item.ID} ) /varset normalOffhand ${InvSlot[offhand].Item.Name} 
/if ( ${FindItem[Wand of Destructive Protection].ID} ) { 
/declare AETime float local 
/varcalc AETime (${MacroQuest.Running}-${uquaAETime})%90000 
/if ( ${AETime}>84000 ) { 
/if ( !${Me.Inventory[offhand].Name.Equal[Wand of Destructive Protection]} ) /call EquipItem "Wand of Destructive Protection|offhand" 
} else { 
/if ( ${AETime}>3000 && !${Me.Inventory[offhand].Name.Equal[${normalOffhand}]} ) /call EquipItem "${normalOffhand}|offhand" 
} 
} 
/doevents rageon 
/doevents rageoff 
/declare i int local 
/declare tempID int local 
/call CheckPet2 
/if ( ${petOff} ) { 
/if ( ${useCharm}>1 ) { 
/call Charm ${petID} 
} 
} 
/for i 1 to ${Group} 
/varset tempID ${Group.Member[${i}].Pet.ID} 
/if ( ${tempID} ) { 
/if ( !( ${slowTimer${tempID}}<0 ) ) { 
/if ( ${Defined[mezTimer${tempID}]} ) /deletevar mezTimer${tempID} 
/if ( ${Defined[slowTimer${tempID}]} ) /deletevar slowTimer${tempID} 
/if ( ${Defined[tashTimer${tempID}]} ) /deletevar tashTimer${tempID} 
/declare mezTimer${tempID} int outer -1 
/declare tashTimer${tempID} int outer -1 
/declare slowTimer${tempID} int outer -1 
} 
} 
/next i 
/return 

Sub MezAdds 
/if ( !${useMez} ) /goto :end_mez_adds 
/declare tempID string local 
/declare AEmezzed int local 0 
:mez_adds_loop 
/if ( ${addList.Find[[]} ) { 
/if ( ${addList.Find[[]}>1 ) /varset addList ${addList.Right[-${Math.Calc[${addList.Find[[]}-1]}]} 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} ) /return 
/varset tempID ${addList.Arg[1,[].Left[-1]} 
/if ( !${Spawn[${tempID}].Type.Equal[NPC]} && !${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/if ( ${Defined[mezTimer${tempID}]} ) /deletevar mezTimer${tempID} 
/if ( ${Defined[slowTimer${tempID}]} ) /deletevar slowTimer${tempID} 
/if ( ${Defined[tashTimer${tempID}]} ) /deletevar tashTimer${tempID} 
} else { 
/target id ${tempID} 
/if ( !${AEmezzed} && ${Spawn[${tempID}].NearestSpawn[2,npc radius 30].ID} && ${Spawn[${tempID}].Distance3D}>30 && ${addList.Count[[]}>=2 ) { 
/call Cast "${aeMezSpell}" 
/varset AEmezzed 1 
} 
/target id ${tempID} 
/call Mez 
} 
/call DeleteFromList addList ${tempID} 
/goto :mez_adds_loop 
} 
:end_mez_adds 
/varset newAdds 0 
/return 

Sub DebuffMobs 
/declare i int local 
/declare tempID string local 
/if ( ${mobList.Find[[]} ) { 
/if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]} 
/for i 1 to ${mobList.Count[[]} 
/varset tempID ${mobList.Arg[${i},[].Left[-1]} 
/if ( !${Defined[slowTimer${tempID}]} ) { 
/if ( !${Spawn[${tempID}].Type.Equal[npc]} ) { 
/declare slowTimer${tempID} int outer 0 
} else /if ( ( ( !${waitTimer${tempID}} || ${mezTimer${tempID}}>0 ) && ( ${slowTimer${mobID}} || ${waitTimer${mobID}} ) ) || ${tempID}==${mobID} ) { 
/call UpdateMobList 
/doevents Timer 
/target id ${tempID} 
/if ( !${tashTimer${tempID}} ) /call Tash 
/if ( ${newAdds} ) /return 
/call Slow 
/if ( ${addList.Find[[]} ) /varset newAdds 1 
/if ( ${newAdds} ) /return 
/if ( ${Macro.Return.Equal[CAST_CANCELLED]} ) /return 
/if ( ${newAdds} ) /return 
} 
} 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} ) /return 
/next i 
} 
/return 

Sub Charm(int tempID) 
/declare oldTargetID int local ${Target.ID} 
/target id ${tempID} 
/if ( ${Me.Gem[Word of Morell]} ) { 
/if ( ${Target.Distance3D}>30 ) { 
/face fast nolook 
/keypress forward hold 
/delay 1s ${Target.Distance3D}<=30 
/keypress forward 
/delay 5 !${Me.Moving} 
} 
/if ( ${Target.Distance3D}<=30 ) /call Cast "Word of Morell" gem4 6s CheckForAdds 
} 
/target id ${tempID} 
/if ( ${tashTimer${tempID}}<5500 ) /call Tash 
/target id ${tempID} 
/call Cast "${charmSpell}" gem6 2s CheckForAdds 
/if ( ${Me.Pet.ID} ) { 
/if ( ${Spawn[${oldTargetID}].ID} ) { 
/target id ${oldTargetID} 
} else { 
/squelch /target clear 
} 
} 
/return 

Sub Tash 
/declare tempID int local ${Target.ID} 
/if ( ${useTashFocus} ) /call SwapItem "${tashFocusItem}" ${FindItem[${tashFocusItem}].WornSlot[1]} 
/call Cast "${tashSpell}" gem3 6s 
/if ( !${Defined[tashTimer${tempID}]} ) /declare tashTimer${tempID} timer outer 
/if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) { 
/varset tashTimer${tempID} ${tashDuration} 
} else { 
/varset tashTimer${tempID} 1 
} 
/call SwapItem "${normalMainhand}" mainhand 
/return ${Macro.Return} 

Sub Slow 
/declare tempID int local ${Target.ID} 
/doevents Hit 
/call Cast "${slowSpell}" ${slowType} 6s CheckForAdds 
/if ( !${Defined[slowTimer${tempID}]} ) /declare slowTimer${tempID} timer outer 
/if ( ${Macro.Return.Equal[CAST_IMMUNE]} ) { 
/deletevar slowTimer${tempID} 
/declare slowTimer${tempID} int outer -1 
} else /if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) { 
/varset slowTimer${tempID} ${slowDuration} 
} else /if ( ${newAdds} || ${Macro.Return.Equal[CAST_OUTOFMANA]} || ${Macro.Return.Equal[CAST_OUTOFRANGE]} || ${Macro.Return.Equal[CAST_CANNOTSEE]} ) { 
/varset slowTimer${tempID} 50 
} else { 
/varset slowTimer${tempID} 1 
} 
/return ${Macro.Return} 

Sub Mez 
/declare tempID int local ${Target.ID} 
/declare resistCount int local 0 
/if ( ${mezTimer${tempID}}>${Math.Calc[${mezDuration}-50]} ) /return 
:mez_loop 
/tar id ${tempID} 
/if ( ${Target.PctHPs}<99 && ${mezTimer${tempID}} ) { 
/deletevar mezTimer${tempID} 
/declare mezTimer${tempID} int outer -1 
/return ${Macro.Return} 
} 
/if ( !${Spawn[${tempID}].Type.Equal[NPC]} && !${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/call UpdateMobList 
/return 
} 
/if ( !${Defined[mezTimer${tempID}]} ) /declare mezTimer${tempID} timer outer 
/doevents Hit 
/call Cast "${mezSpell}" gem7 3s CheckForAdds 
/if ( ${Macro.Return.Equal[CAST_IMMUNE]} || ${Macro.Return.Equal[CAST_CANCELLED]} ) { 
/deletevar mezTimer${tempID} 
/declare mezTimer${tempID} int outer -1 
} else /if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) { 
/varset mezTimer${tempID} ${mezDuration} 
} else /if ( ${Macro.Return.Equal[CAST_OUTOFMANA]} || ${Macro.Return.Equal[CAST_OUTOFRANGE]} || ${Macro.Return.Equal[CAST_CANNOTSEE]} ) { 
/varset mezTimer${tempID} 50 
} else { 
/if ( ${Macro.Return.Equal[CAST_INTERRUPTED]} ) { 
/if ( ${Me.SpellReady[word of morrel]} ) { 
/call Cast "Word of Morell" gem4 4s 
} 
} 
/if ( ${Macro.Return.Equal[CAST_RESISTED]} ) { 
/varcalc resistCount ${resistCount}+1 
/if ( ${resistCount}==2 && !${tashTimer${addID}} ) /call Tash 
} 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} && ${useMez} ) /return 
/goto :mez_loop 
} 
/return ${Macro.Return} 

Sub Event_Timer(string timerName,int timerValue) 
/if ( !${Defined[${timerName}]} ) /return 
/declare tempID int local 0 
/declare oldTargetID int local ${Target.ID} 
/if ( ${timerName.Left[9].Equal[tashTimer]} ) { 
/varset tempID ${timerName.Right[-9]} 
/if ( ${Spawn[${tempID}].Type.Equal[NPC]} || ${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/target id ${tempID} 
/call Tash 
} else { 
/deletevar ${timerName} 
} 
} else /if ( ${timerName.Left[9].Equal[slowTimer]} ) { 
/varset tempID ${timerName.Right[-9]} 
/if ( ${Spawn[${tempID}].Type.Equal[NPC]} || ${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/target id ${tempID} 
/call Slow 
} else { 
/deletevar ${timerName} 
} 
} else /if ( ${timerName.Left[8].Equal[mezTimer]} ) { 
/varset tempID ${timerName.Right[-8]} 
/if ( ${Spawn[${tempID}].Type.Equal[NPC]} || ${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/target id ${tempID} 
/call Mez 
} else { 
/deletevar ${timerName} 
} 
} else { 
/return ${Macro.Return} 
} 
/if ( ${Target.ID}==${tempID} ) { 
/if ( ${Spawn[${oldTargetID}].ID} ) { 
/target id ${oldTargetID} 
} else { 
/squelch /target clear 
} 
} 
/return ${Macro.Return} 

Sub ClickOffIllusion 
/declare i int local 
/for i 1 to 20 
/if ( ${Me.Buff[${i}].Name.Find[illusion:]} ) /notify BuffWindow buff${Math.Calc[${i}-1].Int} leftmouseup 
/next i 
/return 

Sub IllusionRanger 
/declare oldChest string local 
/declare oldArms string local 
/declare oldLegs string local 
/declare oldPrimary string local 
/declare oldSecondary string local 
/call ClickOffIllusion 
/call EquipItem "enchanted elven chain tunic" 
/varset oldChest ${Macro.Return} 
/call EquipItem "enchanted elven chainmail leggings" 
/varset oldLegs ${Macro.Return} 
/call EquipItem "ruined heretic longsword" 
/varset oldPrimary ${Macro.Return} 
/call EquipItem "preserved chokidai vocal cords" 
/varset oldSecondary ${Macro.Return} 
/target id ${Me.ID} 
/call Cast "illusion: werewolf" gem4 10s 
/call EquipItem ${oldChest} 
/call EquipItem ${oldLegs} 
/call EquipItem ${oldPrimary} 
/call EquipItem ${oldSecondary} 
/call ClickOffIllusion 
/call Cast "illusion: wood elf" gem4 10s 
/return 

Sub CheckBuffs 
/if ( ${Zone.ID}!=${currentZone} ) /call Event_Zone 

/varset deathFlag ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]} 
/if ( ${deathFlag} ) /goto :dead 
/declare i int local 
/declare oldTarget int local ${Target.ID} 
/declare oldItemName string local 
/declare foodName string local 
/declare oldSlotID int local 
/declare spellName string local 
/declare buffText string local 
/declare targetName string local 
/declare spellName2 string local 
/declare spellType string local 
/declare spellRange int local 118 
/declare tempID int local 
/declare focusList string local Wunshi's Focusing,Focus of Alladnu,Focus of Soul,Talisman of Kragg,Focus of the Seventh,Talisman of Wunshi 
/declare shaman bool local false 
/declare targetType string local 

/doevents Indoors 
/if ( !${Me.Pet.ID} && ${usePet} && !${petOff} && ${Me.CurrentMana}>=900 ) /call SumPet 
/if ( ${Me.Pet.ID} && ${petID}!=${Me.Pet.ID} ) { 
/varset petID ${Me.Pet.ID} 
/if ( ${Defined[mezTimer${petID}]} ) /deletvar mezTimer${petID} 
/if ( ${Defined[slowTimer${petID}]} ) /deletvar slowTimer${petID} 
/declare mezTimer${petID} int outer -1 
/declare slowTimer${petID} int outer -1 
} 
/if ( !${Me.Casting.ID} ) { 
/if ( ${Me.Combat} ) { 
/call SwapItem "${meleeWep}" mainhand 
} else { 
/call SwapItem "${normalMainhand}" mainhand 
} 
} 
/if ( ${Cursor.Name.Equal[Rod of Mystical Transvergance]} ) /autoinventory 
/if ( !${FindItem[Rod of Mystical Transvergance].ID} && ${Spawn[pc ${rodBitch} radius 200].ID} && !${askedForRodTimer} ) { 
;tell ${rodBitch} rod pls! 
/varset askedForRodTimer 5m 
} 
/if ( ${FindItem[Rod of Mystical Transvergance].ID} && !${modRodTimer} && ${Me.PctHPs}>50 && ${Me.PctMana}<=95 ) { 
/call Cast "Rod of Mystical Transvergance" item 
/varset modRodTimer 3100 
} 
/if ( ${checkNamed} ) /call CheckNamed 

/if ( ${Me.Hunger}<5000 && ${useFood} ) { 
/call GetFoodName 
/varset foodName ${Macro.Return} 
/if ( ${Bool[${foodName}]} ) { 
/varset oldSlotID ${FindItem[${foodName}].InvSlot.ID} 
/call SwapItem "${foodName}" "pack8" 
/nomodkey /itemnotify pack8 rightmouseup 
/call SwapItem "${foodName}" "${oldSlotID}" 
} 
} 
/if ( !${autoBuff} ) /goto :skip_buffs 
/if ( ( ${autoBuff}==2 || ${autoBuff}==4 ) && ${Target.ID} ) /return 

/call CheckIniBuffs 

/if ( ${Me.Pet.ID} ) { 
/if ( !${Me.PetBuff[${charmSpell}]} && !${Me.PetBuff[speed of vallon]} && !${Me.PetBuff[speed of salik]} && !${Me.PetBuff[hastening of salik]} && ${Me.Pet.Distance3D}<=120 ) /call AddToQueue "haste,${Me.Pet.Name}" 
/if ( !${Me.PetBuff[Night`s Dark Terror]} && ${Me.Pet.Distance3D}<=120 && ${Me.SpellReady[Night`s Dark Terror]} ) /call AddToQueue "Night`s Dark Terror,${Me.Pet.Name}" 
} 
/if ( ${Me.Buff["Clairvoyance"].Duration}<=5 && ${Me.Buff["Voice of Clairvoyance"].Duration}<=5 ) { 
/if ( !${Me.Buff["Voice of Quellious"].ID} && !${Me.Buff["Tranquility"].ID} ) { 
/if ( ${Me.PctMana}<50 && ${FindItem[Silken Augmenter's Pantaloons].ID} && !${Me.Buff["Clairvoyance"].ID} && !${Me.Buff["Voice of Clairvoyance"].ID} ) { 
/call AddToQueue "c4,${Me.Name}" 
} else { 
/call AddToQueue "c6,${Me.Name}" 
} 
} else /if ( ${Me.PctMana}>=90 && ( ${Me.Book[clairvoyance]} || ${Me.Book[voice of clairvoyance]} ) ) { 
/call AddToQueue "c6,${Me.Name}" 
} 
} 
/if ( ${hasteGroup} ) { 
/for i 1 to ${Group} 
/varset tempID ${Group.Member[${i}].ID} 
/if ( ${tempID} ) { 
/if ( !${Defined[hasteTimer${tempID}]} ) /declare hasteTimer${tempID} timer outer 
/if ( ${Spawn[${tempID}].Type.Equal[pc]} ) { 
/if ( !${hasteTimer${tempID}} ) { 
/if ( ${Group.Member[${i}].Class.PureCaster} ) { 
/deletevar hasteTimer${tempID} 
/declare hasteTimer${tempID} int outer -1 
} else { 
/call AddToQueue "sos,${Group.Member[${i}].Name}" 
/varset hasteTimer${tempID} 62m 
} 
} 
} else /if ( ${Spawn[${tempID}].Type.Equal[corpse]} ) { 
/varset hasteTimer${tempID} 0 
} 
} else /if ( ${Defined[hasteTimer${tempID}]} ) { 
/deletevar hasteTimer${tempID} 
} 
/next i 
} 
/if ( ${Spawn[pc class shaman].ID} ) { 
/if ( ${Raid.Members} ) { 
/if ( ${Spawn[pc guild "${Me.Guild}" shm].ID} ) /varset shaman true 
} else { 
/for i 1 to ${Group} 
/if ( ${Group.Member[${i}].Class.Name.Equal[shaman]} ) /varset shaman true 
/next i 
} 
} 
/if ( ${shaman} ) { 
/if ( ${Me.Buff["${shielding}"].ID} ) /call ClickOffBuff "${shielding}" 
} else { 
/for i 1 to ${focusList.Length} 
/if ( ${Me.Buff[${focusList.Arg[${i},,]}].ID} ) /goto :skip_buffs 
/next i 
/if ( !${Me.Buff[${shielding}].ID} ) /call AddToQueue "${shielding}" 
} 
:skip_buffs 
/if ( !${Me.Mount.ID} && ${useMount} ) /call Cast "${InvSlot[ammo].Item.Name}" item 2s CheckForAdds 
/if ( ${buffQueue.Find[[]} ) { 
/if ( ${buffQueue.Find[[]}>1 ) /varset buffQueue ${buffQueue.Right[-${Math.Calc[${buffQueue.Find[[]}-1]}]} 
/for i 1 to ${buffQueue.Count[[]} 
/varset buffText [${buffQueue.Arg[${i},[]} 
/varset spellName ${buffText.Arg[1,,].Right[-1]} 
/if ( ${spellName.Right[1].Equal["]"]} ) /varset spellName ${spellName.Left[-1]} 
/varset targetName ${buffText.Arg[2,,].Left[-1]} 
/call GetBuffName "${spellName}" 
/varset spellName ${Macro.Return.Arg[1,,]} 
/varset spellType ${Macro.Return.Arg[2,,]} 
/if ( ${spellType.Equal[item]} ) { 
/varset spellName2 ${FindItem[${spellName}].Spell.Name} 
} else { 
/varset spellName2 ${spellName} 
} 
/if ( ${Spell[${spellName2}].TargetType.Equal[Group v2]} ) { 
/varcalc spellRange 1.18*${Spell[${spellName2}].AERange} 
} else { 
/varcalc spellRange 1.18*${Spell[${spellName2}].Range} 
} 
/varset targetType pc 
/if ( !${Spawn[pc ${targetName}].ID} ) /varset targetType pet 
/if ( ${Bool[${spellName}]} ) { 
/if ( ${Me.CurrentMana}>=${Math.Calc[${Spell[${spellName}].Mana}+${Me.ManaRegen}]} || ${spellType.Equal[item]} || ${spellType.Equal[alt]} ) { 
/if ( !${Bool[${targetName}]} ) { 
/call Cast "${spellName}" ${spellType} 4s CheckForAdds 
} else /if ( ${Spawn[${targetType} ${targetName}].ID} && ( ${Spawn[pc ${targetName}].Distance3D}<=${spellRange} || !${spellRange} ) ) { 
/target ${targetType} ${targetName} 
/call Cast "${spellName}" ${spellType} 4s CheckForAdds 
/if ( ${Spawn[${oldTarget}].ID} ) { 
/if ( ${Target.Name.Equal[${targetName}]} ) /target id ${oldTarget} 
} else { 
/squelch /target clear 
} 
} 
/if ( ${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_UNKNOWNSPELL]} || ${Macro.Return.Equal[CAST_NOTARGET]} || ( ${Macro.Return.Equal[CAST_CANCELLED]} && ( !${newAdds} || !${useMez} ) ) ) { 
/call DeleteFromQueue "${buffText}" 
/varcalc i ${i}-1 
} 
} 
} else { 
/call DeleteFromQueue "${buffText}" 
/varcalc i ${i}-1 
} 
/next i 
} 
/return 
:dead 
/declare i int local 
/varset mobList 
/varset addList 
/varset buffQueue 
/varset mobID 0 
/varset petID 0 
/varset useAnchor 0 
/squelch alert clear 6 
/call ClearMobList 
:wait_for_loot 
/varset deathFlag ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]} 
/if ( ${Spawn[corpse radius 100 ${Me.Name}].ID} && ${deathFlag} ) { 
/target mycorpse 
/call LootCorpse 
/delay 5 
/goto :wait_for_loot 
} 
/if ( ${deathFlag} ) { 
/memspellset ${spellSet} 
/echo You're dead! Consenting and waiting for rez... 
/consent guild 
/delay 25 
/consent raid 
/delay 25 
/consent group 
:wait_for_rez 
/doevents 
/delay 1s 
/if ( !${Window[ConfirmationDialogBox].Open} ) /goto :wait_for_rez 
/delay 18s !${Window[SpellBookWnd].Open} 
/echo Yay a rez! 
/target id ${Me.ID} 
/call cast "Clairvoyance" gem4 5s RezBuff 
/call TakeRez 
/delay 5s ${Spawn[corpse radius 100 ${Me.Name}].ID} 
/goto :wait_for_loot 
} 
/return 

Sub RezBuff 
/if ( ${Me.Casting.ID} && ${castEndTime}<=5 ) { 
/varset castReturn CAST_CANCELLED 
/call TakeRez 
} 
/return 

Sub TakeRez 
:wait_for_rez2 
/if ( ${Window[ConfirmationDialogBox].Open} ) { 
/delay 1 
/notify ConfirmationDialogBox Yes_Button leftmouseup 
/goto :wait_for_rez2 
} 
/return 

Sub GetBuffName(string spellName) 
/declare i int local 
/declare buffText string local 
/declare spellType string local 
/if ( !${Me.Gem[4].SpellType.Equal[detrimental]} ) { 
/varset spellType gem4 
} else { 
/varset spellType gem9 
} 
/if ( ${spellName.Equal[gom]} ) /varset spellName Gift of Magic 
/if ( ${spellName.Equal[c1]} ) { 
/if ( ${FindItem[rod of infinite thought].ID} ) { 
/varset spellName rod of infinite thought 
/varset spellType item 
} else { 
/varset spellName clarity 
} 
} 
/if ( ${spellName.Equal[c2]} ) /varset spellName Clarity II 
/if ( ${spellName.Equal[c3]} ) { 
/if ( ${FindItem[Wand of Tranquility].ID} ) { 
/varset spellName Wand of Tranquility 
/varset spellType item 
} else { 
/varset spellName Koadic's Endless Intellect 
} 
} 
/if ( ${spellName.Equal[c4]} ) { 
/if ( ${FindItem[Silken Augmenter's Pantaloons].ID} ) { 
/varset spellName Silken Augmenter's Pantaloons 
/varset spellType item 
} else { 
/varset spellName Tranquility 
} 
} 
/if ( ${spellName.Equal[mgb]} ) { 
/varset spellName Mass Group Buff 
/varset spellType alt 
} 
/if ( ${spellName.Equal[c5]} ) /varset spellName Voice of Quellious 
/if ( ${spellName.Equal[c6]} ) { 
/if ( ${Group} && ${Me.Book[Voice of Clairvoyance]} && ${Me.Buff[Clairvoyance].Duration}<=5 && ${Me.Buff[Voice of Clairvoyance].Duration}<=5 ) { 
/varset spellName Voice of Clairvoyance 
} else { 
/varset spellName Clairvoyance 
} 
} 
/if ( ${spellName.Equal[haste]} ) { 
/if ( ${Me.PctMana}>60 || !${FindItem[Romar's Pantaloons of Visions].ID} ) { 
/varset spellType gem9 
/if ( ${Me.Gem[${groupHasteSpell}]} ) { 
/varset spellName ${groupHasteSpell} 
} else { 
/varset spellName ${singleHasteSpell} 
} 
} else { 
/varset spellName Romar's Pantaloons of Visions 
/varset spellType item 
} 
} 
/if ( ${spellName.Equal[sov]} || ${spellName.Equal[speed of vallon]} || ${spellName.Equal[vallon]} ) { 
/varset spellName Romar's Pantaloons of Visions 
/varset spellType item 
} 
/if ( ${spellName.Equal[shissar]} || ${spellName.Equal[snake]} ) { 
/varset spellName Staff of the Serpent 
/varset spellType item 
} 
/if ( ${spellName.Equal[see invis]} ) { 
/varset spellName bracer of the hidden 
/varset spellType item 
} 
/if ( ${spellName.Equal[mr]} || ${spellName.Equal[grm]} || ${spellName.Equal[gmr]} || ${spellName.Equal[god]} || ${spellName.Equal[magic resist]} ) /varset spellName Guard of Druzzil 
/if ( ${spellName.Equal[lev]} ) /varset spellName Levitation 
/if ( ${spellName.Equal[sos]} ) /varset spellName Speed of Salik 
/if ( ${spellName.Equal[imp invis]} ) /varset spellName Improved Invisibility 
/if ( ${spellName.Equal[invis]} ) /varset spellName Cloud of Indifference 
/if ( ${spellName.Equal[ivu]} ) /varset spellName Invisibility versus Undead 
/if ( ${spellName.Equal[rune]} ) /varset spellName Rune of Zebuxoruk 
/if ( ${spellName.Left[3].Equal[pac]} ) /varset spellName Pacification 
/if ( ${Me.Book[illusion: ${spellName}]} ) /varset spellName illusion: ${spellName} 
/if ( ${spellName.Equal[tash]} ) { 
/varset spellName ${tashSpell} 
/varset spellType gem3 
} 
/if ( ${spellName.Equal[slow]} ) { 
/varset spellName ${slowSpell} 
/varset spellType ${slowType} 
} 
/if ( ${spellName.Equal[mez]} ) { 
/varset spellName ${mezSpell} 
/varset spellType gem7 
} 
/if ( ${spellName.Left[6].Equal[dispel]} ) { 
/if ( ${Me.Gem[recant magic]} ) { 
/varset spellName Recant Magic 
} else { 
/varset spellName ${dispellItem} 
/varset spellType item 
} 
} 
/for i 1 to 5 
/if ( ${spellName.Equal[${buffName${i}}]} ) /varset spellType ${buffType${i}} 
/next i 
/if ( ( ${spellType.Find[gem]} || ${spellType.Equal[spell]} ) && !${Int[${Me.Book[${spellName}]}]} ) { 
/if ( ${FindItem[${spellName}].ID} ) { 
/varset spellType item 
} else /if ( ${Me.AltAbility[${spellName}]} || ${spellName.Equal[${Int[${spellName}]}]} ) { 
/varset spellType alt 
} else { 
/return 
} 
} 
/return ${spellName},${spellType} 

Sub CheckRune(int tempHP) 
/if ( !${Me.Buff["${selfRune}"].ID} && !${Me.Buff["Eldritch Rune"].ID} && ${autoBuff} && ( ${Me.PctHPs}<=${tempHP} || ${Me.PctMana}==100 ) ) { 
/call AddToQueue "${selfRune}" 
} 
/return 

Sub SumPet 
/declare i int local 
/if ( ${Me.AltAbilityReady[persistent minion]} ) /alt activate 176 
/delay 10s !${Me.Casting.ID} 
/delay 5s ${Me.Pet.ID} 
/if ( !${Me.Pet.ID} ) { 
/call cast "${petSpell}" gem4 5s 
} 
/return 

| ======================== EVENTS ======================== 

Sub Event_Chat2(string chatType,string chatSender,string chatText) 
/if ( ${chatText.Equal[camp]} && ${chatType.Equal[tell]} ) { 
/if ( ${Me.Mount.ID} ) /dismount 
/camp desktop 
} 
/if ( ${ignoreList.Find[|${chatSender}|]} || ${chatText.Left[4].Equal[cast]} || !${autoBuff} || ${Spawn[${chatSender}].Type.Equal[NPC]} ) /return 
/if ( !${Defined[buffQueue]} ) /declare buffQueue string outer 
/if ( !${Defined[chatTimer]} ) /declare chatTimer float outer 
/declare chatTime float local ${MacroQuest.Running} 
/declare oldTarget int local ${Target.ID} 
/declare n int local 
/declare spellName string local 
/declare i int local 
/declare j int local 
/declare please bool local 
/declare inGroup bool local false 
/declare tempStr string local /\.,?!() 
/declare tempChar string local 
/declare tempStr2 string local 

/for i 1 to ${tempStr.Length} 
/varset tempChar ${tempStr.Mid[${i},1]} 
:remove_char 
/if ( ${chatText.Find[${tempChar}]} ) { 
/varset chatText ${chatText.Left[${Math.Calc[${chatText.Find[${tempChar}]}-1]}]} ${chatText.Right[-${chatText.Find[${tempChar}]}]} 
/goto :remove_char 
} 
/next i 

/varset n ${chatText.Count[ ]} 

:count_spaces 
/if ( ${chatText.Arg[${Math.Calc[${n}+1]}].Length} ) { 
/varcalc n ${n}+1 
/goto :count_spaces 
} 

/if ( ${chatText.Find[please]} || ${chatText.Find[pls]} || ${chatText.Find[plz]} ) /varset please true 
/if ( ${chatText.Arg[${n}].Find[please]} || ${chatText.Arg[${n}].Find[pls]} || ${chatText.Arg[${n}].Find[plz]} || ${chatText.Arg[${n}].Equal[me]} ) /varcalc n ${n}-1 
/if ( ${Spawn[pc ${chatText.Arg[${n}]}].Name.Left[3].Equal[${chatText.Arg[${n}].Left[3]}]} ) { 
/if ( !${Spawn[pc ${chatText.Arg[${n}]}].Name.Equal[${Me.Name}]} ) /varset chatSender ${Spawn[pc ${chatText.Arg[${n}]}]} 
/varcalc n ${n}-1 
} 

/if ( ${n}==1 && ${chatText.Arg[1].Equal[invite]} && ${GroupLeader.ID}==${Me.ID} ) { 
/tar pc ${chatSender} 
/if ( ${Me.Casting.ID} ) /call WaitCast 
/invite 
} 

/for j 1 to 5 
/if ( ${Group.Member[${j}].Name.Equal[${chatSender}]} ) /varset inGroup true 
/next j 

/if ( !${Spawn[${chatSender}].ID} ) /return 

/for i 1 to ${n} 
/if ( ( ${chatText.Equal[plead]} && !${Spawn[pc ${chatSender}].Class.PureCaster} ) || ${chatText.Arg[${i}].Left[5].Equal[haste]} || ${chatText.Arg[${i}].Left[3].Equal[sov]} || ${chatText.Arg[${i}].Left[5].Equal[speed]} || ${chatText.Arg[${i}].Left[2].Equal[vq]} || ${chatText.Arg[${i}].Left[4].Equal[pant]} || ( ${chatText.Arg[${i}].Left[6].Equal[vallon]} && !${chatText.Find[zek]} ) ) { 
/if ( ${Me.Gem[speed of salik]} && ${Me.PctMana}>50 ) { 
/call AddToQueue "sos,${chatSender}" 
} else { 
/call AddToQueue "sov,${chatSender}" 
} 
} 
/if ( ${chatText.Arg[${i}].Left[3].Equal[VoQ]} || ${chatText.Arg[${i}].Left[2].Equal[c5]} ) { 
/call AddToQueue "c6,${chatSender}" 
} 
/if ( ( ( ${chatText.Equal[plead]} && ${Spawn[pc ${chatSender}].Class.CanCast} ) || ${chatText.Arg[${i}].Left[2].Equal[c6]} || ${chatText.Arg[${i}].Equal[c]} || ${chatText.Arg[${i}].Left[7].Equal[clarity]} || ${chatText.Arg[${i}].Left[8].Equal[clairity]} || ${chatText.Arg[${i}].Left[5].Equal[crack]} ) && !${chatText.Find[i c]} && !${chatSender.Equal[runningbear]} && !${chatText.Find[AE c]} && !${chatText.Find[inc c]} ) { 
/if ( ${chatSender.Equal[vitesse]} ) { 
/chat tell Vitesse die pls! 
} else { 
/call AddToQueue "c6,${chatSender}" 
} 
} 
/if ( ( ( ${chatText.Arg[${i}].Left[3].Equal[god]} || ${chatText.Arg[${i}].Left[4].Equal[druz]} || ${chatText.Arg[${i}].Left[2].Equal[mr]} ) && ( ${please} || ${chatText.Find[can i get]} ) ) || ${chatText.Arg[${i}].Left[3].Equal[gmr]} || ${chatText.Arg[${i}].Left[3].Equal[grm]} || ( ${chatText.Arg[${i}].Left[5].Equal[magic]} && ${chatText.Arg[${Math.Calc[${i}+1]}].Find[resist]} ) ) { 
/call AddToQueue "mr,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Equal[gom]} ) { 
/call AddToQueue "gom,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Equal[insight]} ) { 
/call AddToQueue "insight,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Left[2].Equal[c1]} ) { 
/call AddToQueue "c1,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Left[2].Equal[c2]} ) { 
/call AddToQueue "c2,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Left[2].Equal[c3]} ) { 
/call AddToQueue "c3,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Equal[shissar]} ) { 
/call AddToQueue "shissar,${chatSender}" 
} 
/if ( ( ${Me.Book[illusion: ${chatText.Arg[${i}]}]} || ${Me.Book[illusion: ${chatText.Arg[${i}]} ${chatText.Arg[${Math.Calc[${i}+1]}]}]} ) && ( ${please} || ${n}==1 || ${chatText.Arg[${Math.Calc[${i}+1]}].Left[2].Equal[me]} || ${chatText.Arg[${Math.Calc[${i}+2]}].Left[2].Equal[me]} ) ) { 
/if ( ${inGroup} ) { 
/if ( ${Me.Book[illusion: ${chatText.Arg[${i}]}]} ) { 
/call AddToQueue "${chatText.Arg[${i}]},${chatSender}" 
} else { 
/call AddToQueue "${chatText.Arg[${i}]} ${chatText.Arg[${Math.Calc[${i}+1]}]},${chatSender}" 
} 
} 
} 
/next i 

/varcalc chatTimer (${MacroQuest.Running}-${chatTime})/1000 
/echo ${chatTimer} secs to parse chat 
/return 

Sub Event_AutoStun(string line,string toggle) 
/if ( !${Defined[useStun]} ) /declare useStun int outer 0 
/if ( ${toggle.Equal[on]} ) { 
/varset useStun 1 
} else { 
/varset useStun 0 
} 
:stun_loop 
/if ( ${useStun} ) { 
/if ( ${refreshTime} ) /call ManaRobe 
/call Cast "Color Cloud" 
/call Cast "Color Slant" 
/if ( ${Macro.Return.Equal[CAST_INTERRUPTED]} ) /call Cast "Color Flux" 
/if ( ${Macro.Return.Equal[CAST_NOTREADY]} ) /call Cast "Color Shift" 
/if ( ${Macro.Return.Equal[CAST_NOTREADY]} ) /call Cast "Color Skew" 
/call CheckRune 90 
/doevents AutoStun 
/doevents chat 
/doevents setvars 
/goto :stun_loop 
} 
/return 

Sub Event_RageOn(string line) 
/if ( ( ${line.Find[${Spawn[${mobID}].DisplayName}]} || ${line.Find[${Target.DisplayName}]} ) && ${Me.Pet.ID} ) { 
/echo calling off pet... 
/pet back off 
} 
/return 

Sub Event_RageOff(string line) 
/if ( ( ${line.Find[${Spawn[${mobID}].DisplayName}]} || ${line.Find[${Target.DisplayName}]} ) && ${Me.Pet.ID} ) { 
/target id ${mobID} 
/pet attack 
} 
/return 

Sub Event_Mez 
/if ( ${Defined[mezTimer${Target.ID}]} ) /deletevar mezTimer${Target.ID} 
/call Mez 
/return 

Sub Event_Gate(string line,string mobName) 
/if ( !${Me.Casting.Name.Equal[${mezSpell}]} ) /call Interrupt 
/call Cast "${mezSpell}" gem7 3s CheckForAdds 
/return 

Sub Event_Ranger 
/call IllusionRanger 
/return
 
ALSO NEEDED
Rich (BB code):
| gen_routines.inc 

#event Camp "It will take#*#seconds to prepare your camp#*#" 
#event CastSpell "[#1#] cast #2#" 
#event CastSpell "[#1#] cast #2# on #3#" 
#event CastSpell "#1# tells you, 'cast #2#'" 
#event CastSpell "#1# told you, 'cast #2#'" 
#event CastSpell "#1# tells you, 'cast #2# on #3#'" 
#event CastSpell "#1# told you, 'cast #2# on #3#'" 
#event ChatTell "#1# told you, '#2#'" 
#event Command "#*#'/#1# pass#*#:#2#'" 
#event DamageMelee "|${Me.Pet.DisplayName}| #*# for #1# points of damage#*#" 
#event DamageMelee "You #*# for #1# points of damage#*#" 
#event DamageNonMelee "|${Me.Name}| hit #*# for #1# points of non-melee damage#*#" 
#event Dead "Returning to home point, please wait..." 
#event Dispell "[MQ2] Dispell" 
#event Exp "You gain #*#" 
#event Follow "#1# #*#'follow'" 
#event Follow "#1# #*#'follow #2#'" 
#event Hit "#*# YOU for #*#" 
#event Hit "#*# YOU, but #*#" 
#event Indoors "You can only cast this spell in the outdoors#*#" 
#event Indoors "You can not summon a mount#*#" 
#event Indoors "You need to be in a more open area to summon a mount#*#" 
#event Invis "[MQ2] Invis" 
#event Invited "#*#click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#" 
#event ManaRobe "[MQ2] Mana Robe #1#" 
#event NukeType "[MQ2] NukeType #1#" 
#event RaidSay "#1# tells the raid,  '#2#'" 
#event SetAnchor "[MQ2] SetAnchor #1#" 
#event SetMA "[ma] [Down:/assist #1#] [Up:#*#" 
#event SetSA "[sa] [Down:/assist #1#] [Up:#*#" 
#event SetVar "[MQ2] set: #1# #2#" 
| #event SpellDamage "#*#You have taken #1# points of damage#*#" 
#event Summon "You have been summoned!" 
#event UquaAE "Your body is surrounded by a darkened aura." 
#event UquaKey "The #1# Key must unlock the door to the next room." 
#event Zone "You have entered #1#." 

|============================================== 
| General Routines 
|============================================== 

Sub GeneralDeclares 
   /declare aggroTimer timer outer 
   /declare followName string outer null 
   /declare totalKills int outer 0 
   /declare iniName string outer Auto_${Me.Name}.ini 
   /declare buffQueue string outer 
   /declare currentZone int outer 
   /declare normalOffhand string outer ${InvSlot[offhand].Item.Name} 
   /declare uquaAETime float outer 
   /declare totalMeleeDmg int outer 
   /declare totalNonMeleeDmg int outer 
   /declare fightStartTime float outer 
   /declare fightTotalTime float outer 
   /declare deathFlag bool outer ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]} 
   /declare mobID int outer 0 
   /declare addID int outer 0 
   /declare petAttacking bool outer false 
   /declare i int local 
   /declare j int local 
   /declare addIndex int outer 
   /declare tempStr string local 
   /declare mobList string outer 
   /declare addList string outer 
   /declare newAdds int outer 0 
   /declare assistWaitTimer timer outer 0 
   /declare aggroAnim string outer |5|8|12|17|18|42|44|80|106|144| 
   /declare petCheck bool outer false 
   /declare petID int outer 0 
   /declare tempTimer timer local 0 
   /declare petOff int outer 0 
   /declare useAnchor int outer 
   /declare anchorX float outer 
   /declare anchorY float outer 
   /declare anchorHeading float outer 
   /declare leashLength int outer 
   /declare oldTarget int local 
   /declare modRodTimer timer outer 
   /declare nukeWaitTimer timer outer 0 
   /declare nukeWaitMod int outer 0 
   /declare mainTank string outer 
   /declare castSub string outer 
   /declare validTarget int outer 
   /declare engaged int outer 
   /declare mobHPStart int outer 
   /declare askedForRodTimer timer outer 0 
   /declare petSpamTimer timer outer 
   /declare petMaloTimer timer outer 0 
   /declare maloed bool outer 
   /declare snared bool outer 
   /declare rockNuke string outer 
   /declare fireNuke string outer 
   /declare magicNuke string outer 
   /declare boltNuke string outer 
   /declare coldNuke string outer 
   /declare c6Timer timer outer 
   /declare petMaloTimer2 timer outer 0 
   /declare petOff2 int outer 0 
/return 

Sub ClickOffBuff(string buffName) 
   /declare i int local 
   /for i 1 to 20 
      /if ( ${Me.Buff[${i}].Name.Equal[${buffName}]} ) /notify BuffWindow buff${Math.Calc[${i}-1].Int} leftmouseup 
   /next i 
/return 

Sub CheckTarget 
   /declare tempID int local ${Target.ID} 
   /if ( ( ${Spawn[${tempID}].Type.Equal[npc]} || ( ${Spawn[${tempID}].Type.Equal[pet]} && !${Spawn[${tempID}].Master.Type.Equal[pc]} ) ) && ( ( ${Spawn[pc ${mainTank}].NearestSpawn[radius ${Math.Calc[${minRadius}*2]} id ${tempID}].ID} && ${Spawn[pc ${mainTank}].Distance3D}<=${minRadius} ) || !${Spawn[pc ${mainTank}].ID} || ${Spawn[pc ${mainTank}].Distance3D}>200 ) && ${tempID}!=${petID} && ( ${aggroAnim.Find[|${Spawn[${tempID}].Animation}|]} || ${Spawn[${tempID}].PctHPs}<100 || ${Me.TargetOfTarget.Type.Equal[pc]} || ${Me.TargetOfTarget.Master.Type.Equal[pc]} ) ) { 
      /varset validTarget 1 
   } else { 
      /varset validTarget 0 
   } 
/return 

Sub CheckNamed 
   /if ( ${checkNamed} ) { 
   /declare tempID int local 
   /declare beeped bool local false 
   :check_named 
      /varset tempID ${Spawn[npc named noalert 6].ID} 
      /if ( ${tempID} ) { 
         /squelch /alert add 6 id ${tempID} 
         /if ( !${Spawn[${tempID}].CleanName.Find[eye of]} && ${SpawnCount[npc "${Spawn[${tempID}].CleanName}"]}==1 && !${String[/high elf/wood elf/ogre/troll/human/gnome/halfling/dark elf/half elf/barbarian/vah shir/iksar/erudite/dwarf/].Find[/${Spawn[${tempID}].Race}/]} ) { 
            /echo Named Detected: ${Spawn[${tempID}].DisplayName} 
            /if ( ${channelAnnounce} ) /chat ;#${privateChannel} ${Spawn[${tempID}].DisplayName} popped, ${Spawn[${tempID}].Distance3D} feet ${Spawn[${tempID}].HeadingTo} of here. 
            /if ( !${beeped} ) /beep 
            /varset beeped true 
         } 
         /goto :check_named 
      } 
   } 
/return 

Sub CheckLoc 
   /if ( !${useAnchor} ) /return 
   /declare myDistance float local ${Math.Distance[${Me.Y},${Me.X}:${anchorY},${anchorX}]} 
   /if ( ${myDistance}>${leashLength} ) { 
      /if ( ${myDistance}>300 ) { 
         /varset useAnchor 0 
         /return 
      } 
      /if ( ${Me.Mount.ID} ) /dismount 
      /call MoveToLoc ${anchorY} ${anchorX} 
      /squelch /face fast nolook heading ${anchorHeading} 
   }    
/return 

Sub CleanUp(int tempID) 
   /if ( !${Spawn[${tempID}].Type.Equal[corpse]} ) /return 
   /declare tempX ${Me.X} 
   /declare tempY ${Me.Y} 
   /declare tempHeading ${Me.Heading.DegreesCCW} 
   /if ( ${Me.Mount.ID} ) /dismount 
   /tar id ${tempID} 
   /call MoveToSpawn ${tempID} 10 
   /call LootCorpse 
                      | 0 nodrop 
   /call MoveToLoc ${tempY} ${tempX} 
   /face fast heading ${tempHeading} 
   /delay 15 !${Me.Moving} 
/return 

Sub AddToQueue(string buffText) 
   /varset buffText [${buffText}] 
   /if ( !${buffQueue.Find[${buffText}]} ) /varset buffQueue ${buffQueue}${buffText} 
/return 

Sub DeleteFromQueue(string buffText) 
   /declare a int local 
   /declare b int local 
   /declare strLeft string local 
   /declare strRight string local 
   /varcalc a ${buffQueue.Find[${buffText}]}-1 
   /varcalc b ${buffQueue.Length}-${buffText.Length}-${a} 
   /if ( ${a}>0 ) /varset strLeft ${buffQueue.Left[${a}]} 
   /if ( ${b}>0 ) /varset strRight ${buffQueue.Right[${b}]} 
   /varset buffQueue ${strLeft}${strRight} 
/return 

Sub AddToList(string listName,string tempID) 
   /varset tempID [${tempID}] 
   /if ( !${${listName}.Find[${tempID}]} ) { 
      /varset ${listName} ${${listName}}${tempID} 
      /return 1 
   } 
/return 0 

Sub DeleteFromList(string listName,string tempID) 
   /varset tempID [${tempID}] 
   /declare a int local 
   /declare b int local 
   /declare strLeft string local 
   /declare strRight string local 
   /varcalc a ${${listName}.Find[${tempID}]}-1 
   /varcalc b ${${listName}.Length}-${tempID.Length}-${a} 
   /if ( ${a}>0 ) /varset strLeft ${${listName}.Left[${a}]} 
   /if ( ${b}>0 ) /varset strRight ${${listName}.Right[${b}]} 
   /varset ${listName} ${strLeft}${strRight} 
/return 

Sub UpdateMobList 
   /declare i int local 
   /declare mobListID string local 
   /if ( ${mobList.Find[[]} ) { 
      /if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]} 
      /for i 1 to ${mobList.Count[[]} 
         /varset mobListID ${mobList.Arg[${i},[].Left[-1]} 
         /if ( ( !${Spawn[${mobListID}].Type.Equal[NPC]} && !${Spawn[${mobListID}].Master.Type.Equal[NPC]} ) || ${Spawn[${mobListID}].Type.Equal[corpse]} ) { 
            /if ( ${Defined[mezTimer${mobListID}]} ) /deletevar mezTimer${mobListID} 
            /if ( ${Defined[slowTimer${mobListID}]} ) /deletevar slowTimer${mobListID} 
            /if ( ${Defined[tashTimer${mobListID}]} ) /deletevar tashTimer${mobListID} 
            /if ( ${Defined[waitTimer${mobListID}]} ) /deletevar waitTimer${mobListID} 
            /if ( ${Defined[maloTimer${mobListID}]} ) /deletevar maloTimer${mobListID} 
            /if ( ${Defined[maloResists${mobListID}]} ) /deletevar maloResists${mobListID} 
            /call DeleteFromList mobList ${mobListID} 
            /call DeleteFromList addList ${mobListID} 
         } 
      /next i 
   } 
/return 

Sub ClearMobList 
   /declare i int local 
   /declare mobListID string local 
   /if ( ${mobList.Find[[]} ) { 
      /if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]} 
      /for i 1 to ${mobList.Count[[]} 
         /varset mobListID ${mobList.Arg[${i},[].Left[-1]} 
         /if ( ${Defined[mezTimer${mobListID}]} ) /deletevar mezTimer${mobListID} 
         /if ( ${Defined[slowTimer${mobListID}]} ) /deletevar slowTimer${mobListID} 
         /if ( ${Defined[tashTimer${mobListID}]} ) /deletevar tashTimer${mobListID} 
         /if ( ${Defined[maloTimer${mobListID}]} ) /deletevar maloTimer${mobListID} 
         /if ( ${Defined[waitTimer${mobListID}]} ) /deletevar waitTimer${mobListID} 
         /if ( ${Defined[maloTimer${mobListID}]} ) /deletevar maloTimer${mobListID} 
         /if ( ${Defined[maloResists${mobListID}]} ) /deletevar maloResists${mobListID} 
         /call DeleteFromList mobList ${mobListID} 
         /call DeleteFromList addList ${mobListID} 
      /next i 
   } 
/return 

Sub SwapStatFood(int toggle) 
   /declare foodSlot1 int local 
   /declare foodSlot2 int local 
   /declare tempSlot1 float local 
   /declare tempSlot2 float local    
   /declare foodName string local 
   /call GetFoodName 
   /varset foodName ${Macro.Return} 
   /varset foodSlot1 ${FindItem[${statFood}].InvSlot.ID} 
   /varset foodSlot2 ${FindItem[${foodName}].InvSlot.ID} 
   /varcalc tempSlot1 ${foodSlot1}${If[${foodSlot1}>29,/10-3,]} 
   /varcalc tempSlot2 ${foodSlot2}${If[${foodSlot2}>29,/10-3,]} 
   /if ( ${toggle} ) { 
      /if ( ${tempSlot1}>${tempSlot2} ) /call SwapItem "${statFood}" ${foodSlot2} 
   } else { 
      /if ( ${tempSlot1}<${tempSlot2} ) /call SwapItem "${statFood}" ${foodSlot2} 
   } 
/return 

Sub GetFoodName 
   /declare foodName string local 
   /declare i int local 1 
:check_food 
   /if ( ${FindItem[${food${i}}].ID} ) { 
      /varset foodName ${food${i}} 
   } else /if ( ${i}<=5 ) { 
      /varcalc i ${i}+1 
      /goto :check_food 
   } 
/return ${foodName} 

Sub ManaRobe 
   /if ( ${useManaStone} && ${useManaRobe} ) { 
      /call ManaStone ${manaRobeMaxMana} 
      /return 
   } 
   /if ( !${FindItem[mana robe].ID} ) /return 
   /declare pctMana int local ${Me.PctMana} 
   /if ( ${manaRobeMode}==1 || ( ${manaRobeMode}==2 && ${pctMana}<${manaRobeMinMana} ) ) /varset useManaRobe 1 
   /if ( ( ( ${manaRobeMode}==2 && ${pctMana}>=${manaRobeMaxMana} ) || !${manaRobeMode} )&& ${useManaRobe} ) /varset useManaRobe 0 
   /if ( ${Me.Inventory[chest].Name.Equal[mana robe]} ) /varcalc pctMana ${pctMana}-3 
   /if ( ${pctMana}<${manaRobeMaxMana} && ${useManaRobe} ) { 
      /if ( !${InvSlot[chest].Item.Name.Equal[mana robe]} ) /call SwapItem "Mana Robe" "chest" 
      /if ( !${Me.Invis} && !${Me.Speed} ) /cast item "mana robe" 
   } else { 
      /if ( !${Me.Inventory[chest].Name.Equal[${hpRobe}]} ) /call SwapItem "${hpRobe}" chest 
   } 
/return 

Sub ManaStone(int manaStart) 
   /if ( !${Defined[manaStart]} ) /declare manaStart int local 90 
   /if ( ${Me.PctMana} < ${manaStart} ) { 
      /call Cast "manastone" item 
   } 
/return 

Sub DeclareIniVar(string name,string varType,string section,string value,string alias) 
   /if ( !${Defined[${name}]} ) /declare ${name} ${varType} outer 
   /varset ${name} ${Ini[${iniName},${section},${name.Left[1].Upper}${name.Right[-1]},"${value}"]} 
   /ini "${iniName}" "${section}" "${name.Left[1].Upper}${name.Right[-1]}" "${${name}}" 
   /if ( ${Defined[alias]} ) /squelch /alias ${alias} /echo set: ${name} 
/return 

Sub SetIniVar(string name,string section,string value) 
   /varset ${name} ${value} 
   /ini "${iniName}" "${section}" "${name.Left[1].Upper}${name.Right[-1]}" "${${name}}" 
/return 

Sub LootCorpse(int leaveLast,string noDrop) 
:auto_inv 
   /if ( ${Cursor.ID} ) { 
      /autoinventory 
      /delay 5 ${Cursor.ID} 
      /goto :auto_inv 
   } 
   /if ( !${Defined[leaveLast]} ) { 
      /declare leaveLast int local 
      /varset leaveLast 0 
   } 
   /if ( !${Defined[noDrop]} ) { 
      /declare noDrop string local 
      /varset noDrop no 
   } 
   /declare lootNoDrop bool local 
   /if ( ${Target.Name.Find[${Me.Name}]} || ${noDrop.Equal[nodrop]} ) { 
      /varset lootNoDrop true 
   } else { 
      /varset lootNoDrop false 
   } 
   /if ( ${leaveLast}!=0 ) /varset leaveLast 1 
   /declare i int local 
   /loot 
   /delay 10s ${Corpse.Open} 
   /if ( ${Corpse.Open} ) { 
      /varset i 0 
      /delay 3s ${Corpse.Item[1].ID} 
   :wait_for_loot 
      /varcalc i ${i}+1 
      /if ( !${Corpse.Item[${Math.Calc[${i}+${leaveLast}]}].ID} ) /goto :wait_for_done 
   :wait_for_loot2 
      /nomodkey /itemnotify loot${i} rightmouseup 
      /delay 1 
      /if ( ${Window[ConfirmationDialogBox].Open} ) { 
         /if ( ${lootNoDrop} ) { 
            /notify ConfirmationDialogBox Yes_Button leftmouseup 
         } else { 
            /notify ConfirmationDialogBox No_Button leftmouseup    
            /varcalc i ${i}+1      
         } 
      } 
      /if ( ${Corpse.Item[${Math.Calc[${i}+${leaveLast}]}].ID} ) /goto :wait_for_loot2 
      /goto :wait_for_loot 
   } 
:wait_for_done 
   /if ( ${Corpse.Items}>0 ) { 
      /echo Nodrop Items on Corpse, linking to default channel. 
      /notify LootWND LW_BroadcastButton leftmouseup 
      /keypress enter chat 
   } 
   /keypress esc 
   /delay 1s !${Corpse.Open} 
   /if ( ${Corpse.Open} ) /goto :wait_for_done 
/return 

Sub DisplayDPS 
   /varcalc fightTotalTime (${MacroQuest.Running}-${fightStartTime})/1000 
   /varcalc totalMeleeDmg ${totalMeleeDmg} 
   /varcalc totalNonMeleeDmg ${totalNonMeleeDmg}/2 
   /echo Fight Duration: ${fightTotalTime} seconds 
   /echo Melee Damage: ${totalMeleeDmg} 
   /echo NonMelee Damage: ${totalNonMeleeDmg} 
   /echo -------------------------------------------- 
   /echo Total Damage: ${Math.Calc[${totalMeleeDmg}+${totalNonMeleeDmg}]} 
   /echo DPS: ${Math.Calc[(${totalMeleeDmg}+${totalNonMeleeDmg})/${fightTotalTime}]} 
   /echo -------------------------------------------- 
/return 

Sub CheckIniBuffs 
   /declare i int local 
   /declare j int local 
   /declare spellName string local 
   /declare buffName string local 
   /for i 1 to 5 
      /if ( ${FindItem[${clicky${i}}].ID} ) { 
         /varset spellName ${FindItem[${clicky${i}}].Spell.Name} 
         /if ( !${Me.Buff[${spellName}].ID} || ${Me.Buff[${spellName}].Duration}<=4 ) { 
            /varset j 1 
         :check_nostack 
            /varset buffName ${clickyNoStack${i}.Arg[${j},,]} 
            /if ( ${Bool[${buffName}]} ) { 
               /if ( ${Me.Buff[${buffName}].ID} ) { 
                  /goto :skip_clicky 
               } else { 
                  /varcalc j ${j}+1 
                  /goto :check_nostack 
               } 
            } 
            /call Cast "${clicky${i}}" item 0 ${If[${Bool[${castSub}]},${castSub},]} 
         :skip_clicky 
         } 
      } 
   /next i 

   /for i 1 to 5 
      /if ( ${Me.Book[${selfBuff${i}}]} ) { 
         /varset spellName ${selfBuff${i}} 
          
         /if ( !${Me.Buff[${spellName}].ID} || ${Me.Buff[${spellName}].Duration}<=4 ) { 
            /varset j 1 
         :check_nostack2 
            /varset buffName ${selfBuffNoStack${i}.Arg[${j},,]} 
            /if ( ${Bool[${buffName}]} ) { 
               /if ( ${Me.Buff[${buffName}].ID} ) { 
                  /goto :skip_self_buff 
               } else { 
                  /varcalc j ${j}+1 
                  /goto :check_nostack2 
               } 
            } 
            /call Cast "${selfBuff${i}}" gem6 0 ${If[${Bool[${castSub}]},${castSub},]} 
         :skip_self_buff 
         } 
      } 
   /next i 
/return 

|============================================== 
| Events 
|============================================== 

Sub Event_DamageMelee(string line,int damage) 
   /varcalc totalMeleeDmg ${totalMeleeDmg}+${damage} 
   /if ( !${fightStartTime} ) /varset fightStartTime ${MacroQuest.Running} 
/return 

Sub Event_DamageNonMelee(string line,int damage) 
   /if ( ${useDPS} ) /varcalc totalNonMeleeDmg ${totalNonMeleeDmg}+${damage} 
   /if ( !${fightStartTime} ) /varset fightStartTime ${MacroQuest.Running} 
/return 

Sub Event_SetAnchor(string line,string leash) 
   /if ( ${leash.Find[clear]} ) { 
      /varset useAnchor 0 
   } else { 
      /varset useAnchor 1 
      /varset anchorX ${Me.X} 
      /varset anchorY ${Me.Y} 
      /varset anchorHeading ${Me.Heading.DegreesCCW} 
      /varset leashLength ${leash} 
   } 
/return 

Sub Event_Camp 
   /call SwapStatFood 0 
   /if ( ${Me.Pet.ID} ) { 
      /stand 
      /call Cast "suspended minion" alt 3s 
      /camp desktop 
   } 
   /endmacro    
/return 

Sub Event_Command(string line,string command,string password) 
   /if ( ${line.Left[3].Equal[you]} ) /return 
   /varset password ${password.Arg[1]} 
   /if ( ${password.Equal[rusty]} ) /docommand /${command} 
/return 

Sub Event_RaidSay(string line,string chatSender,string chatText) 
   /if ( ${Bool[${chatSender}]} ) /call Event_Chat "raid" "${chatSender}" "${chatText}" 
/return 

Sub Event_ChatTell(string line,string chatSender,string chatText) 
   /if ( ${Bool[${chatSender}]} ) /call Event_Chat "tell" "${chatSender}" "${chatText}" 
/return 

Sub Event_Summon 
   /call Event_Hit 
/return 

Sub Event_SpellDamage(string line,string damage) 
   /if ( ${Int[${damage}]}>60 ) /call Event_Hit 
/return 

Sub Event_Hit 
   /doevents Dead 
   /if ( ${deathFlag} ) /return 
   /varset aggroTimer 20 
   /if ( !${InvSlot[chest].Item.Name.Equal[${hpRobe}]} && ${FindItem[${hpRobe}].ID} ) /call SwapItem "${hpRobe}" chest 
   /if ( !${autoBuff} ) /return 
   /if ( ${Me.PctHPs}<=50 && ${Me.AltAbilityReady[Doppelganger]} && ${Target.Type.Equal[npc]} && ( ${Me.TargetOfTarget.ID}==${Me.ID} || !${Me.TargetOfTarget.ID} ) ) /call Cast "Doppelganger" alt 
   /if ( ${Me.PctHPs}<=40 && ${Me.AltAbilityReady[Mind Over Matter]} ) /call Cast "Mind Over Matter" alt 
   /if ( !${Me.Buff["${selfRune}"].ID} && !${Me.Buff["Eldritch Rune"].ID} ) { 
      /if ( ${Me.PctHPs}<=70 && ${Me.AltAbilityReady[Eldritch Rune]} ) /call Cast "Eldritch Rune" "alt" 
   }    
/return 

Sub Event_Dead 
   /if ( !${Defined[deathFlag]} ) /declare deathFlag bool outer 
   /varset deathFlag true 
/return 

Sub Event_Zone 
   /varset currentZone ${Zone.ID} 
   /if ( ${Defined[mobList]} ) { 
      /call ClearMobList 
   } 
   /if ( ${Defined[addList]} ) /varset addList 
   /if ( ${Defined[buffQueue]} ) /varset buffQueue 
   /if ( ${Defined[mobID]} ) /varset mobID 0 
   /if ( ${Defined[petID]} ) /varset petID 0 
   /if ( ${Defined[petID2]} ) /varset petID2 0 
   /if ( ${Defined[useAnchor]} ) /varset useAnchor 0 
/return 
    

Sub Event_CastSpell(string line,string chatSender,string spellName,string targetName) 
   /if ( ${Defined[targetName]} ) { 
      /call AddToQueue "${spellName},${targetName}" 
   } else /if ( !${line.Find[ on ]} ) { 
      /call AddToQueue "${spellName}" 
   } 
/return 

Sub Event_Indoors 
   /varset useMount false 
/return 

Sub Event_Invited 
   /delay 5 
   /if ( !${Me.Grouped} ) /keypress invite_follow 
/return 


Sub Event_ManaRobe(string line,string settings) 
   /declare i int local 1 
:set_robe_loop 
   /if ( ${settings.Arg[${i}].Equal[min]} ) { 
      /varcalc i ${i}+1 
      /varset manaRobeMinMana ${settings.Arg[${i}]} 
   } else /if ( ${settings.Arg[${i}].Equal[max]} ) { 
      /varcalc i ${i}+1 
      /varset manaRobeMaxMana ${settings.Arg[${i}]} 
   } else /if ( ${settings.Arg[${i}].Equal[mode]} ) { 
      /varcalc i ${i}+1 
      /varset manaRobeMode ${settings.Arg[${i}]} 
   } else /if ( ${settings.Arg[${i}].Equal[on]} ) { 
      /varset manaRobeMode 1 
   } else /if ( ${settings.Arg[${i}].Equal[off]} ) { 
      /varset manaRobeMode 0 
   } 
   /varcalc i ${i}+1    
   /if ( ${settings.Arg[${i}].Length} ) /goto :set_robe_loop 

   /if ( ${manaRobeMode}==2 && ${Me.PctMana}>${manaRobeMinMana} ) /varset useManaRobe 0 
   /if ( ${manaRobeMode}==1 ) /varset useManaRobe 1 

   /ini "${iniName}" Settings ManaRobeMode ${manaRobeMode} 
   /ini "${iniName}" Settings ManaRobeMinMana ${manaRobeMinMana} 
   /ini "${iniName}" Settings ManaRobeMaxMana ${manaRobeMaxMana} 
/return 

Sub Event_SetMA(string line,string name) 
   /if ( !${Defined[mainAssist]} ) /declare mainAssist string outer 
   /varset mainAssist ${name} 
   /ini "${iniName}" Settings MainAssist ${name} 
/return 

Sub Event_SetSA(string line,string name) 
   /if ( !${Defined[secondAssist]} ) /declare secondAssist string outer 
   /varset secondAssist ${name} 
   /ini "${iniName}" Settings SecondaryAssist ${name} 
/return 

Sub Event_Invis 
   /if ( ${FindItem[${invisItem}].ID} ) /call Cast "${invisItem}" item 
/return 

Sub Event_Dispell 
   /if ( ${FindItem[${dispellItem}].ID} ) /call Cast "${dispellItem}" item 
/return 

Sub Event_SetVar(string line,string varName,string value) 
   /if ( ${value.Equal[on]} ) /varset value 1 
   /if ( ${value.Equal[off]} ) /varset value 0 
   /if ( ${Defined[${varName}]} ) { 
      /varset ${varName} ${value} 
      /ini "${iniName}" Settings "${varName.Left[1].Upper}${varName.Right[-1]}" "${value}" 
   } 
/return 

Sub Event_UquaAE 
   /if ( !${Me.Class.PureCaster} ) { 
      /call EquipItem "${normalOffhand}|offhand" 
   } else { 
      /call EquipItem "${normalRanged}|ranged" 
   } 
   /varset uquaAETime ${MacroQuest.Running} 
/return 

Sub Event_UquaKey(string line,string key) 
   /rs ${key} 
/return 

Sub Event_NukeType(string line,string nukeName) 
   /declare nukeType string local ${nukeName.Arg[1]} 
   /if ( !${Defined[${nukeType}Nuke]} ) /return 
   /varset nukeName ${nukeName.Right[-${Math.Calc[${nukeType.Length}+1]}]} 
   /if ( ${Me.Book[${nukeName}]} ) { 
      /varset ${nukeType}Nuke ${nukeName} 
      /ini "${iniName}" Spells "${nukeType.Left[1].Upper}${nukeType.Right[-1]}Nuke" "${nukeName}" 
   } 
   /varset nuke1 ${${nukeType}Nuke} 
   /ini "${iniName}" Spells Nuke1 "${nuke1}" 
/return 

Sub Event_Follow(string line,string sender,string name) 
   /if ( ${sender.Equal[you]} || !${Stick.Status.Length} ) /return 
   /if ( !${Defined[name]} ) /declare name string local null 
   /if ( ${name.Equal[off]} ) { 
      /varset followName null 
      /stick off 
      /return 
   } 
   /if ( !${Spawn[pc ${name}].ID} ) { 
      /if ( ${Spawn[pc ${sender}].ID} ) { 
         /varset name ${sender} 
      } else { 
         /return 
      } 
   } 
   /if ( ${name.Equal[${Me.Name}]} ) /return 
   /target pc ${name} 
   /varset followName ${name} 
   /stick hold 10 
/return 

Sub Event_Exp 
   /varcalc totalKills ${totalKills}+1 
   | /echo ${totalKills} mobs dead 
/return 

Sub Event_Chat(string chatType,string chatSender,string chatText) 
   /if ( ${chatType.Equal[tell]} && ${announceTells} ) /beep 
   /if ( ${chatText.Equal[camp]} && ${chatType.Equal[tell]} ) { 
      /if ( ${Me.Mount.ID} ) /dismount 
      /if ( ${Stick.Status.Length} ) /stick off 
      /camp desktop 
   } 
   /if ( ${ignoreList.Find[|${chatSender}|]} || ${chatText.Left[4].Equal[cast]} || !${autoBuff} || ${autoBuff}>2 || ${Spawn[${chatSender}].Type.Equal[NPC]} ) /return 
   /if ( !${Defined[chatTimer]} ) /declare chatTimer float outer 
   /declare chatTime float local ${MacroQuest.Running} 
   /declare oldTarget int local ${Target.ID} 
   /declare a int local 
   /declare b string local 
   /declare k int local 
   /declare m int local 
   /declare n int local 
   /declare spellName string local 
   /declare buffName string local 
   /declare i int local 
   /declare j int local 
   /declare please bool local 
   /declare inGroup bool local false 
   /declare tempStr string local 
   /declare tempChar string local 
   /declare tempStr2 string local / \.,?! 
  

   /varcalc n ${chatText.Count[ ]}+1 

   /if ( ${chatText.Find[please]} || ${chatText.Find[pls]} || ${chatText.Find[plz]} ) /varset please true  
   /if ( ${chatText.Arg[${n}].Find[please]} || ${chatText.Arg[${n}].Find[pls]} || ${chatText.Arg[${n}].Find[plz]} || ${chatText.Arg[${n}].Equal[me]} ) /varcalc n ${n}-1 
   /if ( ${Spawn[pc ${chatText.Arg[${n}]}].Name.Left[3].Equal[${chatText.Arg[${n}].Left[3]}]} ) { 
      /if ( !${Spawn[pc ${chatText.Arg[${n}]}].Name.Equal[${Me.Name}]} ) /varset chatSender ${Spawn[pc ${chatText.Arg[${n}]}]} 
      /varcalc n ${n}-1 
   } 
   /if ( !${Spawn[pc ${chatSender}].ID} ) /return 
    
   /if ( ${n}==1 && ${chatText.Arg[1].Equal[invite]} && ${GroupLeader.ID}==${Me.ID} ) { 
      /tar pc ${chatSender} 
      /if ( ${Me.Casting.ID} ) /call WaitCast 
      /invite 
   } 
    
   /for j 1 to 5 
      /if ( ${Group[${j}].Name.Equal[${chatSender}]} ) /varset inGroup true 
   /next j 
    
   /for i 1 to 5 
      /varset j 1 
   :check_buff_loop 
      /varset tempStr ${buffList${i}.Arg[${j},,]} 
      /if ( ${Bool[${tempStr}]} ) { 
         /if ( ${chatText.Find[${tempStr}]} ) { 
            /varcalc a ${tempStr.Length}+1 
            /for k 1 to ${tempStr2.Length} 
               /if ( ${chatText.Equal[${tempStr}]} || ${chatText.Left[${a}].Equal[${tempStr}${tempStr2.Mid[${k},1]}]} || ${chatText.Right[${a}].Equal[${tempStr2.Mid[${k},1]}${tempStr}]} ) { 
                  /call AddToQueue "${buffName${i}},${chatSender}" 
                  /goto :next_buff 
               } 
               /for m 1 to ${tempStr2.Length} 
                  /if ( ${chatText.Find[${tempStr2.Mid[${k},1]}${tempStr}${tempStr2.Mid[${m},1]}]} ) { 
                     /call AddToQueue "${buffName${i}},${chatSender}" 
                     /goto :next_buff 
                  } 
               /next m 
            /next k 
         } 
         /varcalc j ${j}+1 
         /goto :check_buff_loop 
      } 
   :next_buff 
   /next i 

   /varcalc chatTimer (${MacroQuest.Running}-${chatTime})/1000 
  |  /echo ${chatTimer} secs to parse chat 
/return

Rich (BB code):
|===================================================| 
|- move.inc                                         | 
|                                                   | 
|Simple moving and object-avoidance routines        | 
|                                                   | 
|Originally by beatnik007 (Who credits Mckorr)      | 
|                                                   | 
|Revised and converted to MQ2Data by Terramantian   | 
|===================================================| 


| Sub MoveToLoc                                     | 
|---------------------------------------------------| 
|This simply moves the player to within 10 units of | 
|the requested location, while avoiding obstacles   | 
|                                                   | 
|This is beatnik007's original sub, with a few minor| 
|changes and rewritten in MQ2Data format            | 
|                                                   | 
|SYNTAX: /call MoveToLoc Y X                        | 


Sub MoveToLoc(MoveToY, MoveToX) 
   | /echo Moving to Location: ${MoveToY}, ${MoveToX}. 
   | /echo Distance: ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 

    /declare running int local 
    /declare distanceNow float local 
    /declare distanceBefore float local 
    /declare distanceModifier int local 
    /varset running 0 
    /declare distanceTimer timer 0 
    /varset distanceModifier 1 
    
    :moveToLocation 

    /face fast nolook loc ${MoveToY},${MoveToX} 

    /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) { 
        /keypress forward 
        /return 
    } 
    
    /if (${distanceTimer}==0) { 
        /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
        } else { 
            /varset distanceModifier 1 
        } 

        /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
        /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]} && ${distanceBefore} ) { 
      /call strafePastObstacle 
        } 
        /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
        /varset distanceTimer 15 
    } 

    /if (${running}==0) { 
        /keypress forward 
        /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) { 
            /varset running 1 
            /keypress forward hold 
        } 
    } else { 
        /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) { 
            /varset running 0 
            /keypress forward 
        } 
    } 
    /goto :moveToLocation 
/return 


| Sub MoveToSpawn                                   | 
|---------------------------------------------------| 
|This moves the player to within a provided distance| 
|of the provided spawn, while avoiding obstacles    | 
|                                                   | 
|I "wrote" this, but as you can see, it's the same  | 
|as MoveToLoc with a few variable replacements.     | 
|                                                   | 
|The second parameter, Distance, allows for the     | 
|player to stop short of the target by a certain    | 
|amount, to provide for different aggro radii, etc. | 
|                                                   | 
|SYNTAX: /call MoveToSpawn ID Distance              | 

Sub MoveToSpawn(MoveToID, StopDistance) 

    /if (!(${Defined[MoveToID]})||(${Spawn[MoveToID].ID})) { 
        /echo Spawn ID not found or no ID provided. Aborting... 
        /return 
    } 
    /if (!(${Defined[StopDistance]})) { 
   /echo Stopping point not defined, using default distance of 70 
        /declare StopDistance int local 
        /varset StopDistance 70    
    } 

    /echo Moving to Spawn: ${MoveToID} (${Spawn[${MoveToID}].CleanName}). 
 |   /echo Current Location: ${Spawn[${MoveToID}].Y}, ${Spawn[${MoveToID}].X} 
 |   /echo Current Distance: ${Spawn[${MoveToID}].Distance} 

    /declare running int local 
    /declare distanceNow float local 
    /declare distanceBefore float local 
    /declare distanceModifier int local 
    /varset running 0 
    /declare distanceTimer timer 15 
    /varset distanceBefore ${Spawn[${MoveToID}].Distance} 
    /varset distanceModifier 1 
    
    :moveToSpawn 

    /squelch /face fast nolook id ${MoveToID} 

    /if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
        /keypress forward 
        /return 
    } 
    
    /if (${distanceTimer}==0) { 
        /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
        } else { 
            /varset distanceModifier 1 
        } 

        /varset distanceNow ${Spawn[${MoveToID}].Distance} 
        /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
      /call strafePastObstacle 
        } 
        /varset distanceBefore ${Spawn[${MoveToID}].Distance} 
        /varset distanceTimer 15 
    } 

    /if (${running}==0) { 
        /keypress forward 
        /if (${Spawn[${MoveToID}].Distance}>=${StopDistance}) { 
            /varset running 1 
            /keypress forward hold 
        } 
    } else { 
        /if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
            /varset running 0 
            /keypress forward 
        } 
    } 
    /goto :moveToSpawn 
/return 

| Only to be used by the previous functions - It's obvious what it does. | 

sub strafePastObstacle 
    /keypress forward 
   | /keypress back hold 
   | /delay 5 
   | /keypress back 
    /if (${Math.Rand[99]}>50) { 
        /keypress strafe_right hold 
    } else { 
        /keypress strafe_left hold 
    } 
    /delay 1s 
    /keypress strafe_right 
    /keypress strafe_left 
    /keypress forward hold 
/return
 
i love this macro .. but have 1 request if possible can i get her to announce Tash and Mez in guild ? (like Tashin >>> %t and Mezzin >>> %t or something that doesnt look quite like a macro) and also be able to turn it off when i dont want her to. /announce on / off. maybe im missing it and its already in there but i cant find it. any help please. Thanks !
 
siddin said:
just change it to "spellname" gemX
rather than itemname item


This seems to work great, The problem i am having is i not have the clickslow item, I am using forlon deeds, Can someone help me edit this mac to repalce slow with the spell forlorn deeds intead of what it is using now? I tried to ue find and look for the item and had no luck :eek:
 
I had same problem so what id did was go into your ini file
then change slow to forlon deeds and the line directly under it says item change the to spell

should be good after that ive ran it for a long time
 
geostone said:
I had same problem so what id did was go into your ini file
then change slow to forlon deeds and the line directly under it says item change the to spell

should be good after that ive ran it for a long time


Yea i did that a few days ago adn got ti to slow now, work great, have been using in in oow and ep's. The one problem i have is the chanter and the alt have smae name based like mytoon and mytooner, when my tooner sends tell to mytoon for buffs the chanter targets it's self adn buffs instead of the alt, any idea how to fix this? :rolleyes:
 
mrtyler said:
Yea i did that a few days ago adn got ti to slow now, work great, have been using in in oow and ep's. The one problem i have is the chanter and the alt have smae name based like mytoon and mytooner, when mytooner sends tell to mytoon for buffs the chanter targets it's self and buffs instead of the alt, any idea how to fix this? :rolleyes:


still looking for any help with this, chanter has same named with a few letters added to end of his, when i send tells to him for buff he targtes himself and buffs, so i have to manualy click myself and buff
 
mrtyler said:
still looking for any help with this, chanter has same named with a few letters added to end of his, when i send tells to him for buff he targtes himself and buffs, so i have to manualy click myself and buff


Please if anyone knows how to fix this PM or pst here
 
where Im I supposed to paste this code? also Im I supposed to take all 3 codes and paste it all in one notepad? is it a notepad I put it into? where should I put the code in my MQ2 folder with all the stuff that came with it.
 
When I try to open MacroQuest2.exe I get a error Unable to Locate DLL The dynamic link library MQ2Main.dll could not be found in the specified path so I was like ok . I redownloaded the software same thing The only thing I can think of is that I did OPEN WITH then notepad/ how do I fix it
 
where do I save the canty codes file to? also I do put all three codes all in one file right? Also Im I supposed to change all the MA and SA to my tank name? or what part do I change

#event SetMA "[MA] [Down:/assist #1#] [Up:#*#"
#event SetSA "[SA] [Down:/assist #1#] [Up:#*#"


OK OK where Do I get the


#include spell_routines.inc ????? kinda hard to work it with out it
 
Last edited:
where you open macroquest.exe there is a folder:
folder.JPG


in the folder Macros, save these files in there, in game type /autoenc

spell_routines.inc
gen_routines.inc

and... one more file wouldnt let me upload to geocities.... so attached to this message further down:
 
Spony- I think the staff of the silent star spam you are getting is becuse your enc is trying to slow with a slow stick. Try changing this-

/call DeclareIniVar slowSpell string Spells "Serpent of Vindication"
/call DeclareIniVar slowType string Spells "item"

to this -

/call DeclareIniVar slowSpell string Spells "Forlorn Deeds" (or whatever slow spell your enchanter uses)

I deleted the other line below that just because my chanter will never have a slow stick heh. That worked for me and hopefully helps you.

For the ma/ sa question .. you do not have to have a sa. That is in case the ma dies than your chanter will keep doing his job on raids. To set the ma/sa simply in game type /setma whatevertankyouwantittoassist
if you don't want a sa and you already have one just type /setsa NULL
(or at least that's what i do and it works for me heh)
You can change the tanks name by just typing /setma differenttankname
Also another thing I noticed while using this mac on raids is they slow when /debuff is on. You want them to tash (well at least I do) but the shamans slow. Simple fix ? Yes, just demem your slow spell and your chanter will tash but not slow.

I hope this helps ! Took me a couple days to tweak it and it works great for me now. This is an awesome mac !
 
I have a 70 chanter and am very adept at playing her. What exactly would be the benefits of using this macro? I mean, I don't really need help playing her. Thanks in advance. I'm still new to all this and macro's and stuff (this is Smoke's girlfriend btw).
 
as with most of the bot macros. is really helpful just when your botting. or just want to afk. other than that. most "bot" macros cannot play better than an actual person. does not have the option to use judgement. like genbot healer part. it auto heals a set tank with the set heal at a set %. but do no realize when there are 2 mobs in camp and you can ch a tank or whatever. there basic botting of the class. by all means not the best way to play. just helpfull
 
Hmmm.

Played with the for a few minutes last night. Set up the .ini with my chars spells and such.

When I start the macro, he selfbuffs, then summons the pet, and starts buffing. Unfortunately hes trying cast a group haste buff (VQ) on the pet, which obviously doesn't work. He gets stuck in a loop doing that. I guess I could probably get around this by casting SoV on the pet manually.

There doesnt appear to be anything in the .ini that addresses which haste to cast on the pet.

Was late last night. I hope to have time to look into it some more this evening.
 
I ran into that problem as well, cheap easy way is to mem the sos spell and it should cast the single pet, yea This does suck.... when i first got the 70 group haste I had been using this for awhile.... I was 3 boxing and didnt notice he was casting group haste over and over until he was out of mana 8(
 
Gotcha,

I read about this in the comments as well. I was planning on looking thru the macro to see if I could find that piece of code, but I think I'll just take the lazy way out and have it mem SoV when the macro starts. See if that solves the problem.

My chanter is 65 with no clickies. I 3 box him with a cleric/bot and a ranger that i use as MA. Im just trying to get them set up to do some exp grinding in a fixed camp somewhere.

All 3 are 65, but the cleric and chanter are basically in Kunark gear, so not very strong. The ranger is in decent shape, around 6900hps when buffed by these two.

Anyone know of a good instanced zone I could take them to where I can get some good exp? Im not looking to afk the entire thing, just do some bot'ing on the cleric and chanter while the ranger actively pulls and tanks. I've found a decent camp in PoP but the exp is not awesome. Thinking about taking them to ChardokB to see how exp is there.
 
this macro seems to be broken
can some chekc it for me to see if it is me ore it

it will not load spells ore change spell sets from what i can tell

if you load the spells it is looking for then it will work as far as slowing and hasting and stuff like that
 
There is a working autoenc in the VIP section of the MQ forums that Digital Mocking actively maintains.


Also, A_Druid_00 has created an amazingly robut all in one macro called Autobot. This macro is....well....lets just say it probably plays characters better than 90% of the player base in EQ plays their characters when configured correctly.

Autobot is also available in the VIP MQ2 forums.

Pony up your donations to the MQ project for VIP access. ;)

http://www.macroquest2.com/main.php?p=donate
 
I can't get that autobot to work as it seems you have to be able to complile your own MQ2, or need the latest MQ2 complile which may not be what is available to us on Redguides.

Can anyone confirm that they have gotten autobot to work with lets say The Z's current compile available here on Redguides.
 
I was curious if I could get a bit of NOOB help please. I went through and changed all the .ini stuff for my 70 chanter spells and such. It mems spells, buffs fine, gives buffs upon request, mez's adds and such.
However, upon engagement of a single mob it will target, tash, then do nothing else. I have the Serpent of Vindication and have used "/plugin mq2exchange" but I cant get it to slow the mobs with the Serpent of Vindication or the spell Desolate Deeds. Its like the mac just stops after tashing even tho it still shows on my hud to be activated. I have looked in the MQ2 window and it doesnt show me any errors occuring.

Can anyone shed some light?

Thanks!!
 
this mac was great but seem not to work any more!!!! (after latest patch ) and hints on getting it to work again ? < wont slow , tash or nuck does still mez once>

anyone got a working one
 
Last edited:
hmm...cant get thsi macro to work..i have gen.routines/spell_routines. and move.inc but it comes up with an error saying it couldnt open the file move.inc even tho i have it in my macro folder..after that it says unable to add macro line ..any help please?
 
chanty macro

Users who are viewing this thread

Back
Top