• 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 --->

my first attempt at altering a macro...trying to learn maco need help... lol (1 Viewer)

chance98

New member
Joined
Dec 29, 2007
RedCents
71¢
the following is a mage macro im trying to add to it... it was working before i made the changes... alll changed i made to it will be in blue... basically i am trying to add more pet buffs to the macro... help me tell me where i went wrong... with the changes i made it does not add any of the buffs to the pet.. and it is now saying over and over : [MQ@] Spell: "NULL" was not found in your book

help me lol

Rich (BB code):
| mage.mac 
| By Rusty~ 
| Maintained by Showme1 
| Last update 11/28/2005 
| 
| /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, 'coth'" 
#event Coth "#1# tells you, 'coth #2#'" 
#event Coth "#1# told you, 'coth'" 
#event Coth "#1# told you, 'coth #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 0 /dps 
   /call DeclareIniVar usePet int Settings 1 /companion 
   /call DeclareIniVar privateChannel string Settings " " 
   /call DeclareIniVar channelAnnounce int Settings 0 
   /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 1 
   /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 "default" 
   /call DeclareIniVar maloDuration string Settings 19m 
   /call DeclareIniVar resistsTillMala int Settings 3 
   /call DeclareIniVar resistsTillQuit int Settings 6 

   /call DeclareIniVar nuke1 string Spells "Blade Strike" 
   /call DeclareIniVar nuke2 string Spells " " 
   /call DeclareIniVar magicNuke string Spells "Blade Strike" 
   /call DeclareIniVar fireNuke string Spells "Fickle Fire" 
   /call DeclareIniVar boltNuke string Spells "Bolt of Jerikor" 
   /call DeclareIniVar shielding string spells "Shield of Maelin" 

   /call DeclareIniVar windPet string Spells "Child of Wind" 
   /call DeclareIniVar earthPet string Spells "Child of Earth" 
   /call DeclareIniVar firePet string Spells "Child of Fire" 
   /call DeclareIniVar waterPet string Spells "Child of Water" 

   /call DeclareIniVar petSpell string Spells "Child of Wind" 
   /call DeclareIniVar malosiniaSpell string Spells "Veil of Lost Hopes" 
   /call DeclareIniVar malosiniaType string Spells "item" 
   /call DeclareIniVar malaSpell string Spells "Mala" 
   /call DeclareIniVar malaType string Spells "gem5" 
   /call DeclareIniVar summonedWepSpell string Spells "Blazing Stone of Demise" 
   /call DeclareIniVar summonedWepType string Spells "item" 
   /call DeclareIniVar summonedBeltSpell string Spells "Girdle of Magi'Kot" 
   /call DeclareIniVar summonedBeltType string Spells "gem2" 
   /call DeclareIniVar summonedMaskSpell string Spells "Muzzle of Mardu" 
   /call DeclareIniVar summonedMaskType string Spells "gem2" 
   /call DeclareIniVar groupDSSpell string Spells "Circle of Fireskin" 
   /call DeclareIniVar singleDSSpell string Spells "Fireskin" 
   /call DeclareIniVar siphonSpell string Spells "Elemental Siphon" 
   /call DeclareIniVar runeSpell string Spells "Shield of Auras" 
   /call DeclareIniVar runeType string Spells "item" 
   /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 "Elemental Fury"
   /call DeclareIniVar petAura string Spells "Rathe's Strength"
   /call DeclareIniVar petRune string Spells "Aegis of Kildrukaun"
   /call DeclareIniVar petProc string Spells "Iceflame Tenement"   
   /call DeclareIniVar petShrinkSpell string Spells "Algae Covered Stiletto" 
   /call DeclareIniVar petShrinkType string Spells "item" 
   /call DeclareIniVar rodSpell string Spells "Magi`kot's Pants of Convergence" 
   /call DeclareIniVar rodType string Spells "item" 

   /call DeclareIniVar selfBuff1 string Spells "Phantom Shield" 
   /call DeclareIniVar selfBuffNoStack1 string Spells "Protection of the Nine,Blessing of the Nine,Steeloak Skin,Blessing of Steeloak" 
   /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 "Magi`kot's Pants of Convergence" 
   /call DeclareIniVar buffType1 string Spells "item" 
   /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 " " 
   /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 "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 "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},malosinia ,]}${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 "Rampaging Servant Rk. II" gem9 
            } 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 
   /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 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 

   /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["Clairvoyance"].ID} && !${Me.Buff["Voice of Clairvoyance"].ID} && ${Spawn[pc ${clarityBitch} radius 100].ID} && !${c6Timer} ) { 
      /chat tell ${clarityBitch} c6 
      /varset c6Timer 1m 
   } 
   /if ( ${Cursor.Name.Equal[Rod of Mystical Transvergance]} ) /autoinventory 
   /if ( !${FindItem[Rod of Mystical Transvergance].ID} ) /call AddToQueue "rod,${Me.Name}" 
   /if ( ${FindItem[Rod of Mystical Transvergance].ID} && !${FindItem[Rod of Mystical Transvergance].Timer} && ${Me.PctHPs}>50 && ${Me.PctMana}<=95 ) { 
      /call Cast "Rod of Mystical Transvergance" 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[${pethpSpell}]} && !${Me.PetBuff[call of the arch mage]} && !${FindItem[Staff of Elemental Essence].Timer} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${pethpBuff}" ${pethpType} 3s 
      /if ( !${Me.PetBuff[${petHaste}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petHaste}" gem6 2s 
      /if ( !${Me.PetBuff[burnout]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Burnout" gem6 2s
      /if ( !${Me.PetBuff[${petaura}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petaura}" gem5 2s 
      /if ( !${Me.PetBuff[Rathe's Strength Effect]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Rathe's Strength" gem5 2s
      /if ( !${Me.PetBuff[${petaura}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petaura}" gem5 2s 
      /if ( !${Me.PetBuff[Rathe's Strength Effect]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Rathe's Strength" gem5 2s
      /if ( !${Me.Buff[${siphonSpell} 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[coth]} ) /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 SumWeps 
      /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[${i}].Name.Find[${name}]} ) /varset inGroup true 
   /next i 
   /if ( ${inGroup} ) { 
      /call AddToQueue "coth,${name}" 
   } else /if ( ${GroupLeader.ID}==${Me.ID} ) { 
      /target pc ${name} 
      /keypress invite_follow 
      /delay 5s ${Group[1].Name.Equal[${name}]} || ${Group[2].Name.Equal[${name}]} || ${Group[3].Name.Equal[${name}]} || ${Group[4].Name.Equal[${name}]} || ${Group[5].Name.Equal[${name}]} 
      /for i 1 to 5 
         /if ( ${Group[${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
 
Last edited:
case you missed it this is the part im trying to add in is more pet buffs.

/call DeclareIniVar petaura string Spells "Rathe's Strength"
/call DeclareIniVar petrune string Spells "Aegis of Kildrukaun"
/call DeclareIniVar petproc string Spells "Iceflame Tenement"






and second part

/if ( !${Me.PetBuff[${petaura}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petaura}" gem5 2s
/if ( !${Me.PetBuff[Rathe's Strength Effect]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Rathe's Strength" gem5 2s
/if ( !${Me.PetBuff[${petRune}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petRune}" gem6 2s
/if ( !${Me.PetBuff[Aegis of Kildrukaun]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Aegis of Kildrukaun" gem6 2s
/if ( !${Me.PetBuff[${petProc}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petProc}" gem6 2s
/if ( !${Me.PetBuff[Iceflame Tenement]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Iceflame Tenement" gem6 2s
 
okay when i removed the mage pet aura the problem went away and the other buffs now worked.... so can anyone tell me whats wrong with these lines for the pet aura.. its callt Rathe's Strength ,, and the buff icon for it is called Rathe's Strength Effect.

/if ( !${Me.PetBuff[${petaura}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petaura}" gem5 2s
/if ( !${Me.PetBuff[Rathe's Strength Effect]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Rathe's Strength" gem5 2s
 
here is the ini and once again the parts in the blue is what i added to it..


Rich (BB code):
[Settings]
MainAssist=na
SecondAssist=na
MinRadius=150
EngageDelay=55
MinHP=95
AutoBuff=1
UseMount=1
UseDebuff=1
NukeMode=1
UseCharm=0
UseDPS=0
UsePet=1
PrivateChannel=
ChannelAnnounce=0
AutoAnnounce=1
NoInterrupt=0
UseManaStone=0
CheckNamed=0
NoInvis=1
UseManaRobe=1
ManaRobeMode=1
ManaRobeMinMana=70
ManaRobeMaxMana=94
NukeMana=25
NukeDelay=0
IgnoreList=NULL
RuneHP=70
CleanUp=0
UseGroupDS=1
ClarityBitch=NULL
SpellSet=Group
MaloDuration=19m
ResistsTillMala=3
ResistsTillQuit=6
[Spells]
Nuke1=Bolt of Molten Dross
Nuke2=
MagicNuke=Blade Strike
FireNuke=Fickle Fire
BoltNuke=Bolt of Molten Dross
Shielding=Prime Guard
WindPet=Child of Wind
EarthPet=Child of Earth
FirePet=Child of Fire
WaterPet=Child of Water
PetSpell=Child of Wind
MalosiniaSpell=Veil of Lost Hopes
MalosiniaType=item
MalaSpell=Malosinatia
MalaType=gem5
SummonedWepSpell=Blazing Stone of Demise
SummonedWepType=item
SummonedBeltSpell=Girdle of Magi'Kot
SummonedBeltType=gem2
SummonedMaskSpell=Muzzle of Mardu
SummonedMaskType=gem2
GroupDSSpell=Circle of Magmaskin
SingleDSSpell=Lavaskin
SiphonSpell=Elemental Symbiosis Recourse Rk. II 
RuneSpell=Shield of Auras
RuneType=item
PethpSpell=Primal Fusion
PethpBuff=Focus of Primal Elements
PethpType=item
PetHaste=Burnout VII
petAura=Rathe's Strength
petRune=Aegis of Kildrukaun
petProc=Iceflame Tenement
PetShrinkSpell=Tiny Companion
PetShrinkType=spell
RodSpell=Magi`kot's Pants of Convergence
RodType=item
SelfBuff1=Eidolic Guardian
SelfBuffNoStack1=Protection of the Nine,Blessing of the Nine,Steeloak Skin,Blessing of Steeloak
SelfBuff2=Elemental Symbiosis Recourse Rk. II 
SelfBuffNoStack2=
SelfBuff3=
SelfBuffNoStack3=
SelfBuff4=
SelfBuffNoStack4=
SelfBuff5=
SelfBuffNoStack5=
BuffList1=rod,modrod
BuffName1=Magi`kot's Pants of Convergence
BuffType1=item
BuffList2=ds,dmg shield,damage shield
BuffName2=ds
BuffType2=gem2
BuffList3=
BuffName3=
BuffType3=
BuffList4=
BuffName4=
BuffType4=
BuffList5=
BuffName5=
BuffType5=
Petrune=Aegis of Kildrukaun
Petproc=Iceflame Tenement
[Items]
HpRobe=Glossy Silk Robe
Clicky1=
ClickyNoStack1=
Clicky2=
ClickyNoStack2=
Clicky3=
ClickyNoStack3=
Clicky4=
ClickyNoStack4=
Clicky5=
ClickyNoStack5=
UseFood=1
StatFood=Bristlebanes Party Platter
Food1=Halas 10lb Meat Pie
Food2=Misty Thicket Picnic
Food3=Holy Cake
Food4=NULL
Food5=NULL
MeleeWep=Wand of Temporal Power
InvisItem=
DispellItem=
NormalMainhand=Focus of Primal Elements
NormalOffhand=Bazu Claw Hammer
HpMask=Mask of the Crackling Energy

here is what i added to it
petAura=Rathe's Strength
petRune=Aegis of Kildrukaun
petProc=Iceflame Tenement
 
here is the gen_routines

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 PetType "[MQ2] PetType #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}}" gem2 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}" 
   } 
   /call SetIniVar nuke1 Spells "${${nukeType}Nuke}" 
/return 

Sub Event_PetType(string line,string petName) 
   /declare petType string local ${petName.Arg[1]} 
   /if ( !${Defined[${petType}Pet]} ) /return 
   /varset petName ${petName.Right[-${Math.Calc[${petType.Length}+1]}]} 
   /if ( ${Me.Book[${petName}]} ) { 
      /varset ${petType}Pet ${petName} 
      /ini "${iniName}" Spells "${petType.Left[1].Upper}${petType.Right[-1]}Pet" "${petName}" 
   } 
   /call SetIniVar petSpell Spells "${${petType}Pet}" 
/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 ( ${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.Member[${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
 
Last edited:
Give us the entire error please, it gives a line number and sub routine that it is spazzing out on.

that was the entire error it was showing me in mq2 box in game... i dont know where to look for line number and sub routine... int he pet buffs area highlighted in blue ... here sec...
first part

/call DeclareIniVar petAura string Spells "Rathe's Strength"


sub routine part...


/if ( !${Me.PetBuff[${petaura}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petaura}" gem5 2s
/if ( !${Me.PetBuff[Rathe's Strength Effect]} && ${Me.PetBuff[call of the arch mage]} ) /call Cast "Rathe's Strength" gem5 2s
 
okay trying to go about this differently... changed the first part to this

/call DeclareIniVar petAuraBuff string Spells "Rathe's Strength Effect"
/call DeclareIniVar petAura string Spells "Rathe's Strength"


and second part to this......

/if ( !${Me.PetBuff[${petauraBuff}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petAura}" gem5 2s

now the errror is gone but it is just casting over and over again... any thoughts?
 
/if ( !${Me.PetBuff[${petauraBuff}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petAura}" gem5 2s


needs to change to
/if ( !${Me.PetBuff[${petAuraBuff}]} && !${Me.PetBuff[call of the arch mage]} && ${Me.Pet.Distance3D}<=100 ) /call Cast "${petAura}" gem5 2s
 
Last edited:
making the following changes in the mage macro.... doing this so hopefully will allow editing and updating of the gift or radiant mana and fickle inferno processes in the future...

old..

/if ( ${Me.Song[Gift of Mana].ID} || ${Me.Song[Gift of Radiant Mana].ID} ) {
/call Cast "Rampaging Servant Rk. II" gem9
} else {
/if ( ${Me.Song[Flames of Power].ID} && !${useDebuff} ) {
/call Cast "Bolt of Molten Dross" gem2


new

/call DeclareIniVar gsong string Spells "Gift of Radiant Mana"
/call DeclareIniVar gnuke string Spells "Rampaging Servant Rk. II"
/call DeclareIniVar fsong string Spells "Fickle Inferno Recourse"

/call DeclareIniVar boltNuke string Spells "Bolt of Molten Dross"

and

/if ( ${Me.Song[${gsong}]} ].ID} ) {
/call Cast "{gnuke}" " gem9
} else {
/if ( ${Me.Song[${fsong}].ID} ) {
/call Cast "{boltNuke}" gem3



so what do you guys think? will that work??
 
Last edited:
Re: Request for...your requests (Macros)

here is what i have came up with so far as for a heal routine for mage mac..
Rich (BB code):
this part is going to tell it what spell to use.

/call DeclareIniVar petHealSpell string Spells "Revival of Aenro"

going to tell it what percent to heal pet at

/declare HealPetAt           int    outer 50 

 this part is going into the nuke code right after  the gorm and fickle process checks

/if (${Me.Pet.PctHPs} < 40 && ${other variables}) { 
               /call HealPet  


  this is the subroutine it should point to if the pets hps are low..

Sub Healpet 
  /if (!${Me.Pet.ID}) /return 
  /if (${Me.Pet.Distance} > ${Spell[${petHealSpell}].Range} || ${Me.CurrentMana} < ${Spell[${petHealSpell}].Mana} || ${Me.Pet.PctHPs} > ${HealPetAt}) /return 
  /squelch /stick off 
  /target id ${Me.Pet.ID} 
  /delay 1s ${Me.Pet.ID} == ${Target.ID} 
  /if (!${Me.Moving}) /call cast "${PetHealSpell}" gem2 4s CheckHPs 
/return
i know there are probally alot of errors... tell what you guys think...
 
Last edited by a moderator:
Re: Request for...your requests (Macros)

Rich (BB code):
/if (${Me.Pet.Distance} > ${Spell[${petHealSpell}].Range} || ${Me.CurrentMana} < ${Spell[${petHealSpell}].Mana} || ${Me.Pet.PctHPs} > ${HealPetAt}) /return
needs to change to
Rich (BB code):
/if ((${Me.Pet.Distance} > ${Spell[${petHealSpell}].Range}) || (${Me.CurrentMana} < ${Spell[${petHealSpell}].Mana}) || (${Me.Pet.PctHPs} > ${HealPetAt})) /return
This way the or statements are grouped together. I don't remember if you needed to put () around the whole thing again or not, so i did it anyhow.

second thing I'd change
Rich (BB code):
  /if (!${Me.Moving}) /call cast "${PetHealSpell}" gem2 4s CheckHPs
to
Rich (BB code):
  /if (!${Me.Moving}) /call cast "${PetHealSpell}" gem2 4s CheckPetHPs
and add the sub
Rich (BB code):
Sub CheckPetHPs
/if (${Me.Pet.PctHPs}>=80) /call Interrupt
/if (${Me.Pet.PctHPs}<=10 && ${Me.AltAbilityReady[${MendPetSpell}]}) /call cast ${MendPetSpell} ${MendPetSpellGem} 2s
/return
then we'll need the declares
Rich (BB code):
/call DeclareIniVar MendPetSpell string Spells "SpellNameHere"
/call DeclareIniVar MendPetSpellGem string Spells Gem3
 
k i will try that in it... hey sid im testing out the changes now... its sending pet in using pet swarm aas on the mob but... its not nuking the mob?? any thoughts
 
In the .ini change Nuke1 to whatever, same with the spell name.
[Spells]
Nuke1=Fickle Inferno rk. ii
Nuke2=
MagicNuke=Shock of Cineral Steel
FireNuke=Fickle Inferno rk. ii
BoltNuke=Bolt of Molten Dross
SummonedNuke=Annihilate the Unnatural rk. ii
 
okay this is what i have now with your healing changes.... im trying to understand your thinking on this....
first is the declares

Rich (BB code):
   /call DeclareIniVar MendPetSpell string Spells "SpellNameHere"
   /call DeclareIniVar MendPetSpellGem string Spells Gem3
   /declare HealPetAt           int    outer 50

the next part is what we are going to stick down into the nuke lines right below the gift or radiant mana checks..

Rich (BB code):
/if (${Me.Pet.PctHPs} < 40 && ${other variables}) { 
               /call CheckPetHPs

then the last part i have is the subcheck with the changes you made ... thankyou..
Rich (BB code):
Sub CheckPetHPs
/if (${Me.Pet.PctHPs}>=80) /call Interrupt
/if (${Me.Pet.PctHPs}<=50 && ${Me.AltAbilityReady[${MendPetSpell}]}) /call cast ${MendPetSpell} ${MendPetSpellGem} 2s
/return
 
btw siddin your a brillant man... cant wait till we finish this so i can shoot you over the reward donation.. i already loaded it into paypal in anticipation of us getting this finished this week..
 
Last edited:
okay here is what i came up with for when the to check pets health to know to heal...

the section in blue is where i put it... just wondering if it will work here..

Rich (BB code):
} 
   /call CheckTarget 
   /if ( !${validTarget} || ( !${nukeMode} && !${useDebuff} ) )    
 
      /call CheckPetHPs
      /call CheckPet  
      /call CheckPet2 
      /doevents 
      /call CheckBuffs 
      /call CheckLoc 

|     /if (${Me.State.Equal[SIT]} && ${Me.PctMana} > 99 && !${Window[SpellBookWnd].Open}) /stand
|     /if ((${Me.CombatState.Equal[ACTIVE]} && !${Me.Casting.ID} && !${Me.Moving} && ${Me.PctMana} < 100 && !${Me.State.Equal[SIT]}) || (!${useManaRobe} && !${Me.State.Equal[SIT]})) {
|       /call SwapItem "${hpRobe}" chest
|       /sit
|       } else {
|       /if ( !${Me.CombatState.Equal[RESTING]} && !${Me.CombatState.Equal[ACTIVE]} ) /call ManaRobe 
|       }
      /delay 0 
      /goto :wait_for_target2 
   }
the text in blue is where i added it... would it be better there or in the nuke line?

if i put it in the nuke line would look something like this
Rich (BB code):
/if (${Me.Pet.PctHPs} < 40 && ${other variables}) { 
               /call CheckPetHPs
 
Last edited:
wow i just found this little snippit for the pet heal sub routine.. :>)


Rich (BB code):
Sub CheckPetHealth 
   /declare oldTargetID int local ${Target.ID} 
   /if ( ${Me.Pet.PctHPs}<=${layhandsHP} && ${Me.AltAbilityReady[mend companion]} ) /call Cast "mend companion" alt 1s 
   /if ( ${Me.Pet.PctHPs}<=${healHP} ) { 
      |move to pet if out of range (but not too far out of range) 
      /echo healing pet 
      :cph_move 
      /target id ${mobID} 
      /if ( ${Me.Pet.Distance3D}>100 && ${Me.Pet.Distance3D}<300 && ${Target.PctHPs}>20 ) { 
         /echo moving to pet for heal 
         /tar id ${Me.Pet.ID} 
         /face 
         /keypress forward hold 
         /delay 3 
         /keypress forward 
         /goto :cph_move 
      } 
      /delay 15 !${Me.Moving}    
      /call Cast "${healspell}" gem8 4s CheckPet 
   } 
   /target id ${oldTargetID} 
/return
 
You will want to remove the /call CheckPetHPs as that sub is going to be called when casting a heal on your pet. that way if your pet gets healed from something else, it stops your heal. or if it drops to 10% or less hps, it stops the heal and does mend companion.

edit: where the /call CheckPetHPs was put in /call CheckPetHealth i'll put some additional declares at the bottom of this post for you to put in.

small change to the sub
Rich (BB code):
Sub CheckPetHPs
/if (${Me.Pet.PctHPs}>=80) /call Interrupt
/if (${Me.Pet.PctHPs}<=10 && ${Me.AltAbilityReady[${MendPetSpell}]}) {
/call interrupt
/call cast ${MendPetSpell} ${MendPetSpellGem} 2s
}
/return
declare changes
Rich (BB code):
/call DeclareIniVar MendPetSpell string Spells "mend companion"
/call DeclareIniVar MendPetSpellGem string Spells alt
edit:
new declares as follows
Rich (BB code):
/call DeclareIniVar layhandsHP string Settings "10"
/call DeclareIniVar healHP string Settings alt
/call DeclareIniVar healspell string Spells "Heal Spell Here"
in the sub checkpethealth
Rich (BB code):
  /if ( ${Me.Pet.PctHPs}<=${layhandsHP} && ${Me.AltAbilityReady[mend companion]} ) /call Cast "mend companion" alt 1s
needs to change to
Rich (BB code):
 /if ( ${Me.Pet.PctHPs}<=${layhandsHP} && ${Me.AltAbilityReady[${MendPetSpell}]} ) /call Cast "${MendPetSpell}" ${MendPetSpellGem} 1s
 
getting the following error while trying to acess irc via the chat button top left of the page..

Not Found
The requested URL /http://forums.notaddicted.com/register.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.37 Server at forums.notaddicted.com Port 80
 
sigh my brain is turning to mush do you have a full copy with the changes we wanted to make to it.... i cannot get any of the changes other than the pet buffs to work... sigh ... its still not nuking processing gorm or fickle..... and its not going into the heal routine
 
wow ... thats enough to make the baby jesus cry............ thats a piece of art i tell you.. i will test it tomorrow and looking forward to then sending you reward bounty ... thankyou so much.....
 
my first attempt at altering a macro...trying to learn maco need help... lol

Users who are viewing this thread

Back
Top