• 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:
when running the macro getting
Unparsable in caculation: 'a'
mage.mac@1172 (CheckPetHealth):/if (${Me.Pet.PctHPs}<=${healHP}){
mage.mac@315 (main): /call CheckPetHealth
The current macro has ended
Failed to parse /if condition '(100<alt)', non-numeric encountered
 
okay just yanked out the symbiosis crap... the mage macro is not nuking
and the other thing is we need a way to tell it what spells we want to load where the so we can keep dedicated slots to the rage pet and to the granite stance for the pet
 
okay just yanked out the symbiosis crap... the mage macro is not nuking
and the other thing is we need a way to tell it what spells we want to load where the so we can keep dedicated slots to the rage pet and to the granite stance for the pet
i just use spellsets to memorize the spells. just /memspellset spellsetname
you want to keep the rage pet and granite stance spells up anyhow so don't use them in the same slots you use your buffs in. same for nukes.

As for why its not nuking for you, are you targeting anything when you start the macro or is it doing any of the other routines against that mob that its supposed to?
 
Ok, just got back from cali. I'll look into changing what needs to be changed for you. It'll take a bit though, kinda busy at work.
 
change the following for CoTh
in event_coth
Rich (BB code):
   /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}" 
   }
to
Rich (BB code):
    /target pc ${name} 
     /call AddToQueue "coth,${name}"
 
in
Rich (BB code):
Sub DebuffMobs
add the line
Rich (BB code):
/varset MobDebuffed 1

now in every line that has
Rich (BB code):
|| !${useDebuff}
add || ${MobDebuffed}==1
so that it looks like
Rich (BB code):
|| !${useDebuff} || ${MobDebuffed}==1
then find the line
Rich (BB code):
      /echo Target Dead!
and add this after it.
Rich (BB code):
/varset MobDebuffed 0
now under the line
Rich (BB code):
/call DeclareIniVar useDebuff int Settings 1 /debuff
add
Rich (BB code):
/call DeclareIniVar MobDebuffed int Settings 0
then of course add
Rich (BB code):
MobDebuffed=0
into your ini file.
 
change the following for CoTh
in event_coth
Rich (BB code):
   /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}" 
   }
to
Rich (BB code):
    /target pc ${name} 
     /call AddToQueue "coth,${name}"

well i attempted this and all it does is make the mage coth himself whenever a group member asks for coth via tells
 
my first attempt at altering a macro...trying to learn maco need help... lol

Users who are viewing this thread

Back
Top