Refurbished mage.mac

gladimus

New member
Joined
Jan 3, 2006
Messages
344
Reaction score
0
Points
0
Ok peps,

I have done some pretty extensive work on this mac and updated for a 79 mage (only because I havent hit 80 yet). It does everything I want it to do with a few exceptions.

If you dont have the rod spell memmed, it freaks out.

It wont do COH. It only targets itself and says you cant invite yourself.

Here is the mac:

Code:
 mage.mac  
| By Rusty~  
| Maintained by Showme1  
| Updated by Jamie75 
| Last update 9/3/2007 
|  
| /macro mage [ma name][sa name][radius #][nuke fire|magic|bolt][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. It will then send in pet and debuff the mob  
|   if debuffs are enabled. It will then wait till mob is under the spcified hp, or the specified time  
|   has expired since the tank has engaged, then it will start nuking.  
|   This will also keep self buffs up, keep pet up (with weapons, belt, and mask), and buff and rod  
|   people that ask (with the spells specified in ini). Will coth people that ask for it via tells  
|  
|  
|   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=rod,modrod  
|      BuffName1=Magi`kot's Pants of Convergence  
|      BuffType1=item  
|  
|   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 respectively  
|  
|   For each self buff and clicky buff, there's a place to put all the buffs that don't stack with it:  
|  
|      SelfBuff1=Phantom Shield  
|      SelfBuffNoStack1=Protection of the Nine,Blessing of the Nine,Steeloak Skin  
|  
|   *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 on|off                            - turns auto buffing on or off                                  |  
|  /debuff on|off                          - turns auto debuffing 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             |  
|  /companion on|off                       - sets auto pet summon on or off                                |  
|  /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                                                        |  
|  /nuketype fire|magic|bolt [spellname]   - sets your current nuke to the specified type                  |  
|                                          - include spell name to set the nuke for that type              |  
|  /ds on|off                              - turns group ds on or off                                      |  
|  /pettype earth|wind|fire|water          - Sets the ini to the desired pet type for when /companion      |  
|                                            is on it will summon that type of pet                         |  
|----------------------------------------------------------------------------------------------------------+  

#include mage_routines.inc  
#include gen_routines.inc  
#include move.inc  

#turbo 40  

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

#event Coth "#1# tells you, 'coh'"  
#event Coth "#1# tells you, 'coh #2#'"  
#event Coth "#1# told you, 'coh'"  
#event Coth "#1# told you, 'coh #2#'"  
#event Gate "#1# gates#*#"  
#event Goto "[MQ2] goto #1#"  
#event PetWeps "#1# #*#'#*#pet weps#*#'"  
#event RageOff "#*#is no longer enraged#*#"  
#event RageOn "#*#has become ENRAGED#*#"  

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 1 /mount  
   /call DeclareIniVar useDebuff int Settings 1 /debuff  
   /call DeclareIniVar nukeMode int Settings 1 /nuke  
   /call DeclareIniVar useCharm int Settings 0 /charm  
   /call DeclareIniVar useDPS int Settings 1 /dps  
   /call DeclareIniVar usePet int Settings 1 /companion  
   /call DeclareIniVar privateChannel string Settings "deb"  
   /call DeclareIniVar channelAnnounce int Settings 1  
   /call DeclareIniVar autoAnnounce string Settings 1   
   /call DeclareIniVar noInterrupt int Settings 0  
   /call DeclareIniVar useManaStone int Settings 0  
   /call DeclareIniVar checkNamed int Settings 0 /checknamed  
   /call DeclareIniVar noInvis int Settings 1  
   /call DeclareIniVar useManaRobe int Settings 0  
   /call DeclareIniVar manaRobeMode int Settings 1  
   /call DeclareIniVar manaRobeMinMana int Settings 70  
   /call DeclareIniVar manaRobeMaxMana int Settings 94  
   /call DeclareIniVar nukeMana int Settings 25 /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 useGroupDS int Settings 1 /ds     
   /call DeclareIniVar clarityBitch string Settings  
   /call DeclareIniVar spellSet string Settings "bot"  
   /call DeclareIniVar maloDuration string Settings 19m  
   /call DeclareIniVar resistsTillMala int Settings 3  
   /call DeclareIniVar resistsTillQuit int Settings 6  

   /call DeclareIniVar nuke1 string Spells "Bolt of Molten Dross"  
   /call DeclareIniVar nuke2 string Spells "Fickle Inferno "  
   /call DeclareIniVar magicNuke string Spells "Shock of Silvered Steel"  
   /call DeclareIniVar fireNuke string Spells "Fickle Inferno"  
   /call DeclareIniVar boltNuke string Spells "Bolt of Molten Dross"  
   /call DeclareIniVar shielding string spells "Eidolic Guardian"  

   /call DeclareIniVar windPet string Spells "Essence of Air"  
   /call DeclareIniVar earthPet string Spells "Essence of Earth"  
   /call DeclareIniVar firePet string Spells "Core of Fire"  
   /call DeclareIniVar waterPet string Spells "Core of Water"  

   /call DeclareIniVar petSpell string Spells "Core of Water"  
   /call DeclareIniVar malosiniaSpell string Spells "Malosinatia"  
|   /call DeclareIniVar malosiniaType string Spells "spell"  
|   /call DeclareIniVar malaSpell string Spells "Malosinatia"  
   /call DeclareIniVar malaType string Spells "gem3"  
   /call DeclareIniVar summonedWepSpell string Spells "Summon Staff of the North Wind"  
   /call DeclareIniVar summonedWepType string Spells "gem2"  
   /call DeclareIniVar summonedBeltSpell string Spells "Girdle of Magi'Kot"  
   /call DeclareIniVar summonedBeltType string Spells "gem2"  
   /call DeclareIniVar summonedMaskSpell string Spells "Muzzle of Mowcha"  
   /call DeclareIniVar summonedMaskType string Spells "gem2"  
   /call DeclareIniVar groupDSSpell string Spells "Circle of Magmaskin Rk. II"  
   /call DeclareIniVar singleDSSpell string Spells "Lavaskin"  
   /call DeclareIniVar siphonSpell string Spells "Elemental Symbiosis Rk. II"
   /call DeclareIniVar siphonSpellType string Spells "gem4"  
   /call DeclareIniVar petstr string Spells "Aegis of Calliav Rk. II"  
   /call DeclareIniVar pethpSpell string Spells "Elemental Conjunction"  
   /call DeclareIniVar pethpBuff string Spells "Staff of Elemental Essence"  
   /call DeclareIniVar pethpType string Spells "item"  
   /call DeclareIniVar petHaste string Spells "Burnout VII"  
   /call DeclareIniVar petShrinkSpell string Spells "Symbol of Ancient Summoning"  
   /call DeclareIniVar petShrinkType string Spells "item"  
   /call DeclareIniVar rodSpell string Spells "Wand of Prime Transvergence"  
   /call DeclareIniVar rodType string Spells "spell"  

   /call DeclareIniVar selfBuff1 string Spells "Phantasmal Warden Rk. II"  
   /call DeclareIniVar selfBuffNoStack1 string Spells "Protection of the Nine,Blessing of the Nine,Steeloak Skin,Blessing 

of Steeloak,Direwild Skin,Direwild Skin Rk. II,Blessing of the Direwild,Blessing of the Direwild Rk. II"  
   /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 "rod,modrod"  
   /call DeclareIniVar buffName1 string Spells "Wand of Prime Transvergence"  
   /call DeclareIniVar buffType1 string Spells "spell"  
   /call DeclareIniVar buffList2 string Spells "ds,dmg shield,damage shield"  
   /call DeclareIniVar buffName2 string Spells "ds"  
   /call DeclareIniVar buffType2 string Spells "gem2"  
   /call DeclareIniVar buffList3 string Spells " "  
   /call DeclareIniVar buffName3 string Spells " "  
   /call DeclareIniVar buffType3 string Spells " "  
   /call DeclareIniVar buffList4 string Spells " "  
   /call DeclareIniVar buffName4 string Spells " "  
   /call DeclareIniVar buffType4 string Spells " "  
   /call DeclareIniVar buffList5 string Spells " "  
   /call DeclareIniVar buffName5 string Spells " "  
   /call DeclareIniVar buffType5 string Spells " "  

   /call DeclareIniVar hpRobe string Items "${InvSlot[chest].Item.Name}"  
   /call DeclareIniVar clicky1 string Items "Fractured Bone Ridges"  
   /call DeclareIniVar clickyNoStack1 string Items " "  
   /call DeclareIniVar clicky2 string Items " "  
   /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 "Misty Thicket Picnic"  
   /call DeclareIniVar food1 string Items "Misty Thicket Picnic"  
   /call DeclareIniVar food2 string Items   
   /call DeclareIniVar food3 string Items   
   /call DeclareIniVar food4 string Items  
   /call DeclareIniVar food5 string Items  
   /call DeclareIniVar meleeWep string Items "Wand of Temporal Power"  
   /call DeclareIniVar invisItem string Items " "  
   /call DeclareIniVar dispellItem string Items " "  
   /call DeclareIniVar normalMainhand string Items "${InvSlot[mainhand].Item.Name}"  
   /call DeclareIniVar normalOffhand string Items "${InvSlot[offhand].Item.Name}"  
   /call DeclareIniVar hpMask string Items "${InvSlot[face].Item.Name}"  

   /squelch /custombind add ma  
   /squelch /custombind add sa  
   /squelch /alias /anchor /echo SetAnchor  
   /squelch /alias /manarobe /echo Mana Robe  
   /squelch /alias /nuketype /echo NukeType  
   /squelch /alias /pettype /echo PetType  
   /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  
   /declare petID2 int outer 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[debuff]} ) {  
         /call SetIniVar useDebuff Settings 1  
      } else /if ( ${Param${i}.Equal[nodebuff]} ) {  
         /call SetIniVar useDebuff Settings 0  
      }  
      /varcalc i ${i}+1  
      /goto :check_params  
   }  

   /call SwapStatFood 1  

   /if ( ${autoAnnounce} ) /announce on  

   /echo Auto Mage Mode Activated  
   /if ( ${nukeMode} || ${useDebuff} ) {  
      /echo Main Assist: ${mainAssist}  
      /if ( ${Bool[${secondAssist}]} ) /echo Secondary Assist: ${secondAssist} (if ${mainAssist} dies)  
   }  
   /if ( ${nukeMode} || ${useDebuff} ) /echo Will ${If[${useDebuff},malosinatia ,]}${If[${nukeMode} && ${useDebuff},then 

,]}${If[${nukeMode},start nuking ,]}at ${minHP}%  
   /if ( ${autoBuff} ) /echo Auto Buff is enabled.  
   /if ( ${useMount} ) /echo Mount is enabled.  
   /if ( ${manaRobeMode} ) /echo ManaRobe Mode: ${manaRobeMode}  
:wait_for_target  
   /if ( !${petSpamTimer} ) {  
      /pet hold 
      /varset petSpamTimer 50  
   }  
   /if ( ${nukeMode} || ${useDebuff} ) /echo Waiting for target...  
   /varset validTarget 0  
:wait_for_target2  
   /if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist}].ID} ) ) {  
      /varset mainTank ${secondAssist}  
   } else {  
      /varset mainTank ${mainAssist}  
   }  
   /if ( !${Corpse.Open} && ${Spawn[${mainAssist}].NearestSpawn[npc radius ${Math.Calc[${minRadius}*2]}].ID} && ( 

${nukeMode} || ${useDebuff} ) ) {  
      /if ( ${Me.Casting.ID} ) /call WaitCast  
      /assist ${mainTank}  
      /varset oldTarget ${Target.ID}  
      /varset tempTimer 5  
   :wait_for_assist1  
      /call CheckTarget  
      /if ( ${tempTimer} && !${validTarget} ) /goto :wait_for_assist1  
   }  
   /call CheckTarget  
   /if ( !${validTarget} || ( !${nukeMode} && !${useDebuff} ) ) {  
      /call CheckPet  
      /call CheckPet2
      /doevents  
      /call CheckBuffs  
      /call CheckLoc  
      /call ManaRobe  
      /delay 0  
      /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}  
   /varset nukeWaitTimer 0  
   /if ( ${Defined[waitTimer${mobID}]} ) /deletevar waitTimer${mobID}  
   /declare waitTimer${mobID} int outer -1  
   /varset newAdds 0  
:nuke_loop  
   /varset addIndex 1  
:check_add_loop  
   /call CheckForAdds  
   /if ( ${addIndex}>1 ) /goto :check_add_loop  
   /call CheckPet  
   /call CheckPet2  
   /if ( !${Spawn[${mobID}].Type.Equal[NPC]} && ( !${Spawn[${mobID}].Type.Equal[pet]} || 

${Spawn[${mobID}].Master.Type.Equal[pc]} ) ) {  
      /echo Target Dead!  
      /if ( ${cleanUp} ) /call CleanUp ${mobID}  
      /goto :wait_for_target  
   }  
   /target id ${mobID}  
   /if ( ${Spawn[${mobID}].Distance3D}<=${minRadius} && ${Spawn[pc ${mainTank}].NearestSpawn[radius 

${Spawn[${mobID}].MaxRangeTo} id ${mobID}].ID} && ${waitTimer${mobID}}<0 ) {  
      /deletevar waitTimer${mobID}  
      /declare waitTimer${mobID} timer outer ${engageDelay}  
   }  
   /if ( ( ${waitTimer${mobID}}>=0 || ${engaged} ) && ${useDebuff} ) /call DebuffMobs  
   /target id ${mobID}  
   /if ( ( ${Target.PctHPs}>${minHP} && ${waitTimer${mobID}} ) || !${assistWaitTimer} ) {  
      /if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist}].ID} ) ) { 

 
         /varset mainTank ${secondAssist}  
      } else {  
         /varset mainTank ${mainAssist}  
      }  
      /assist ${mainTank}  
      /varset tempTimer 8  
   :wait_for_assist  
      /call CheckPet  
      /if ( ${tempTimer} && ${Target.ID}==${mobID} ) /goto :wait_for_assist  
      /if ( ${Target.ID} && ${Target.ID}!=${mobID} ) /goto :wait_for_target  
      /varset assistWaitTimer 5s  
      /goto :nuke_loop  
   }  
   /if ( !${engaged} ) {  
      /varset engaged 1  
      /echo Engaging >> ${Target.DisplayName} <<  
   }  
   /if ( ${Me.Pet.ID} && !${petAttacking} && !${Me.PetBuff[elemental silence]} ) {  
      /pet attack  
      /varset petAttacking true  
   }  
   /if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Type.Equal[pet]} ) /goto :wait_for_target  
   /doevents timer  
   /if ( !${petOff} && ( ${maloTimer${mobID}}<0 || ${maloTimer${mobID}}>1 || !${useDebuff} ) ) {  
      /doevents  
      /call CheckBuffs  
      /target id ${mobID}  
      /if ( ${nukeMode} && ${Target.LineOfSight} && !${Me.TargetOfTarget.Name.Equal[${Me.Name}]} && !${nukeWaitTimer} &&  

( ${Me.PctMana}>=${nukeMana} || ${nukeMode}==2 ) && ( ${Target.Type.Equal[NPC]} || ${Target.Type.Equal[pet]} ) ) {  
         /if ( ${useManaRobe} && ${refreshTime}>2 ) {  
            /call ManaRobe  
         } else {  
            /if ( ${Me.Song[Gift of Radiant Mana].ID} ) {  
               /call Cast "Raging Servant" gem6  
            } else {  
               /call Cast "${nuke1}" gem4 0 CheckPet  
               /if ( ${Macro.Return.Equal[CAST_NOTREADY]} && ${Me.Gem[${nuke2}]} ) /call Cast "${nuke2}" gem3 0 CheckPet  
               /if ( ${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_RESISTED]} ) {  
                  /if ( ${nukeMode}==1 ) {  
                     /varcalc nukeWaitMod 2*(90 - ${Me.PctMana})  
                  } else {  
                     /varset nukeWaitMod 0                 
                  }  
                  /if ( ${nukeDelay}>${nukeWaitMod} ) {  
                     /varset nukeWaitTimer ${nukeDelay}  
                  } else {  
                     /varset nukeWaitTimer ${nukeWaitMod}  
                  }  
               }  
            }  
         }  
      } else {  
         /call ManaRobe  
      }  
   }  
/goto :nuke_loop  


Sub DebuffMobs  
   /declare i int local  
   /declare tempID string local  
   /if ( ${mobList.Find[[]} ) {  
      /for i 1 to ${mobList.Count[[]}  
         /if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]}  
         /varset tempID ${mobList.Arg[${i},[].Left[-1]}  
         /if ( !${Defined[maloTimer${tempID}]} ) {  
            /if ( !${Spawn[${tempID}].Type.Equal[npc]} ) {  
               /declare maloTimer${tempID} int outer -1  
            } else /if ( ( !${waitTimer${tempID}} && ( ${maloTimer${mobID}} || ${waitTimer${mobID}} ) ) || 

${tempID}==${mobID} ) {  
               /call UpdateMobList  
               /target id ${tempID}  
               /call Malo  
            }  
         }  
      /next i  
   }  
/return  

Sub CheckPet
  
   /if ( ${Zone.ID}!=${currentZone} ) {  
      /varset currentZone ${Zone.ID}  
      /varset mobList  
      /varset addList  
      /varset buffQueue  
      /varset mobID 0  
      /varset petID 0  
      /varset petID2 0  
      /varset useAnchor 0  
      /squelch alert clear 6  
      /call ClearMobList   
   }  
   /call CheckForAdds
   /call CheckMageBuffs  
   /declare i int local  
   /declare tempID int local  
   /if ( ${petOff} && ${Me.Pet.ID} ) {  
      /varset petOff 0  
   }  
   /if ( !${Spawn[${petID2}].Type.Equal[NPC]} && ${petOff2} ) /varset petOff2 0  
   /if ( ${Spawn[${petID}].Type.Equal[NPC]} && !${petOff} ) {  
      /echo Pet Off!  
      /varset petAttacking false  
      /varset petOff 1  
   }  
   /if ( ${Spawn[${petID2}].Type.Equal[NPC]} && !${petOff2} ) {  
      /echo Chanter Pet Off!  
      /varset petOff2 1  
   }  

   /if ( ${petOff} && ${Me.Casting.ID} && !( ${Me.Casting.Name.Equal[malosinia]} && ${Target.ID}==${petID} ) && 

!${Me.Casting.Name.Equal[Elemental Silence]} && !${Me.Casting.Name.Equal[call of the arch mage]} ) /call Interrupt  
   /doevents gate  
   /doevents rageon  
   /doevents rageoff  
   /doevents setvar  
   /if ( ${castWaitTime}>5 ) /doevents chat  
/return  

Sub CheckPet2  
   /if ( !${Me.Inventory[face].Name.Equal[${hpMask}]} ) /call SwapItem "${hpMask}" face  
   /if ( ${FindItem[Wand of Destructive Protection].ID} ) {  
      /declare AETime float local  
      /varcalc AETime (${MacroQuest.Running}-${uquaAETime})%90000  
      /if ( ${AETime}>83000 ) {  
         /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"  
      }  
   } else {  
      /if ( !${Me.Inventory[offhand].Name.Equal[${normalOffhand}]} ) /call SwapItem "${normalOffhand}" offhand  
   }  
   /if ( ${petOff} ) /call Charm ${petID}  
   /if ( ${petOff2} &&  !( ${maloTimer${petID2}}>=4200 ) ) {  
      /declare oldTargetID int local ${Target.ID}  
      /tar id ${petID2}  
      /call Malo  
      /if ( ${Spawn[${oldTargetID}].ID} ) {  
         /target id ${oldTargetID}  
      } else {  
         /keypress clear_target  
      }  
   }  
/return  

Sub CheckForAdds  
:check_add_loop  
   /if ( !${Spawn[${mobID}].Type.Equal[npc]} && !${Spawn[${mobID}].Type.Equal[pet]} ) {  
      /varset addIndex 1  
      /return  
   }  
   /varset addID ${NearestSpawn[${addIndex},npc radius ${minRadius}].ID}  
   /if ( ${addID} ) {  
      /if ( ${Spawn[${addID}].Distance3D}<=${minRadius} && ${addID}!=${petID} && ${Spawn[${addID}].LineOfSight} && 

${aggroAnim.Find[|${Spawn[${addID}].Animation}|]} && ${mezTimer${addID}}!=-1 && ${Spawn[${addID}].Type.Equal[NPC]} ) {  
         /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 {  
      /varset addIndex 1  
   }  
/return  

Sub Charm(int tempID)  
   /if ( ${Me.Pet.ID} ) /return  
   /varset noInvis 0  
   /declare oldTargetID int local ${Target.ID}  
:mez_pet  
   /target id ${tempID}  
   /call Cast "Elemental Silence" gem7 3s     
   /if ( !${Macro.Return.Equal[CAST_SUCCESS]} ) /goto :mez_pet  
:malo_pet  
   /target id ${tempID}  
   /call Malo  
   /if ( !${Macro.Return.Equal[CAST_SUCCESS]} ) /goto :malo_pet  
   /target id ${tempID}  
   /call Cast "Call of the Arch Mage" gem6 5s  
   /if ( ${Me.Pet.ID} ) {  
      /if ( ${Spawn[${oldTargetID}].ID} ) {  
         /target id ${oldTargetID}  
      } else {  
         /keypress clear_target  
      }  
   }  
   /varset noInvis ${Ini[${iniName},Settings,NoInvis,1]}  
/return  

Sub Malo  
   /declare tempID int local ${Target.ID}  
   /if ( !${Defined[maloResists${tempID}]} ) /declare maloResists${tempID} int outer 0  
   /if ( ${maloResists${tempID}}==${resistsTillMala} ) /call Cast "${malaSpell}" ${malaType} 5s CheckPet  
   /if ( ${maloResists${tempID}}==${resistsTillQuit} ) {  
      /deletevar maloTimer${tempID}  
      /declare maloTimer${tempID} int outer -1  
      /return  
   }  
   /call Cast "${malosiniaSpell}" ${malosiniaType} 0 CheckPet  
   /if ( !${Defined[maloTimer${tempID}]} ) /declare maloTimer${tempID} timer outer  
   /if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) {  
      /varset maloTimer${tempID} 19m | ${maloDuration}  
      /varset maloResists${tempID} 0  
   } else /if ( ${Macro.Return.Equal[CAST_OUTOFMANA]} || ${Macro.Return.Equal[CAST_OUTOFRANGE]} || 

${Macro.Return.Equal[CAST_CANNOTSEE]} ) {  
      /varset maloTimer${tempID} 50       
   } else {  
      /if ( ${Macro.Return.Equal[CAST_RESISTED]} ) /varcalc maloResists${tempID} ${maloResists${tempID}}+1  
      /varset maloTimer${tempID} 1  
   }  
/return ${Macro.Return}  


Sub CheckBuffs  
   /varset deathFlag ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]}  
   /if ( ${deathFlag} ) /goto :dead     

   /if ( ${Me.Combat} ) {  
      /if ( !${Me.Inventory[mainhand].Name.Equal[${meleeWep}]} && ${FindItem[${meleeWep}].ID} ) /call SwapItem 

"${meleeWep}" mainhand  
   } else {  
      /if ( !${Me.Inventory[mainhand].Name.Equal[${normalMainhand}]} && ${FindItem[${normalMainhand}].ID} ) /call SwapItem 

"${normalMainhand}" mainhand  
   }  
   /declare i int local  
   /declare j int local  
   /declare buffText string local  
   /declare targetName string local  
   /declare spellName2 string local  
   /declare spellType string local  
   /declare spellRange int local 118  
   /declare spellName string local  
   /declare buffName string local  
   /declare focusList string local Dire Focusing,Talisman of the Dire,Wunshi's Focusing,Focus of Alladnu,Focus of 

Soul,Talisman of Kragg,Focus of the Seventh,Talisman of Wunshi,Bloodworg Focusing,Talisman of the Bloodworg  
   /declare shaman bool local false  
   /declare targetType string local  

   /if ( !${petID} && ${Me.Pet.ID} ) /varset petID ${Me.Pet.ID}  
   /if ( !${petID2} && ${Spawn[${clarityBitch}].Pet.ID} ) /varset petID2 ${Spawn[${clarityBitch}].Pet.ID}  
   /if ( !${Me.Pet.ID} && ${usePet} && !${petOff} && ${Me.CurrentMana}>=900 ) /call SumPet  


   /if ( ${Me.Hunger}<5000 && ${useFood} ) {  
      /declare foodName string local  
      /declare oldSlotID int local  
      /call GetFoodName  
      /varset foodName ${Macro.Return}  
      /if ( ${Bool[${foodName}]} ) {  
         /varset oldSlotID ${FindItem[${foodName}].InvSlot.ID}  
         /call SwapItem "${foodName}" "pack8"  
         /nomodkey /itemnotify pack8 rightmouseup  
         /if ( ${FindItem[${foodName}].ID} ) /call SwapItem "${foodName}" "${oldSlotID}"  
      }  
   }  
   /if ( ${checkNamed} ) /call CheckNamed  


   /if ( !${Me.Buff["Seer's Cognizance"].ID} && !${Me.Buff["Voice of Cognizance"].ID} && ${Spawn[pc ${clarityBitch} radius 

100].ID} && !${c7Timer} ) {  
      /chat tell ${clarityBitch} c7  
      /varset c7Timer 1.8m  
   }  
   /if ( ${Cursor.Name.Equal[Rod of Prime Transvergence]} ) /autoinventory  
   /if ( !${FindItem[Rod of Prime Transvergence].ID} ) /call AddToQueue "rod,${Me.Name}"  
   /if ( ${FindItem[Rod of Prime Transvergence].ID} && !${FindItem[Rod of Prime Transvergence].Timer} && ${Me.PctHPs}>50 

&& ${Me.PctMana}<=95 ) {  
      /call Cast "Rod of Prime Transvergence" item  
   }  
   /if ( ${useMount} ) {  
      /if ( !${Me.Mount.ID} ) /call Cast "${Me.Inventory[ammo].Name}" item  
   } else {  
      /if ( !${Me.Buff[Water Elemental Form I].ID} && !${Me.Buff[Water Elemental Form II].ID} && !${Me.Buff[Water 

Elemental Form III].ID} && ${AltAbilityReady[Elemental Form: Water]} ) /call Cast "Elemental Form: Water" alt  
   }  
   /if ( ${Me.Pet.ID} ) {  
            /if ( !${Me.PetBuff[${petHaste}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) 

/call Cast "${petHaste}" gem7 2s  
      /if ( !${Me.PetBuff[burnout]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Burnout" gem7 2s 
      /if ( !${Me.PetBuff[petstr]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Aegis of Calliav Rk. II" gem6 2s  
      /if ( !${Me.Buff[Elemental Symbiosis Recourse Rk. II].ID} && !${Me.PetBuff[call of the arch mage]} && 

!${Me.Buff[Mind Wrack Recourse].ID} && ${Me.Pet.ID} && ${Me.Pet.Distance3D}<=100 && ${Me.Book[${siphonSpell}]} ) /call 

cast "${siphonSpell}" gem8 0 CheckPet  
   }  
   /if ( !${Me.Buff[${groupDSSpell}].ID} && ${useGroupDS} ) {  
      /if ( ${Spawn[pc ${mainAssist}].ID} ) {  
         /call AddToQueue "${groupDSSpell},${mainAssist}"  
      } else {  
         /call AddToQueue "${groupDSSpell},${Me.Name}"  
      }  
   }  
   /if ( !${autoBuff} ) /goto :skip_buffs  
   /if ( ${Me.PctHPs}<=${runeHP} ) {  
      /if ( ${Me.Book[${runeSpell}]} ) {  
         /if ( !${Me.Buff[${runeSpell}].ID} ) /call cast "${runeSpell}" ${runeType} 0 CheckPet  
      } else /if ( ${FindItem[${runeSpell}].ID} ) {  
         /if ( !${Me.Buff[${FindItem[${runeSpell}].Spell.Name}].ID} ) /call cast "${runeSpell}" ${runeType} 0 CheckPet  
      }  
   }  
   /doevents Indoors  
   /call CheckIniBuffs
   /if ( ${Spawn[pc class shaman].ID} ) {  
      /if ( ${Raid.Members} ) {  
         /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 ( ${Target.Name.Equal[${Me.Pet.Name}]} ) {  
      /if ( ${Spawn[${oldTarget}].ID} ) {  
         /target id ${oldTarget}  
      } else {  
         /keypress clear_target  
      }  
   }  
   /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 {  
                     /keypress clear_target  
                  }     
               }  
               /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[${Me.MaxHPs}<2000]}  
   /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 ${Me.Gem[8].ID}  
      /echo Yay a rez!  
   :wait_for_rez2  
      /delay 1  
      /notify ConfirmationDialogBox Yes_Button leftmouseup  
      /if ( ${Window[ConfirmationDialogBox].Open} ) /goto :wait_for_rez2  
      /delay 5s ${Spawn[corpse radius 100 ${Me.Name}].ID}  
      /goto :wait_for_loot  
   }  
/return  

Sub GetBuffName(string spellName)  
   /declare i int local  
   /declare buffText string local  
   /declare spellType string local gem2  
   /if ( ${spellName.Equal[rod]} ) {  
      /varset spellName ${rodSpell}  
      /varset spellType ${rodType}  
   }  
   /if ( ${spellName.Equal[ds]} ) {  
      /varset spellName ${singleDSSpell}  
      /varset spellType gem2  
   }  
   /if ( ${spellName.Equal[coh]} ) /varset spellName Call of the Hero  
   /for i 1 to 5  
      /if ( ${spellName.Equal[${buffName${i}}]} ) /varset spellType ${buffType${i}}  
   /next i  
   /if ( ${Int[${Me.Book[${spellName}]}]} || ${AltAbility[${spellName}].ID} || ${FindItem[${spellName}].ID} ) /return 

${spellName},${spellType}  
/return  
   
Sub SumPet  
   /declare i int local  
   /if ( ${Me.AltAbilityReady[suspended minion]} ) /call Cast "suspended minion" alt 2s  
   /delay 3s ${Me.Pet.ID}  
   /if ( !${Me.Pet.ID} ) {  
      /call cast "${petSpell}" gem1 5s  
      /tar id ${Me.Pet.ID}  
      /call Cast "${petShrinkSpell}" ${petShrinkType} 3s  
      /call Cast "${petShrinkSpell}" ${petShrinkType} 3s  
   }  
/return  

Sub SumWeps  
   /if ( ${Target.Pet.ID} ) /target id ${Target.Pet.ID}  
   /if ( !${Target.Type.Equal[pet]} ) /return  
   /call Cast "${summonedWepSpell}" ${summonedWepType} 3s  
   /delay 1s  
   /call GiveToPet  
   /delay 2s  
   /call Cast "${summonedWepSpell}" ${summonedWepType} 3s  
   /delay 1s  
   /call GiveToPet  
   /delay 2s  
   /call Cast "${summonedBeltSpell}" ${summonedBeltType} 3s  
   /call GiveToPet  
   /call Cast "${summonedMaskSpell}" ${summonedMaskType} 3s  
   /call GiveToPet  
/return  


Sub GiveToPet  
   /declare i int local  
   /varset i 1  
:give_item  
   /delay 5 ${Cursor.ID}  
   /if ( ${Cursor.ID} && !${InvSlot[trade4].Item.ID} ) {  
      /if ( ${Cursor.Name.Find[summoned:]} ) {  
         /click left target  
         /delay 1s ${InvSlot[trade${i}].Item.ID}  
      } else {  
         /autoinventory  
      }  
      /goto :give_item  
   }  
   /for i 1 to 4  
      /if ( ${InvSlot[trade${i}].Item.ID} && !${InvSlot[trade${i}].Item.Name.Find[summoned:]} ) /notify GiveWnd 

GVW_Cancel_Button leftmouseup  
   /next i  
   /if ( ${Window[GiveWnd].Open} ) {  
      /notify GiveWnd GVW_Give_Button leftmouseup  
      /delay 5s !${Window[GiveWnd].Open}  
   }  
   /if ( ${Window[InventoryWindow].Open} ) /keypress inventory  
/return  

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

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

Sub Event_Gate(string line)  
   /if ( ${line.Find[${Spawn[${mobID}].DisplayName}]} && ${Me.Pet.ID} ) {  
      /varset mobID 0  
   }  
/return  

Sub Event_Goto(string line,string destination)  
   /declare tempZone string local  
   /if ( ${destination.Equal[pok]} ) {  
      /call MoveToLoc -1700 428  
      /call MoveToLoc -1180 -116  
      /call MoveToLoc -274 -860  
      /call MoveToLoc -222 -945  
      /call MoveToLoc 704 -1324  
      /call MoveToLoc 726 -1443  
      /call MoveToLoc 772 -1440  
      /doortarget poktele500  
      /face nolook  
      /varset tempZone ${Zone.Name}  
      /keypress pitchdown hold  
   :wait_for_zone_pok  
      /keypress use hold  
      /delay 1  
      /if ( ${tempZone.Equal[${Zone.Name}]} ) /goto :wait_for_zone_pok  
   }  
   /if ( ${destination.Equal[wfp]} ) {  
      /keypress centerview  
      /call MoveToLoc -228 -283  
      /call MoveToLoc -452 -236  
      /doortarget pokfptport500  
      /face nolook  
      /keypress use hold  
   }  
   /if ( ${destination.Equal[ec]} ) {  
      /call MoveToLoc -636 152  
      /call MoveToLoc -559 195  
      /face heading 90  
      /keypress forward hold  
      /varset tempZone ${Zone.Name}  
   :wait_for_zone_ec  
      /delay 5  
      /if ( ${tempZone.Equal[${Zone.Name}]} ) /goto :wait_for_zone_ec  
   }  
   /if ( ${destination.Equal[nedaria]} ) {  
      /call MoveToLoc -497 -762  
      /call MoveToLoc -904 -365  
      /call MoveToLoc -1049 844  
      /call MoveToLoc -1338 795  
      /call MoveToLoc -1662 667  
      /call MoveToLoc -1671 276  
      /call MoveToLoc -1768 16  
      /call MoveToLoc -1617 -182  
      /target magus  
      /say nedaria  
   }  
   /if ( ${destination.Equal[natimbi]} ) {  
      /call MoveToLoc 1050 1528  
      /call MoveToLoc 1023 1529  
      /target magus  
      /say natimbi  
   }  
   /if ( ${destination.Equal[kodtaz]} ) {  
      /if ( !${Me.Levitating} ) {  
         /if ( ${Me.Invis} ) {  
            /target clear  
            /attack on  
            /attack off  
         }  
         /call Cast "Summon Ring of Flight" gem2 10s  
         /delay 5s ${Cursor.ID}  
         /autoinv  
         /target myself  
         /call Cast "Summoned: Ring of Levitation" item  
      }  
      /if ( !${Me.Invis} ) /call Cast "Veil of Elements" gem5 10s  
      /call MoveToLoc 36 -1458  
      /call MoveToLoc 1071 -1520  
      /call MoveToLoc 989 -447  
      /call MoveToLoc 1099 110  
      /call MoveToLoc 1029 1266  
      /call MoveToLoc 1143 1546  
      /doortarget nihobelisk800  
      /face nolook loc 1144,1555  
      /varset tempZone ${Zone.Name}  
      /keypress pitchdown hold  
   :wait_for_zone_kodtaz  
      /keypress use hold  
      /delay 1  
      /if ( ${tempZone.Equal[${Zone.Name}]} ) /goto :wait_for_zone_kodtaz  
   }  
   /if ( ${destination.Equal[kt]} ) {  
      /echo goto pok  
      /echo goto wfp  
      /echo goto ec  
      /echo goto nedaria  
      /echo goto natimbi  
      /echo goto kodtaz  
      /doevents Goto  
   }  
/return  

Sub Event_Coth(string line,string sender,string name)  
   /if ( !${Defined[name]} ) /declare name string local  
   /declare i int local  
   /declare inGroup bool local false  
   /if ( !${Spawn[pc ${name}].ID} ) {  
      /if ( ${Spawn[pc ${sender}].ID} ) {  
         /varset name ${sender}  
      } else {  
         /return  
      }  
   }  
   /for i 1 to 5  
      /if ( ${Group.Member[${i}].Name.Find[${name}]} ) /varset inGroup true  
   /next i  
   /if ( ${inGroup} ) {  
      /call AddToQueue "coth,${name}"  
   } else /if ( ${Group.Leader.ID}==${Me.ID} ) {  
      /target pc ${name}  
      /keypress invite_follow  
      /delay 5s ${Group.Member[1].Name.Equal[${name}]} || ${Group.Member[2].Name.Equal[${name}]} || 

${Group.Member[3].Name.Equal[${name}]} || ${Group.Member[4].Name.Equal[${name}]} || ${Group.Member[5].Name.Equal[${name}]} 

 
      /for i 1 to 5  
         /if ( ${Group.Member[${i}].Name.Equal[${name}]} ) /varset inGroup true  
      /next i  
      /if ( ${inGroup} ) /call AddToQueue "coth,${name}"  
   }  
/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[maloTimer]} ) {  
      /varset tempID ${timerName.Right[-9]}  
      /if ( ${Spawn[${tempID}].Type.Equal[NPC]} ) {  
         /target id ${tempID}  
         /call Malo  
      } else {  
         /deletevar ${timerName}  
      }  
   } else {  
      /return ${Macro.Return}  
   }  
   /if ( ${Target.ID}==${tempID} ) {  
      /if ( ${Spawn[${oldTargetID}].ID} ) {  
         /target id ${oldTargetID}  
      } else {  
         /keypress clear_target  
      }  
   }  
/return ${Macro.Return}  

Sub Event_PetWeps(string line,string sender)  
   /declare tempID int local ${Spawn[pc ${sender}].Pet.ID}  
   /if ( !${tempID} || ${Spawn[${tempID}].Distance3D}>250 || !${Spawn[${tempID}].LineOfSight} ) /return  
   /target id ${tempID}  
   /if ( ${Stick.Status.Length} ) {  
      /stick 10  
      /delay 5s ${Target.Distance3D}<=10  
   } else {  
      /declare tempTimer timer local 5s  
   :move_to_pet  
      /face fast nolook  
      /keypress forward hold  
      /if ( ${tempTimer} && ${Target.Distance3D}<=20 ) /goto :move_to_pet  
      /keypress forward  
   }  
   /call SumWeps  
   /if ( ${Spawn[pc ${followName} radius 150].ID} && ${Stick.Status.Equal[off]} ) {  
      /target pc ${followName}  
      /stick hold 10  
   }  
/return  

Sub CheckMageBuffs 
      
      /if (${Me.Pet.Name.NotEqual[NULL]}) { 
         /if (${Me.PetBuff[Iceflame Guard]}== ${NULL}) { 
            /echo Refreshing Iceflame on ${Me.Pet.CleanName} 
            /call cast "Iceflame Guard" Gem4 
            } 
         /if (${Me.PetBuff[Aegis of Calliav Rk. II]} == ${NULL}) { 
            /echo Refreshing Aegis of Calliav Rk. II on ${Me.Pet.CleanName} 
            /call Cast "Aegis of Calliav Rk. II" Gem6 
            } 
         /if (${Me.PetBuff[Elemental Conjunction]} == ${NULL}) { 
            /echo Refreshing Elemental Conjunction on ${Me.Pet.CleanName} 
            /itemnotify mainhand rightmouseup
            } 
         /if (${Me.PetBuff[Burnout VII]} == ${NULL}) { 
            /echo Refreshing Burnout on ${Me.Pet.CleanName} 
            /call Cast "Burnout VII" Gem4 
            } 
         } 
      } 
   /return
--------------------------------------------------------------------------------
Last edited by jamie75



Here is the INI (adjust for your spell levels, claritybitch, channel, ma, etc)

Code:
[Settings]
MainAssist=NULL
SecondAssist=NULL
MinRadius=150
EngageDelay=55
MinHP=95
AutoBuff=1
UseMount=1
UseDebuff=1
NukeMode=1
UseCharm=0
UseDPS=1
UsePet=1
PrivateChannel=NULL
ChannelAnnounce=1
AutoAnnounce=1
NoInterrupt=0
UseManaStone=0
CheckNamed=0
NoInvis=1
UseManaRobe=0
ManaRobeMode=1
ManaRobeMinMana=70
ManaRobeMaxMana=94
NukeMana=25
NukeDelay=0
IgnoreList=NULL
RuneHP=70
CleanUp=0
UseGroupDS=1
ClarityBitch=NULL
SpellSet=bot
MaloDuration=19m
ResistsTillMala=3
ResistsTillQuit=6
[Spells]
Nuke1=Bolt of Molten Dross
Nuke2=Fickle Inferno
MagicNuke=Shock of Silvered Steel
FireNuke=Fickle Inferno
BoltNuke=Bolt of Molten Dross
Shielding=Eidolic Guardian
WindPet=Essence of Air
EarthPet=Essence of Earth
FirePet=Core of Fire
WaterPet=Core of Water
PetSpell=Core of Water
MalosiniaSpell=Malosinatia
MalaType=gem3
SummonedWepSpell=Summon Staff of the North Wind
SummonedWepType=gem2
SummonedBeltSpell=Girdle of Magi'Kot
SummonedBeltType=gem2
SummonedMaskSpell=Muzzle of Mowcha
SummonedMaskType=gem2
GroupDSSpell=Circle of Magmaskin Rk. II
SingleDSSpell=Lavaskin
SiphonSpell=Elemental Symbiosis Rk. II
SiphonSpellType=gem4
Petstr=Aegis of Calliav Rk. II
PethpSpell=Elemental Conjunction
PethpBuff=Staff of Elemental Essence
PethpType=item
PetHaste=Burnout VII
PetShrinkSpell=Symbol of Ancient Summoning
PetShrinkType=item
RodSpell=Wand of Prime Transvergence
RodType=spell
SelfBuff1=Phantasmal Warden Rk. II
SelfBuffNoStack1=Protection of the Nine,Blessing of the Nine,Steeloak Skin,Blessing of Steeloak,Direwild Skin,Direwild 

Skin Rk. II,Blessing of the Direwild,Blessing of the Direwild Rk. II
SelfBuff2=
SelfBuffNoStack2=
SelfBuff3=
SelfBuffNoStack3=
SelfBuff4=
SelfBuffNoStack4=
SelfBuff5=
SelfBuffNoStack5=
BuffList1=rod,modrod
BuffName1=Wand of Prime Transvergence
BuffType1=spell
BuffList2=ds,dmg shield,damage shield
BuffName2=ds
BuffType2=gem2
BuffList3=coh, coth
BuffName3=Call of the Hero
BuffType3=gem9
BuffList4=
BuffName4=
BuffType4=
BuffList5=
BuffName5=
BuffType5=
[Items]
HpRobe=Magi`Kot's Robe of Convergence
Clicky1=Fractured Bone Ridges
ClickyNoStack1=
Clicky2=
ClickyNoStack2=
Clicky3=
ClickyNoStack3=
Clicky4=
ClickyNoStack4=
Clicky5=
ClickyNoStack5=
UseFood=1
StatFood=Misty Thicket Picnic
Food1=Misty Thicket Picnic
Food2=NULL
Food3=NULL
Food4=NULL
Food5=NULL
MeleeWep=Wand of Temporal Power
InvisItem=
DispellItem=
NormalMainhand=Staff of Elemental Essence
NormalOffhand=Tome of Discordant Magic
HpMask=Ice Glazed Platinum Mask



Any help would be most appreciated.
 

Attachments

  • mage1.mac
    44.6 KB · Views: 21
  • Auto_Mage.ini
    2.5 KB · Views: 16
Last edited:
Hey glad...

Might want to edit your mage's name out of the .ini file name.

On another note... I'm thinking I'm going to try this. Good mage macs are few and far between it seems.
 
Fixed that was dumb,

Thanks bro, its been a long day