• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Puller/Healer Mod

Status
Not open for further replies.

Alatyami

NotAddicted.com Engineer (Retired)
Joined
Dec 21, 2004
RedCents
804¢
Donnavan2005 asked me which macro's I use for my Cleric/Warrior Macro so here it is.

Only two bugs that I have encountered are:

1. It likes to target beyond the Z limit when it can't find anything close.
2. The auto-loot doesn't handle NO DROP confirmation windows.

These are complete ripps/mods.

I have been using these two combos for a while to PL my warrior to catch up to my cleric, thus the cleric is setup to use /tell verses /gsay. I have found this to be more effecient as I can use the healer.mac in a group when I two box. I simply assign my warrior as the main tank so he only gets the tells. Additionally, I added the more advanced XP Tracking to both macros.

I will split this post into three posts. This one will have the includes that you can added to your own custom/ripped macros.

The macros require the following:

o Working Copy of MacroQuest 2
o spell_routines.inc
o AutoLooter.inc
o Exp_Tracking.inc
o Puller.mac
o Healer.mac
o PullLoot.ini



spell_routines.inc
Rich (BB code):
| spell_routines.inc
|
| Written by Rusty~
| Last Modified 11/07/2004
|
| Features:
| - Casts spells, clicks items, or uses AA abilities for you
| - Allows back to back casting without waiting on spell gems to pop all the way up
| - Will interrupt spell if target dies while casting. If on a mount, it will dismount and duck if the time left
|   is greater than 7 seconds, else it will move forward a bit to interrupt, then move you back
|    ** IMPORTANT: if you don't want to interrupt a spell while mounted, put this at the top of your macro: **
|    **   /declare noInterrupt int outer 1                                                                  **
| - Allows you to use items in bags. Equips item, clicks it, then returns it to its previous location
| - Lets you set how long you want to keep trying to cast the spell (defaults to 0)
|   If the spell is interrupted before the given time, it will recast, else it will return CAST_INTERRUPTED
| - Lets you call a custom subroutine while waiting for spell to finish casting
|   Try to keep custom subroutines very small. A common use would be to interrupt the spell if a certain condition is true
| - This file also includes a sub named Interrupt. You can call this to interrupt any spell you're casting instantly.
| - You can also use the SwapItem sub included in this to swap items to certain slots
| - Added EquipItem sub to easily equip items in your main Inventory slots.
| - Note: if you don't want this to cast spells while you're invis, in your main macro have this at the top:
|      /declare noInvis int outer 1
|   This will make it return CAST_INVIS if you're invis
|
|  Below is a list of outer scope variables you can access in your macros:
|      refreshTime        - How much time is left till you're done recovering from casting
|      castEndTime        - How much time left till you're done casting the current spell... usable in custom spell Subs
|      spellNotHold       - 1 if your last spell didn't take hold, 0 otherwise
|      spellRecastTime1-9 - How much time left till that spell is back up
|
|======================================================================================================================
|  EquipItem:  An easier way to equip items you have in bags ( useful for weapons or focus items )
|              slot name is optional. If not given, it will equip it in the first possible spot
|
|    Usage:
|        /call EquipItem "item name|slotname"
|
|        Returns: "old item name|slotname"
|    Examples:
|
|    To Equip Sharp Ended Broken Lever when you have Serpent of Vindication equiped:
|        /call EquipItem "Sharp Ended Broken Lever"
|    It will return "Staff of Vindication|mainhand"
|    To reequip the original item, you can save the return in a variable, and then use it later like this:
|       /varset oldPrimary ${Macro.Return}
|       | ... do stuff here with your new item equiped
|       /call EquipItem ${oldPrimary}
|
|======================================================================================================================
|  SwapItem:  a subroutine which is used in the Cast sub itself. You don't need to do this to cast an item in a bag
|             but you can call it in your macro to SwapItems (such as weapons or focus items)
|    Usage:
|        /call SwapItem "item name" slotname|slotID
|    Examples:
|
|    To swap Darkblade of the Warlord to your main hand:
|        /call SwapItem "Darkblade of the Warlord" mainhand
|
|    To swap stat food in one bag with other food in another bag:
|        /call SwapItem "Bristlebanes Party Platter" ${FindItem[halas 10lb meat pie].InvSlot}
|
|======================================================================================================================
|  Cast: the main subroutine that casts spells or items for you
|     Usage:
|        /call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [custom subroutine name]
|     Examples:
|
|     To cast Howl of Tashan and mem it in slot 3 if not memmed:
|       /call Cast "Howl of Tashan" gem3
|
|     To cast Arcane Rune and keep trying for 7 seconds, in case of interrupts.
|       /call Cast "Arcane Rune" gem5 7s
|
|     To click Grim Aura earring that's in a bag:
|       /call Cast "Shrunken Goblin Skull Earring" item
|
|     To use AA ability Eldritch Rune:
|       /call Cast "Eldritch Rune" alt
|         or
|       /call Cast "173" alt
|
|     To call a subroutine that interrupts CH if target gets healed before it lands:
|       /call Cast "Complete Healing" gem1 0 CheckHP
|     Then in your macro have somewhere:
|       Sub CheckHP
|          /if ( ${Target.PctHPs}>=80 ) /call Interrupt
|       /return
|
| Returns these values:
|----------------------+----------------------------------------------------------------------+
| CAST_CANCELLED       | Spell was cancelled by ducking (either manually or because mob died) |
| CAST_CANNOTSEE       | You can't see your target                                            |
| CAST_IMMUNE          | Target is immune to this spell                                       |
| CAST_INTERRUPTED     | Casting was interrupted and exceeded the given time limit            |
| CAST_INVIS           | You were invis, and noInvis is set to true                           |
| CAST_NOTARGET        | You don't have a target selected for this spell                      |
| CAST_NOTMEMMED       | Spell is not memmed and you gem to mem was not specified             |
| CAST_NOTREADY        | AA ability or spell is not ready yet                                 |
| CAST_OUTOFMANA       | You don't have enough mana for this spell!                           |
| CAST_OUTOFRANGE      | Target is out of range                                               |
| CAST_RESISTED        | Your spell was resisted!                                             |
| CAST_SUCCESS         | Your spell was cast successfully! (yay)                              |
| CAST_UNKNOWNSPELL    | Spell/Item/Ability was not found                                     |
|----------------------+----------------------------------------------------------------------+

#event BeginCast "You begin casting#*#"
#event Collapse "Your gate is too unstable, and collapses.#*#"
#event FDFail "#1# has fallen to the ground.#*#"
#event Fizzle "Your spell fizzles#*#"
#event Immune "Your target is immune to changes in its attack speed#*#"
#event Immune "Your target is immune to changes in its run speed#*#"
#event Immune "Your target cannot be mesmerized#*#"
#event Interrupt "Your casting has been interrupted#*#"
#event Interrupt "Your spell is interrupted#*#"
#event NoHold "Your spell did not take hold#*#"
#event NoLOS "You cannot see your target.#*#"
#event NoTarget "You must first select a target for this spell!#*#"
#event NotReady "Spell recast time not yet met.#*#"
#event OutOfMana "Insufficient Mana to cast this spell!#*#"
#event OutOfRange "Your target is out of range, get closer!#*#"
#event Recover "You haven't recovered yet...#*#"
#event Recover "Spell recovery time not yet met#*#"
#event Resisted "Your target resisted the #1# spell#*#"
#event Resisted2 "You resist the #1# spell#*#"
#event Standing "You must be standing to cast a spell#*#"
#event Stunned "You are stunned#*#"
#event Stunned "You can't cast spells while stunned!#*#"
#event Stunned "You *CANNOT* cast spells, you have been silenced!#*#"


Sub Cast(string spellName,string spellType,timer giveUpTimer,string mySub)
   /declare castTime float local
   /if ( ${spellType.Equal[item]} ) {
      /varset castTime ${FindItem[${spellName}].CastTime}
   } else /if ( ${spellType.Equal[alt]} ) {
      /varset castTime ${AltAbility[${spellName}].Spell.MyCastTime}
   } else {
      /varset castTime ${Spell[${spellName}].MyCastTime}
   }
   /if ( ${Me.Invis} && ${noInvis} ) {
      /return
   }
   :wait_for_stop
   /if ( !${Defined[spellType]} ) /declare spellType string local spell
   /if ( ${Me.Casting.ID} ) {
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :wait_for_stop
   }
   /if ( ${Me.Speed} ) {
   :wait_for_stop2
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /if ( ${Me.Moving} && ${castTime}>0.1 ) /goto :wait_for_stop2
   }
   /if ( !${Defined[giveUpTimer]} ) /declare giveUpTimer timer local 0
   /if ( !${Defined[spellRecastTime1]} ) {
      /if ( !${Defined[noInterrupt]} ) /declare noInterrupt int outer 0
      /declare moveBack bool outer false
      /declare selfResist int outer
      /declare selfResistSpell string outer
      /declare castEndTime timer outer
      /declare refreshTime timer outer 0
      /declare itemRefreshTime float outer 0
      /declare startCastingLoc string outer
      /declare i int local
      /declare castReturn string outer
      /declare spellNotHold string outer
      /delay 5
      /for i 1 to 9
         /declare spellRecastTime${i} timer outer
         /if ( ${Me.SpellReady[${i}]} ) {
            /varset spellRecastTime${i} 0
         } else {
            /varcalc spellRecastTime${i} 10*${Me.Gem[${i}].RecastTime}
         }
      /next i
   }
   /varset spellNotHold 0
   /varset selfResist 0
   /declare delayTime timer local
   /declare swapItemBack bool local false
   /declare slotName int local
   /declare oldItemName string local
   /declare slotID int local
   /declare oldSlotID int local
   /declare spellID int local
   /declare charges int local

   /if ( ${Window[SpellBookWnd].Open} ) /keypress spellbook
   /if ( ${Me.Ducking} ) /keypress duck
   /if ( !${Me.Standing} ) /stand

   /doevents Recover
   /doevents BeginCast
   /doevents Fizzle
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents OutOfMana
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents Collapse
   /doevents NoTarget
   /doevents NotReady
   /varset castReturn CAST_SUCCESS

      /if ( ${spellType.Equal[item]} ) /goto :cast_item
   /if ( ${spellType.Equal[alt]} ) /goto :cast_alt

:cast_spell
   /if ( !${Int[${Me.Book[${spellName}]}]} ) {
      /echo Spell: "${spellName}" was not found in your book
      /return CAST_UNKNOWNSPELL
   }
   /if ( !${Me.Gem[${spellName}]} ) {
   :mem_spell
      /if ( ${Cursor.ID} ) {
         /autoinventory
         /delay 5
         /goto :mem_spell
      }
      /if ( ${spellType.Left[3].Equal[gem]} ) {
         /memspell ${spellType.Right[1]} "${spellName}"
      } else {
         /return CAST_NOTMEMMED
      }
      /delay 6s ${Me.Gem[${spellName}]}
      /if ( !${Me.Gem[${spellName}]} ) {
         /echo Spell mem interrupted...
         /return CAST_INTERRUPTED
      }
      :wait_for_mem

      /delay 15s ${Me.SpellReady[${spellName}]}
      /if ( !${Me.SpellReady[${spellName}]} ) {
         /if ( ${giveUpTimer} ) /goto :wait_for_mem
         /return CAST_NOTREADY
      }
   }
   /varset spellType spell
   /if ( ${spellName.Find[illusion: ]} && ${Me.AltAbilityReady[project illusion]} ) /call Cast "project illusion" alt

   /varset giveUpTimer ${giveUpTimer.OriginalValue}
   /declare recoverWaitTime timer local 30

:cast_spell_loop
:wait_for_spell
   /if ( ${Me.SpellReady[${spellName}]} ) {
      /varset spellRecastTime${Me.Gem[${spellName}]} 0
      /goto :skip_delay
   }
   /if ( ${spellRecastTime${Me.Gem[${spellName}]}}  ) {
      /if ( !${giveUpTimer} ) /return CAST_NOTREADY
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :wait_for_spell
   }
   /if ( !${refreshTime} ) /goto :skip_delay
:wait_on_refresh
   /if ( ${Me.SpellReady[${spellName}]} ) /varset refreshTime 0
   /if ( ${refreshTime}>0 ) {
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :wait_on_refresh
   }
   /varcalc delayTime 10*(1.5-${Spell[${spellName}].MyCastTime})
:cast_delay_loop
   /if ( ${delayTime}>0 ) {
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :cast_delay_loop
   }
:skip_delay
   /varset startCastingLoc ${Me.X} ${Me.Y} ${Me.Z}
   /cast "${spellName}"

   /if ( ${Me.Casting.ID} ) {
      /varset spellID ${Me.Casting.ID}
      /varcalc castEndTime ${Me.Casting.MyCastTime}*10
      /if ( ${castEndTime}<${Math.Calc[${Me.Casting.CastTime}*5]} ) /varcalc castEndTime ${Me.Casting.CastTime}*5
      /echo Casting: ${Me.Casting.Name}${If[!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]}
   }

   /varset moveBack false

   /call WaitCast ${mySub}

   /if ( ${moveBack} ) {
      /keypress back hold
      /delay 4
      /keypress back
      /delay 15 !${Me.Moving}
   }

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) {
      /echo Spell was cancelled...
      /return CAST_CANCELLED
   }

   /doevents Recover
   /doevents BeginCast
   /doevents Fizzle
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents OutOfMana
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents Collapse
   /doevents NoTarget
   /doevents NotReady

   /if ( !${spellID} ) /varset spellID ${Spell[${spellName}].ID}
   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) {
      /if ( ${castReturn.Equal[CAST_NOTREADY]} ) /return CAST_NOTREADY
      /if ( ${castReturn.Equal[CAST_FIZZLE]} ) {
         /echo Spell Fizzled. Recasting...
         /goto :cast_spell_loop
      }
      /if ( ${castReturn.Equal[CAST_RECOVER]} ) {
         /if ( !${recoverWaitTime} ) {
            /varcalc spellRecastTime${Me.Gem[${spellName}]} 10*${Spell[${spellID}].RecastTime}
            /if ( !${giveUpTimer} ) /return CAST_NOTREADY
         }
         /goto :cast_spell_loop
      }
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_spell_loop
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) {
         /if ( ${Me.Stunned} ) {
            /delay 3s !${Me.Stunned}
         } else {
            /delay 7
         }
         /goto :cast_spell_loop
      }
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) {
         /if ( ${giveUpTimer} ) {
            /echo Spell was interrupted. Recasting...
            /goto :cast_spell_loop
         }
         /echo Spell was interrupted...
         /return CAST_INTERRUPTED
      }
   }
   /if ( !${castReturn.Equal[CAST_CANNOTSEE]} && !${castReturn.Equal[CAST_OUTOFRANGE]} && !${castReturn.Equal[CAST_OUTOFMANA]} && !${castReturn.Equal[CAST_NOTARGET]} ) {
      /varcalc refreshTime 10*${Spell[${spellID}].RecoveryTime}
      /varcalc spellRecastTime${Me.Gem[${spellName}]} 10*${Spell[${spellID}].RecastTime}
   }
   /if ( ${castReturn.Equal[CAST_COLLAPSE]} ) {
      /varset giveUpTimer 200
      /goto :cast_spell_loop
   }
/return ${castReturn}


:cast_item
   /if ( !${FindItem[${spellName}].InvSlot} ) {
      /echo Cannot find item: ${spellName}
      /return CAST_UNKNOWNSPELL
   }
   /if ( ${FindItem[${spellName}].InvSlot}>21 ) {
      /varset swapItemBack true
      /if ( ${FindItem[${spellName}].WornSlot[1]} && ${FindItem[${spellName}].EffectType.Find[worn]} ) {
         /varset slotName ${FindItem[${spellName}].WornSlot[1]}
      } else /if ( ${FindItem[${spellName}].InvSlot}>29 ) {
         /varset slotName 29
      } else {
         /varset slotName ${FindItem[${spellName}].InvSlot}
      }
      /varset slotID ${InvSlot[${slotName}].ID}
      /varset oldSlotID ${FindItem[${spellName}].InvSlot.ID}
      /varset oldItemName ${InvSlot[${slotID}].Item.Name}
      /call SwapItem "${spellName}" ${slotID}
   }
:cast_item_loop
:wait_item_loop
   /if ( ${itemRefreshTime} > ${MacroQuest.Running} ) {
      /delay 1
      /goto :wait_item_loop
   }
   /varset itemRefreshTime ${Math.Calc[${MacroQuest.Running}+000]}
   /varset charges ${FindItem[${spellName}].Charges}
   /varset startCastingLoc ${Me.X} ${Me.Y} ${Me.Z}
   /cast item "${spellName}"
   /if ( ${Me.Casting.ID} ) {
      /varcalc castEndTime ${FindItem[${spellName}].CastTime}*10
      /echo Casting: ${FindItem[${spellName}].Spell.Name}${If[!${FindItem[${spellName}].Spell.TargetType.Equal[PB AE]} && !${FindItem[${spellName}].Spell.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]}
   }
   /if ( ${charges}>0 ) /delay 1s ${FindItem[${spellName}].Charges}!=${charges}

   /call WaitCast ${mySub}

   /if ( ${swapItemBack} ) {
      /if ( ${FindItem[${spellName}].ID} ) {
         /call SwapItem "${spellName}" ${oldSlotID}
      } else /if ( ${FindItem[${oldItemName}].ID} ) {
         /call SwapItem "${oldItemName}" ${slotID}
      }
      /if ( ${Cursor.Container} ) /autoinventory
   }

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) {
      /echo Spell was cancelled...
      /return CAST_CANCELLED
   }

   /doevents BeginCast
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents Collapse
   /doevents NoTarget
   /doevents NotReady

   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) {
      /if ( ${castReturn.Equal[CAST_NOTREADY]} ) /return CAST_NOTREADY
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_item
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) {
         /if ( ${Me.Stunned} ) {
            /delay 3s !${Me.Stunned}
         } else {
            /delay 7
         }
         /goto :cast_item
      }
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) {
         /if ( ${giveUpTimer} ) {
            /echo Spell was interrupted. Recasting...
            /goto :cast_item
         }
         /echo Spell was interrupted...
         /return CAST_INTERRUPTED
      }
   }
   /if ( ${castReturn.Equal[CAST_COLLAPSE]} ) {
      /varset giveUpTimer 200
      /goto :cast_item
   }
/return ${castReturn}


:cast_alt
   /if ( !${Me.AltAbilityReady[${spellName}]} ) /return CAST_NOTREADY
   /echo Using AA Ability: ${AltAbility[${spellName}].Name}
   /alt activate ${AltAbility[${spellName}].ID}
   /if ( ${AltAbility[${spellName}].Spell.MyCastTime}>=0.5 ) /delay 1s ${Me.Casting.ID}
   /call WaitCast ${mySub}

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) {
      /echo Spell was cancelled...
      /return CAST_CANCELLED
   }

   /doevents BeginCast
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents NoTarget

   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) {
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_alt
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) {
         /if ( ${Me.Stunned} ) {
            /delay 3s !${Me.Stunned}
         } else {
            /delay 7
         }
         /goto :cast_alt
      }
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) {
         /if ( ${giveUpTimer} ) {
            /echo Spell was interrupted. Recasting...
            /goto :cast_alt
         }
         /echo Spell was interrupted...
         /return CAST_INTERRUPTED
      }
   }
/return ${castReturn}


Sub EquipItem(string WhatWhere)
   /declare DestName string local
   /declare ItemName string local ${String[${WhatWhere}].Arg[1,|]}
   /declare SlotName string local ${String[${WhatWhere}].Arg[2,|]}
   /if (${SlotName.Equal[NULL]}) /varset SlotName ${InvSlot[${FindItem[=${ItemName}].WornSlot[1]}].Name}
   /if (${FindItem[=${ItemName}].InvSlot}<22 || !${FindItem[=${ItemName}].WornSlot[${SlotName}]}) /return
   /if (!${InvSlot[${SlotName}].Item.Name.Equal[NULL]}) /varset DestName "${InvSlot[${SlotName}].Item.Name}|${SlotName}"
   /call SwapItem "${ItemName}" "${SlotName}"
/return ${DestName}

| Sub EquipItem(string itemName,string slotName)
   /if ( !${Defined[slotName]} ) /declare slotName string local ${FindItem[${itemName}].WornSlot[1]}
   /declare oldItem string local ${Me.Inventory[${slotName}].Name}
   /call SwapItem "${itemName}" ${slotName}
/return "${oldItem}" ${slotName}

Sub SwapItem(string itemName,string slotName)
   /if ( ${InvSlot[${slotName}].Item.Name.Equal[${itemName}]} ) /return
   /declare slotID int local
   /declare oldSlotID int local
   /declare oldItem string local
   /declare i int local
   /varset slotID ${InvSlot[${slotName}].ID}           | slotID = slot you're swapping item to
   /varset oldSlotID ${FindItem[${itemName}].InvSlot.ID} | oldSlotID = slot the item was originally in
   /varset oldItem ${InvSlot[${slotName}].Item.Name}     | oldItem = name of item in the slot you're swapping WITH
   /if ( !${slotID} ) {
      /echo Invalid slot name: ${slotName}
      /return
   }
   /if ( !${oldSlotID} ) {
      /echo Could not find item ${itemName}
      /return
   }
:auto_inv
   /if ( ${Cursor.ID} && !${Cursor.Name.Equal[${itemName}]} ) {
      /if ( ${Cursor.Container} ) {
         /for i 1 to 8
            /if ( !${InvSlot[pack${i}].Item.Container} ) {
               /nomodkey /itemnotify pack${i} leftmouseup
            }
         /next i
      } else {
         /autoinventory
      }
      /goto :auto_inv
   }


:pick_up_item
 | if the item is in a bag and it's not open, then open it!
   /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup

 | if the slot you're putting it in is inside a bag and it's not open, then open it!
   /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup

 | ok.. pick up the item now!
   /squelch /nomodkey /shiftkey /itemnotify ${InvSlot[${oldSlotID}]} leftmouseup

 | if item isn't on your cursor, try again!
   /if ( !${Cursor.Name.Equal[${itemName}]} ) {
      /if ( ${Cursor.ID} && !${Cursor.Container} ) /autoinventory
      /goto :pick_up_item
   }
:exchange_items
   /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup
   /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup

 | put the item in the new slot, and pick up whatever item was there
   /squelch /nomodkey /shiftkey /itemnotify ${slotID} leftmouseup

 | if it didnt get exchanged, try again!
   /if ( ${Cursor.ID} && !${Cursor.Name.Equal[${oldItem}]} && !${Cursor.Name.Equal[${itemName}]} && !${Cursor.Container} ) /autoinventory
   /if ( !${InvSlot[${slotID}].Item.Name.Equal[${itemName}]} ) /goto :exchange_items
:drop_item
   /if ( !${Cursor.Container} || ( ${InvSlot[${oldSlotID}]}<30 && ${InvSlot[${oldSlotID}]}>=22 ) ) {
      /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup
      /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup
      /squelch /nomodkey /itemnotify ${oldSlotID} leftmouseup
      /if ( ${Cursor.ID} ) {
         /if ( !${Cursor.Name.Equal[${oldItem}]} ) /autoinventory
         /goto :drop_item
      }
   }
:close_pack
   /if ( ${InvSlot[${oldSlotID}].Pack} && ${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} && ( ${Cursor.Name.Equal[${itemName}]} || ${FindItem[${itemName}].ID} ) ) {
      /squelch /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup
      /goto :close_pack
   }
   /if ( ${InvSlot[${slotID}].Pack} && ${Window[${InvSlot[${slotID}].Pack.Name}].Open} && ( ${Cursor.Name.Equal[${itemName}]} || ${FindItem[${itemName}].ID} ) ) {
      /squelch /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup
      /goto :close_pack
   }
/return

Sub Interrupt
   /if ( ${Me.Mount.ID} ) /dismount
   /stopcast
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_CANCELLED
/return ${Macro.Return}


Sub WaitCast(string mySub)
   /declare currentTarget int local ${Target.ID}
   /declare currentTargetType string local ${Target.Type}
:wait_cast_loop
   /if ( ${Bool[${mySub}]} ) /call ${mySub}
   /if ( ${Me.Casting.ID} ) {
      /if ( ${currentTarget} && !${Spawn[${currentTarget}].Type.Equal[${currentTargetType}]} ) {
         /if ( !${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && !${moveBack} && ( !${Me.Mount.ID} || !${noInterrupt} ) ) {
            /if ( !${Me.Mount.ID} || ${castEndTime}>70 ) {
               /call Interrupt
            } else /if ( ${Me.Casting.RecastTime}>3 ) {
               /varset castReturn CAST_CANCELLED
               /keypress forward hold
               /delay 6
               /keypress forward
               /varset moveBack true
            }
         }
      }
      /if ( ${Me.State.Equal[DUCK]} ) /varset castReturn CAST_CANCELLED
      /delay 1
      /goto :wait_cast_loop
   }
/return

Sub Event_Fizzle
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_FIZZLE
/return

Sub Event_Resisted(string line,string name)
   /if ( ${selfResist} && ${name.Equal[${selfResistSpell}]} ) {
      /varset selfResist 0
      /return
   }
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RESISTED
/return

Sub Event_Resisted2(string line,string name)
   /if ( ${Defined[selfResist]} ) {
      /varset selfResist 1
      /varset selfResistSpell ${name}
   }
/return

Sub Event_Interrupt
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_INTERRUPTED
/return

Sub Event_Recover
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RECOVER
/return

Sub Event_Immune
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_IMMUNE
/return

Sub Event_Stunned
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_STUNNED
/return

Sub Event_NoLOS
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_CANNOTSEE
/return

Sub Event_Standing
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RESTART
/return

Sub Event_Collapse
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_COLLAPSE
/return

Sub Event_OutOfMana
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_OUTOFMANA
/return

Sub Event_OutOfRange
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_OUTOFRANGE
/return

Sub Event_NoTarget
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_NOTARGET
/return

Sub Event_NotReady
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_NOTREADY
/return

Sub Event_NoHold
   /if ( ${Defined[spellNotHold]} ) /varset spellNotHold 1
/return

Sub Event_BeginCast
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_SUCCESS
/return

Sub Event_FDFail(string line,string name)
   /if ( ${name.Equal[${Me.Name}]} && ${Defined[castReturn]} ) {
      /if ( !${Me.Standing} ) /stand
      /varset castReturn CAST_RESTART
   }
/return

AutoLooter.inc
Rich (BB code):
|AutoLooter.inc

Sub AutoLoot
  /declare slot int local 1
  /declare NumberItems int local 0
  /declare CorpseCut int local 0

  /echo Looting corpse
  /target corpse
  /loot
  /delay 2s
  /varset NumberItems ${Corpse.Items}
  /if (${NumberItems}>0) {
    /varcalc CorpseCut ${Target.CleanName.Find['s corpse]}-1
    /for slot 1 to ${NumberItems}
      /nomodkey /itemnotify loot${slot} leftmouseup
      /delay 3s
      :LagFix
        /call HandleItem
        /autoinventory
        /delay 3s
        /if (${Cursor.ID}) /goto :LagFix
    /next slot
  }
  /nomodkey /notify LootWnd DoneButton leftmouseup
  /delay 2s
  /if (${Target.ID}) /target clear
  /delay 2s

/return


sub HandleItem
   /echo Found ${Cursor.Name}
   /declare ItemSetting int local
   /declare NotFound int local

   /varset NotFound -1

   | Look up this item in the INI file
   /varset ItemSetting ${Ini[PullLoot.ini,KeepList,${Cursor.Name},${NotFound}]}

   /delay 1s

   | If the item isn't in the .ini file then add it.
   /if (${ItemSetting}==${NotFound}) {
      /ini "PullLoot.ini" "KeepList" "${Cursor.Name}" "1"
      /varset ItemSetting 1
   }

   | If we're keeping this item then stash it in our bags.
   | Otherwise, just destroy it.
   /if (${ItemSetting}==1) {
      :LootIt
      /autoinventory
      /delay 2s
      /if (${Cursor.ID}) /goto :LootIt
   } else {
      /destroy
   }
/return

Exp_Tracking.inc
Rich (BB code):
|**********************
Exp_Tracking.inc
Version 2.0

This include will track your exp in various forms.
You can track Total Exp Gained, Total AA Exp Gained, Total Run Time, Exp Gained Per Minute,
AA Exp Gained Per Minute, Aproximate Time Till Ding, and Aproximate Time Till AA Ding.
Some of this came from the current "perfect xptracker" macro however I wanted to display
more usefull information.

To use simply /call ExpPrep during a part of your macro that is only called once.
Then /call ExpTrack at any moment you wish to check your exp stats.
***********************|


Sub ExpPrep

   /declare Exper               float  outer ${Me.PctExp}
   /declare AAExp               float  outer ${Me.PctAAExp}
   /declare TotalAAExp          float  outer  0.00
   /declare TotalExp            float  outer  0.00


|*********************************************************************
Edit these values as you see fit. If you set to 1 the information will
show each call. Set to 0 and it will not show.
**********************************************************************|

||Show Total Exp Gained?||
   /declare ShowTEG       bool   outer TRUE

||Show Total AA Exp Gained?||
   /declare ShowTAAEG     bool   outer TRUE

||Show Total Run Time?||
   /declare ShowTRT       bool   outer TRUE

||Show Exp Gained Per Minute?||
   /declare ShowEGPM      bool   outer TRUE

||Show AA Exp Gained Per Minute?||
   /declare ShowAAEGPM    bool   outer TRUE

||Show Aproximate Time Till Ding?||
   /declare ShowATTD      bool   outer TRUE

||Show Aproximate Time Till AA Ding?||
   /declare ShowATTAAD    bool   outer TRUE

/return

Sub ExpTrack

  /if (${Me.PctAAExp}>=${AAExp}) {
   /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]}
  } else {
   /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}+100]}
  }
  /if (${Me.PctExp}>=${Exper}) {
   /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]}
  } else {
   /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}+100]}
  }
      /varcalc TotalAAExp ${TotalAAExp}+${AAExp}
      /varcalc TotalExp ${TotalExp}+${Exper}

   /echo ***************************************
   /if (${ShowTEG}) /echo Total Gained: ${Exper}% / ${AAExp}%
   /if (${ShowTEG}) /echo Total Exp Gained: ${TotalExp}% / ${TotalAAExp}%
   /if (${ShowTRT}) /echo Total Running Time: ${Math.Calc[${Macro.RunTime}/60]} minutes
   /if (${ShowEGPM}) /echo Exp Gained Per Minute: ${Math.Calc[${TotalExp}/${Math.Calc[${Macro.RunTime}/60]}]} / ${Math.Calc[${TotalAAExp}/${Math.Calc[${Macro.RunTime}/60]}]}
   /if (${ShowATTD}) {
      /if (${TotalExp}==0) {
         /echo Aprox Time till Ding: Forever!!
      } else {
         /echo Aprox Time till Ding: ${Math.Calc[${Math.Calc[${Math.Calc[${Macro.RunTime}/60]}/${TotalExp}]}*${Math.Calc[100-${Me.PctExp}]}]} minutes
      }
   }
   /if (${ShowATTAAD}) {
      /if (${TotalAAExp}==0) {
         /echo Aprox Time till AA Ding: Forever!!
      } else {
         /echo Aprox Time till AA Ding: ${Math.Calc[${Math.Calc[${Math.Calc[${Macro.RunTime}/60]}/${TotalAAExp}]}*${Math.Calc[100-${Me.PctAAExp}]}]} minutes
      }
   }
   /echo ***************************************
   /varset Exper ${Me.PctExp}
   /varset AAExp ${Me.PctAAExp}

/return
 
Re: Puller.inc PullLoot.inc

As for the warrior, I ripped the Pull.mac and then spliced it with a Loot.ini and the advanced xp tracker. I can confirm that it diffinitely camps you out when a GM enters the zone. The idea for the Loot.ini came from yafm.mac

Puller.mac
Rich (BB code):
| Puller Macro
| Puller.mac
| Author      : Alatyami: Ripped by robdawg :Ripped by Jdelpheki :Ripped Again By hakcenter
| Version     : v3 2004-12-16 5:50pm PST
| Useage      : /macro pull
| Description : This macro will run your character around Pulling any mobs.
|      This is definitely a work in progress and I am sure
|      someone can think of plenty of upgrades for this.
| : Ripped section Jdelpheki
|      Modified for pull to area where Macro is started.  I have been using this
|      2 level 45's Cleric Running genbot and Warrior running Pull2.  Ran for 4 hours
|      Max with one cleric death. Needs Throwing weapon or arch support too
|      Needs Genbot to announce its getting hit or get a new cleric script
| : Ripped section hakcenter
|      Pulls Any Mobs within radius (regardless of level)
|      No Mob Array Required
|      Looting Added
|      *Looting -stuck on corpse bug fixed-
|      Loot Table Array Support
|      *Puller runs to pull spot after mob looting is finished
|      *Removed Target Fail Counters
|      *Checks for mobs every 30seconds, 1second 50radius checks
|      *Reformated
|      *On zoning(death whatever), quits everquest
|      *Added more checks
|
|      2004-12-11
|
|      Added some squelching, always looking for mobs within range, 5 distance intervals
|      Jacked Item Coding from Rogue Helper
|      Fixed UI locking up
|      Fixed Long Buff Casts
|      Added Disarm to the Special Combat abilities
|
|      2004-12-16
|      Revamped Close mob checking to 0.1second 100radius squelched
|      Revamped Item casting to check for local mobs during.. and interupt if mob is near 100radius
|      Removed mass escaping.. cause its retarded
|      Fixed cool errors when accidently pushing esc while on a mob
|      Fixed cool errors when accidently pushing esc while pulling a mob
|      Added 1second before first item cast, incase item is worn... you get interupted cause its too fast
|
|------------------------------------------------------------------------------------

#turbo 10
#include AutoLooter.inc
#include Exp_Tracking.inc
#Event Slain "#*# slain#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event ItemSet "[MQ2] ItemSet#*#"
#Event ItemBounce "[MQ2] ItemBounce#*#"
#Event ItemCast "[MQ2] ItemCast#*#"

Sub Main

   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  150
   |------------------------------------------------------------
   |How far is the fast movement range?
   |------------------------------------------------------------
   /declare RV_FastRange        int outer  10
   |------------------------------------------------------------
   |How far is the maximum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMax         int outer  7
   |------------------------------------------------------------
   |How far is the minimum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMin         int outer  8
   |------------------------------------------------------------
   |What is the minimum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MinZRange        int outer  -1000
   |------------------------------------------------------------
   |What is the maximum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MaxZRange        int outer  100

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /declare RV_MyTargetID       int outer  0
   /declare RV_MyTargetName     string outer
   /declare RV_MyTargetDead     int outer  0
   /declare RV_InvalidTargetID  int outer  0
   /declare RV_HasTarget        int outer  0
   /declare RV_RandomWait       int outer  0
   /declare RV_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   /declare RV_MyXLOC           int outer  0
   /declare RV_MyYLOC           int outer  0
   /declare RV_ObstacleCount    int outer  0
   /declare RV_hitcount         int outer  0
   /declare RV_healcheck        int outer  0
   /declare RT_MyXLOC           int outer  ${Me.X}
   /declare RT_MyyLOC           int outer  ${Me.Y}

   /declare lastevent string outer None
   /declare CheckBuffs int outer 0
   /declare i int outer
   /declare ialias string outer None
   /declare doIclick bool outer FALSE
   /declare bouncenum int outer 1
   /declare ibounce string outer None
   /declare itemspellname string outer None
   /declare clicktimer timer outer 0
   /squelch /alias /iset /echo ItemSet
   /squelch /alias /ibounce /echo ItemBounce
   /squelch /alias /iclick /echo ItemCast

   /varset CheckBuffs 1
   /call ExpPrep
   :Start
      /doevents
      /call GMCheck
      /call GetTarget
      /if (${RV_HasTarget}) /call Pull
      /if (${RV_HasTarget}) /call CombatSub
      /call ResetSub
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /goto :Start
/return

|--------------------------------------------------------------------------------
|SUB: GMCheck
|--------------------------------------------------------------------------------
Sub GMCheck
   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM has entered the zone!
      /echo FUCK HIM but ending the macro...
      /keypress forward
      /keypress back
      /quit
      /endmacro
   }
/return

|--------------------------------------------------------------------------------
|SUB: AquireTarget
|--------------------------------------------------------------------------------
Sub GetTarget
   /doevents
   /declare SpawnTimer         int local
   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub       int local
   /echo Looking for Close Range Mobs
   :Acquire
      /doevents
      /for RV_CurrentRadius 100 to ${RV_MaxRadius} step 5
      /squelch /target radius ${RV_CurrentRadius} npc
      /varset RV_MyTargetID ${Target.ID}
      /varset RV_MyTargetDead 0
      /if (${Target.ID}) {
         /if (${Int[${Target.Z}]}<${RV_MinZRange}) {
            /echo Mob is BELOW Min Z Range, picking another...
            /varset RV_InvalidTargetID ${Target.ID}
            /call ResetSub
            /goto :Acquire
         }
         /if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
            /echo Mob is ABOVE Max Z Range, picking another...
            /varset RV_InvalidTargetID ${Target.ID}
            /call ResetSub
            /goto :Acquire
         }
         /varset RV_HasTarget 1
         /varset RV_MyTargetName ${Target.Name}
         /echo Acquired ${Target.Name} at range ${Int[${Target.Distance}]}
         /return
      }

      /next RV_CurrentRadius
      /goto :Acquire
/return

|--------------------------------------------------------------------------------
|SUB: Pull
|--------------------------------------------------------------------------------
Sub Pull
   /doevents
   /echo Pulling Mob
   /declare TargDist float local
   :PullLoop
      /doevents
      /if (!${Me.Combat}) /attack on
      /call MoveToMob
      /if (!${Target.ID}) /return
      /face fast
      /if (${Target.PctHPs}==100) /goto :PullLoop
      /if (${Target.PctHPs}<21) /return
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /if (!${Target.ID}) /return
      /face fast
   :Engage
      /varset TargDist ${Math.Distance[${Target.Y},${Target.X},0:${Me.Y},${Me.X},0]}
      /if ( ${TargDist}<30 ) /return
      /delay 1s
      /goto :Engage
/return

|--------------------------------------------------------------------------------
|SUB: MovetoMob
|--------------------------------------------------------------------------------
Sub MoveToMob
   /doevents
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
   :MovementLoop
      /doevents
      /if (!${Target.ID}) /return
      /face fast
      /varcalc RV_ObstacleCount ${RV_ObstacleCount}+1
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /keypress forward hold
      /if (${Int[${Target.Distance}]}<${RV_FastRange}&&${Int[${Target.Distance}]}>${RV_RangeMax}) /keypress forward
      /if (${Int[${Target.Distance}]}<${RV_RangeMin}) /keypress back
      /if (${RV_ObstacleCount}>=15) {
         /call CheckObstacle
         /goto :Movementloop
      }
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop
/return

|--------------------------------------------------------------------------------
|SUB: MoveToLocation
|--------------------------------------------------------------------------------
Sub MoveToLoc(MoveToY, MoveToX)
   /doevents
   /declare running int local
   /declare distanceNow float local
   /declare distanceBefore float local
   /declare distanceModifier int local
   /declare distanceTimer timer 15
   /varset running 0
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
   /varset distanceModifier 1
   /echo Moving to Location: ${MoveToY}, ${MoveToX}.
   /echo Distance: ${distanceBefore}
   :moveToLocation
      /doevents
      /face fast nolook loc ${MoveToY},${MoveToX}
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
         /keypress forward
         /return
      }
      /if (${distanceTimer}==0) {
         /if (${Me.Sneaking}) {
            /varset distanceModifier 2
         } else {
            /varset distanceModifier 1
         }
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
         /call HitObstacle
         }
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /varset distanceTimer 15
      }
      /if (${running}==0) {
         /keypress forward
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
               /varset running 1
               /keypress forward hold
            }
      } else {
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
            /varset running 0
            /keypress forward
         }
      }
      /goto :moveToLocation
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleCheck
|--------------------------------------------------------------------------------
Sub CheckObstacle
   /doevents
   /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleAvoidance
|--------------------------------------------------------------------------------
Sub HitObstacle
   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[2]}) {
      /keypress strafe_right hold
   } else {
      /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
   /doevents
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   /echo Attacking Mob NOW!
   :CombatLoop
      /if (!${Me.Combat}) /attack on
      /if (!${Target.ID}) /return
      /call MoveToMob
      /call SpecialIT
      /if (!${RV_TargetDead}) /goto :CombatLoop
      /doevents
/return

|--------------------------------------------------------------------------------
|SUB: SpecialCombat
|--------------------------------------------------------------------------------
Sub SpecialIt
   /doevents
   /declare TempID    int inner  0
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Kick]}) {
      /doability "Kick"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Disarm]}) {
      /doability "Disarm"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) {
      /doability "Taunt"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Bash]}) {
      /doability "Bash"
   }
/return

|--------------------------------------------------------------------------------
|SUB: Slain
|--------------------------------------------------------------------------------

Sub Event_Slain
   /varset RV_TargetDead 1
   /varset RV_Fighting 0
   /attack off
   /call ExpTrack
   /target clear
   /keypress forward
   /keypress back
   /squelch /target radius 30 corpse
   /face fast
   /if (${RV_HasTarget}) /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Zoned
|--------------------------------------------------------------------------------
Sub Event_Zoned
  /echo Zoned
  /delay 60s
  /quit
  /endmacro

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob
   /doevents
   /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
   /doevents
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
/return

PullLoot.ini
Rich (BB code):
[default]
MaxSave=100
[KeepList]
Roots=0
Rat Meat=1
Snake Scales=1
Rat Whiskers=1
Snake Egg=1
Bat Wing=1
 
And now for the Cleric. I have a low 60's cleric, but the only tweaks here were the adv xp tracking and using tells verses /gsay. You can change it by simply doing a find/replace on /tell ${tankname} and replace it with /gsay or /1 what ever communications you want to happen.

Healer.mac
Rich (BB code):
|- healer.mac
|- Author: Alatyami, Redguides.com Moderator
|- Original Credits:
|------------------------------------------------------------------------------|
|- Modifications:
|- [07-14-2005] * Fixed the TLO errors
|-              * Removed trickyda, it didn't really work to well anyways
|------------------------------------------------------------------------------|

#include spell_routines.inc
#include Exp_Tracking.inc
#event Exp "You gain#*#"
#Chat Chat
#Chat tell

Sub Main

|------------------READ THIS SECTION AND EDIT IF NEEDED------------------------|
|- The following declarations are used to determine spell names and spell
|- ranges for the spells you would like to use.

   /declare mychannel string outer pullhealer
   /declare autohealmode int outer 3
   |-Edit this line to change your start message to the primary tank
   /declare tankstartmsg string outer Healer alive and awake .. lets kill stuff
   /declare healspell string outer Complete Healing
   /declare healspellrange int outer 100
   /declare patchheal string outer Ethereal Light
   /declare patchhealrange int outer 200
   /declare hotspell string outer Celestial Elixir
   /declare hotspellrange int outer 100
   /declare daspell string outer Divine Barrier
   /declare yaulpspell string outer Yaulp V
   /declare usegroupheal int outer 1
   /declare groupheal string outer Word of Restoration
   /declare grouphealrange int outer 70
   /declare usedivarb int outer 1
   /declare healafterdivarb int outer 0
   /declare announce int outer 1
   /declare autosit int outer 1
   /declare distancetosit int outer 40
   /declare autointerrupt int outer 1
   /declare onlyhealfd int outer 1
   /declare interrupt2healself int outer 1
   /declare interrupt2healselfhp int outer 50
   /declare noInvis int outer 1
   /declare defaultstophealpoint int outer 80
   /declare acbuff string outer Ward of Valiance
   /declare longhpbuff string outer Conviction
   /declare singlesymbuff string outer Symbol of Balikor
   /declare groupsymbuff string outer NULL
   /declare spellhastebuff string outer Blessing of Reverence
   /declare rgcspell string outer Remove Greater Curse
   /declare healpetmode int outer 2
   /declare pethealpoint int outer 65
   /declare manatohealpet int outer 25
   /declare pethealspell string outer Complete Healing
   /declare pethealspellrange int outer 100
   /declare nukeone string outer Judgement
   /declare nuketwo string outer Order
   /declare stunone string outer Sound of Divinity
   /declare stuntwo string outer Shock of Wonder
   /declare rootspellname string outer Greater Immobilize
   /declare rootspelltime int outer 2


|------------------------------------------------------------------------------|
   /declare selfhealpoint int outer 70
   /declare dacastpoint int outer 29
   /declare divarbpoint int outer 25
   /declare interrupt2divarb int outer 12
|- Heal at % for WAR/PAL/SK
   /declare tankhealpoint int outer 65
|- Heal at % for WIZ/MAG/ENC/DRU
   /declare casterhotpoint int outer 85
   /declare casterpatchpoint int outer 60
|- Heal at % for NEC/SHM
   /declare necshmpatchpoint int outer 60
|- Heal at % for all other classes
   /declare defaultpatchpoint int outer 70

|------------------------END EDITING------------------------|

   /declare healpct int outer 60
   /declare tankname string outer ${Target}
   /declare tanknameid int outer
   /declare tankclass string outer
   /declare minorhurt int outer 0
   /declare majorhurt int outer 0
   /declare worsthurt string outer NULL
   /declare worsthurtid int outer
   /declare worsthp int outer 100
   /declare worstclass string outer NULL
   /declare gmember int outer
   /declare nohotforua string outer NULL
   /declare nohotforub string outer NULL
   /declare nohotforuc string outer NULL
   /declare nohotforud string outer NULL
   /declare rodwait int outer 0
   /declare following int outer 0
   /declare follname string outer NULL
   /declare pallycount int outer 0
   /declare stophealpoint int outer ${defaultstophealpoint}
   /declare buffbeg int outer 0
   /declare oomspam int outer 1
   /declare lomspam int outer 1
   /declare duckspam int outer 1
   /declare duckfdspam int outer 1
   /declare duckselfspam int outer 1
   /declare nomtspam int outer 1
   /declare ghealhurtcount int outer 0
   /declare divarboor int outer 0
   /declare aetime int outer 0

|-- Uncomment the following line if you want to use a chat channel
  |-- /join ${mychannel}


   /if (!${Target.ID}) {
      /echo Target the Tank when you run this macro to designate him as MT
      /end
   } else {
      /varset tanknameid ${Target.ID}
      /varset tankclass ${Target.Class.Name}
   }

   /if (${Defined[Param0]}) {
      /varset healpct ${Param0}
   } else /echo No Heal% specified, defaulting to 60%

   /if (!${Defined[Param1]}) {
      /echo Usage: /mac AFCleric % healspell
      /echo Example: /mac AFCleric 40 Complete Heal
      /echo Defaulting to ${healspell} at ${healpct}%
   } else {
      /if (!${Defined[Param2]}) {
         /varset healspell ${Param1}
      } else /if (!${Defined[Param3]}) {
         /varset healspell ${Param1} ${Param2}
      } else /if (!${Defined[Param4]}) {
         /varset healspell ${Param1} ${Param2} ${Param3}
      } else {
         /varset healspell ${Param1} ${Param2} ${Param3} ${Param4}
      }
   }

   /call ExpPrep  |- Start the xp tracker,

   /echo AutoHealer Active, running in Autohealmode ${autohealmode}
   /echo Casting ${healspell} on ${tankname} at ${healpct}% HP
   /tell ${tankname} You are me primary heal.
   /if (${autohealmode}==0) /echo ONLY ${tankname} will be healed
   /if (${autohealmode}==1) /echo ONLY ${tankname} and myself will be healed
   /if (${autohealmode}==2) /echo ${tankname}, myself and my group will be healed
   /if (${autohealmode}==3) /echo ${tankname} and myself will be healed before the rest of the group

   :tankwatchloop

   /if (${Spawn[${tanknameid}].Name.NotEqual[${tankname}]}) /varset tanknameid 0
   /if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) {
      /if (${SpawnCount[${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[${tankname} ${tankclass}].ID}
         /echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid}
      }
      /if (${SpawnCount[${tankname} ${tankclass}]}>1) {
         /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
            /beep
            /varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID}
            /echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro
         } else {
            /beep
            /echo Need to restart macro to correctly identify the MT
         }
      }
   }
   /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) {
      /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[pc ${tankname ${tankclass}}].ID}
         /echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro
      }
   }
   /if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) {
      /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
      }
   }
   /if (!${Spawn[${tanknameid}].ID}) {
      /if (${nomtspam}==1) {
         /e Warning No Designated MT is available
         /timed 300 /varset nomtspam 1
         /varset nomtspam 0
      }
   }
   /if ((${Me.PctMana}<=50)&&(${announce}==1)&&(${lomspam}==1)) {
      /tell ${tankname} ${Me.PctMana}m
      /varset lomspam 0
      /timed 300 /varset lomspam 1
   }
   /if ((${Me.PctMana}<=7)&&(${announce}==1)&&(${oomspam}==1)) {
      /tell ${tankname} oom
      /varset oomspam 0
      /timed 300 /varset oomspam 1
      /call MedTime
   }
   /if (${GameState.Equal[CHARSELECT]}) /end
   /if (${Target.ID}==${tanknameid}) {
      /varset stophealpoint ${Math.Calc[${healpct}*1.1]}
      /if ((${Target.Distance}<=${patchhealrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
      /if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) {
         /if (${announce}==1) /tell ${tankname} (${healspell}) --- %T ---
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
        /if (${announce}==1) /tell ${tankname} ${Me.PctMana}
      }
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
   }
   /if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand
   }
   /if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand
   }
   /if (${autohealmode}==0) {
      /call CheckEvents
      /goto :tankwatchloop
   }
   /if ((${autohealmode}>=1)&&(${Me.PctHPs}<=${selfhealpoint})) /call Healself
   /if (${autohealmode}>=2) {
      /if ((${Target.PctHPs}>${healpct})||(${Target.Distance}>${healspellrange})||(${Target.PctHPs}<=1)||(!${Target.ID})||(${Target.ID}!=${tanknameid})) {
         /call Healgroup
      }
   }
   /if ((${autohealmode}<2)&&(${Me.PctHPs}>${selfhealpoint})&&(${Me.PctMana}<=98)) /call MedTime
   /call CheckEvents
   /goto :tankwatchloop
/return


Sub Healself
   /if (${Me.PctHPs}>${selfhealpoint}) /return
   /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
   /if ((!${Target.ID})||(${Target.PctHPs}>=${Math.Calc[1.1*${healpct}]})||(${Target.PctHPs}<=1)||(${Target.ID}!=${tanknameid})) {
      /if ((${Me.PctHPs}<=${selfhealpoint})&&(${Me.PctHPs}>${dacastpoint})) {
         /target myself
         /delay 6 ${Target.Name.Equal[${Me}]}
         /if (${Target.Name.Equal[${Me}]}) {
            /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
            /call Cast "${patchheal}" gem2 1s CheckHP
            /delay 15 ${Me.SpellReady[${patchheal}]}
         }
      }
   }
   /if (${Me.PctHPs}<=${Math.Calc[${selfhealpoint}*0.7]}) {
      /target myself
      /delay 6 ${Target.Name.Equal[${Me}]}
      /if (${Target.Name.Equal[${Me}]}) {
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
   }
   /varset stophealpoint ${defaultstophealpoint}
/return


Sub Healgroup
   :healgroup
   /varset worsthurt NULL
   /varset worsthp 100
   /varset worstclass NULL
   /varset minorhurt 0
   /varset majorhurt 0
   /varset ghealhurtcount 0
   /for gmember 0 to ${Group}
      /if (${onlyhealfd}==0) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if (${Group.Member[${gmember}].PctHPs}<=${worsthp}) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
         }
      }
      /if (${onlyhealfd}==1) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if ((${Group.Member[${gmember}].Class.Name.NotEqual[Monk]})&&(${Group.Member[${gmember}].Class.Name.NotEqual[Necromancer]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
            /if ((${Group.Member[${gmember}].Class.Name.Equal[Monk]})||(${Group.Member[${gmember}].Class.Name.Equal[Necromancer]})) {
               /if ((${Group.Member[${gmember}].State.Equal[feign]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
                  /varset worsthurt ${Group.Member[${gmember}].Name}
                  /varset worsthurtid ${Group.Member[${gmember}].ID}
                  /varset worsthp ${Group.Member[${gmember}].PctHPs}
                  /varset worstclass ${Group.Member[${gmember}].Class.Name}
               }
            }
         }
      }
      /if ((${Group.Member[${gmember}].Distance}<=${grouphealrange})&&(${Group.Member[${gmember}].PctHPs}<=85)) /varcalc ghealhurtcount ${ghealhurtcount}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=85)&&(${Group.Member[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=60)&&(${Group.Member[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1
   /next gmember
   /if (${autohealmode}==3) {
      /if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
         /if ((${Target.ID}==${tanknameid})&&(${Target.PctHPs}<=${healpct})&&(${Target.Distance}<=${healspellrange})) /return
      }
      /if (${Me.PctHPs}<=${selfhealpoint}) /return
   }
   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
      }
      /if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) {
         /if (${Me.PctMana}<=98) /call MedTime
      }
      /call CheckEvents
      /return
   }
   /if ((${usedivarb}==1)&&(${worsthp}<=${divarbpoint})&&(${Me.AltAbilityReady[divine arbitration]})) /call Divarbcast
   /if ((${Math.Calc[${majorhurt}+${minorhurt}]}>=3)&&(${usegroupheal}==1)) {
      /if (${announce}==1) /tell ${tankname} Inc Grp Heal, get close
      /call Cast "${groupheal}" gem4 1s
      /delay 15 ${Me.SpellReady[${groupheal}]}
      /call CheckEvents
      /return
   }
   /if (${worsthurtid}==${tanknameid}) /return
   /if (${worsthurtid}==${Me.ID}) {
      /call Healself
      /call CheckEvents
      /return
   }



   /if ((${worstclass}.Equal[Warrior]})||(${worstclass}.Equal[Paladin]})||(${worstclass}.Equal[Shadow Knight]})) {
      /if ((${worsthp}<=${tankhealpoint})&&(${worsthp}>=${Math.Calc[0.7*${tankhealpoint}]})&&(${majorhurt}<=1)&&(${minorhurt}<=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /tell ${tankname} ((${healspell}) --- %T ---
        /if (${announce}==1) /tell ${tankname} ${Me.PctMana}
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
      /if (${worsthp}<=${tankhealpoint}) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
   } else /if ((${worstclass}.Equal[Magician]})||([${worstclass}.Equal[Wizard]})||(${worstclass}.Equal[Enchanter]})||(${worstclass}.Equal[Druid]})) {
      /if ((${worsthp}<=${casterhotpoint})&&(${worsthp}>${casterpatchpoint})) {
         /if ((${worsthurt}.Equal[${nohotforua}]})||(${worsthurt}.Equal[${nohotforub}]})||(${worsthurt}.Equal[${nohotforuc}]})||(${worsthurt}.Equal[${nohotforud}]})) /return
         /if (${nohotforua}.Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
            /varset nohotforua ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforua NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforub}.Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforub ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforub NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforuc}.Equal[NULL]}) {
            /target id${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforuc ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforuc NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforud}.Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforud ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforud NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         }
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
      /if ((${worsthp}<=${casterpatchpoint})&&(${worsthp}>=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
    /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /return
      }
      /varset stophealpoint ${defaultstophealpoint}
   } else /if ((${worstclass}.Equal[Necromancer]})||(${worstclass}.Equal[Shaman]})) {
      /if ((${worsthp}<=${necshmpatchpoint})&&(${worsthp}>=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
    /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${necshmpatchpoint}+5]}
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
    /call Cast "${patchheal}" gem2 1s CheckHP
    /varset stophealpoint ${defaultstophealpoint}
    /call CheckEvents
    /delay 15 ${Me.SpellReady[${patchheal}]}
    /return
      }
   } else /if ((${worsthp}<=${defaultpatchpoint})&&(${worsthp}>=1)) {
      /target id ${worsthurtid}
      /delay 5 ${Target.ID}==${worsthurtid}
      /if (!${Target.ID}) /return
      /if (${Target.ID}!=${worsthurtid}) /return
      /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
      /varset stophealpoint ${Math.Calc[${defaultpatchpoint}+5]}
      /call Cast "${patchheal}" gem2 1s CheckHP
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
      /delay 15 ${Me.SpellReady[${patchheal}]}
      /return
   }
   /varset stophealpoint ${defaultstophealpoint}
   /if ((${healpetmode}==2)&&(${Me.PctMana}>${manatohealpet})) /call HealPet
/return


Sub Divarbcast
   /varset divarboor 0
   /for gmember 0 to ${Group}
      /if (${Group.Member[${gmember}].Distance}>200) /varcalc divarboor ${divarboor}+1
   /next gmember
   /if (${Math.Calc[${Group}-${divarboor}]}>=2) {
      /if (${announce}==1) /tell ${tankname} Inc Divine Arbitration
      /call Cast "Divine Arbitration" alt 2s
      /if ((${healafterdivarb}==1)&&(${Me.PctMana}>40)) {
         /if (${announce}==1) /tell ${tankname} Inc Grp Heal, get close
         /call Cast "${groupheal}" gem4 2s
         /delay 15 ${Me.SpellReady[${groupheal}]}
      }
   }
/return





Sub CheckEvents
   /delay 1
   /doevents Exp
   /doevents Chat
   /doevents tell
   /doevents flush
/return


Sub MedTime
   :oomwait
   /call CheckEvents
   /If ((${FindItem["Rod of Mystical Transvergance"].InvSlot})&&(${Me.PctMana}<=70)&&(${Me.PctHPs}>=98)&&(${rodwait}==0)) {
      /call Cast "Rod of Mystical Transvergance" item
      /varset rodwait 1
      /timed 3000 /varset rodwait 0
   }
   /if ((${autosit}==1)&&(${Me.PctMana}<=98)&&(!${Me.Casting.ID})) {
      /if ((${Bool[${Me.Standing}]})&&(${NearestSpawn[NPC].Distance}>=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${distancetosit}]})&&(${Me.PctHPs}>90)) /sit
      /if ((${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})&&(${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]})) /stand
   }
   /if ((${Bool[${Me.Standing}]})&&(${autosit}==2)&&(${Me.PctMana}<=98)&&(${Me.PctHPs}>90)&&(!${Me.Casting.ID})) /sit
   /if ((${Bool[${Me.Sitting}]})&&(${autosit}>=1)&&(${Me.PctMana}>98)&&(!${Window[SpellBookWnd].Open})) /stand
   /if ((${Bool[${Me.Standing}]})&&(!${Me.Mount.ID})&&(${Me.SpellReady[${yaulpspell}]})&&(!${Me.Buff[${yaulpspell}].ID})) {
      /if ((!${Me.Buff[Vallon].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Strength of Tunare].ID})) /call Cast "${yaulpspell}"
   }
   /if (${buffbeg}==1) /call Buffbeg
   /if (${Me.PctHPs}<=${selfhealpoint}) /return
   /if (${Me.PctMana}<=8) /goto :oomwait
/return


Sub CheckHP
   /if (!${Window[CastingWindow].Open}) /return
   /if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})) {
      /if ((${announce}==1)&&(${duckspam}==1)) {

         /e Ducking heal on ${Target.Name}
         /varset duckspam 0
         /timed 60 /varset duckspam 1
      }
      /call Interrupt
      /return
   }
   /if ((${interrupt2healself}==1)&&(${Target.Name.NotEqual[${Me}]})&&(${Me.PctHPs}<${interrupt2healselfhp})) {
      /if ((${usedivarb}==1)&&(${Me.PctHPs}<=${divarbpoint})&&(${Me.AltAbilityReady[Divine Arbitration]})) {
         /call Interrupt
         /call Divarbcast
         /return
      }
      /if ((${announce}==1)&&(${duckselfspam}==1)) {

         /e Ducking heal on ${Target} so I can heal myself
         /varset duckselfspam 0
         /timed 60 /varset duckselfspam 1
      }
      /call Interrupt
      /return
   }
   /if (${onlyhealfd}==1) {
      /if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Monk]})) {
         /if (${Target.State.NotEqual[feign]}) {
            /if ((${announce}==1)&&(${duckfdspam}==1)) {

               /e Ducking heal on ${Target.Name} because he isn't staying FD
               /varset duckfdspam 0
               /timed 40 /varset duckfdspam 1
            }
            /call Interrupt
            /return
         }
      }
   }
   /if ((${usedivarb}==1)&&(${Target.PctHPs}<=${divarbpoint})&&(${Target.Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) {
      /for gmember 0 to ${Group}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /call Interrupt
            /call Divarbcast
            /return
         }
      /next gmember
   }
/return


Sub Buffbeg
   /if (${buffbeg}==0) /return
   /echo Begging for buffs now
   /if ((!${Me.Buff[Voice of Quellious].ID})&&(!${Me.Buff[Tranquility].ID})&&(!${Me.Buff[Koadic's Endless Intellect].ID})&&(!${Me.Buff[Clairvoyance].ID})&&(!${Me.Buff[Voice of Clairvoyance].ID})) {
      /if (${NearestSpawn[PC guild enchanter]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild enchanter].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild enchanter]} need C plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Enchanter available for C5
   }
   /if ((!${Me.Buff[Protection of the Nine].ID})&&(!${Me.Buff[Blessing of the Nine].ID})&&(!${Me.Buff[Steeloak Skin].ID})&&(!${Me.Buff[Blessing of Steeloak].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${NearestSpawn[PC guild druid]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild druid].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild druid]} need dru crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Druid available for DRU crack
   }
   /if ((!${Me.Buff[Spiritual Dominion].ID})&&(!${Me.Buff[Spiritual Ascendance].ID})) {
      /if (${NearestSpawn[PC guild beastlord]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild beastlord].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild beastlord]} need bst crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Beastlord available for BST crack
   }
   /if ((!${Me.Buff[Kazad`s Mark].ID})&&(!${Me.Buff[Symbol of Kazad].ID})&&(!${Me.Buff[Symbol of Balikor].ID})&&(!${Me.Buff[Balikor's Mark].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${NearestSpawn[PC guild cleric]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild cleric].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild cleric]} need sym plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Cleric available for Symbol
   }
   /if ((!${Me.Buff[Brell's Stalwart Shield].ID})&&(!${Me.Buff[Brell's Brawny Bulwark].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Spiritual Vitality].ID})) {
      /if (${NearestSpawn[PC guild paladin]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild paladin].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild paladin]} need BSS plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Paladin available for BSS
   }
   /if ((!${Me.Buff[Shield of Maelin].ID})&&(!${Me.Buff[Focus of the Seventh].ID})&&(!${Me.Buff[Focus of Soul].ID})&&(!${Me.Buff[Wunshi's Focusing].ID})&&(!${Me.Buff[Talisman of Wunshi].ID})) {
      /if (${NearestSpawn[PC guild shaman]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild shaman].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild shaman]} need focus plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Shaman available for Focus
   }
   /varset buffbeg 0
/return


Sub FindExactPC(string name)
   /declare nameid int local
   /declare counter int local 1
   :FindNext
   /if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return NOT_FOUND
   /varset nameid ${NearestSpawn[${counter}, pc ${name}].ID}
   /if (${nameid}.CleanName.Equal[${name}]}) {
      /target id ${nameid}
      /delay 1s ${Target.ID}==${nameid}
      /if (${Target.ID}==${nameid}) /return TARGET_SUCCESS
   }
   /varcalc counter ${counter}+1
   /if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext
/return NOT_FOUND


Sub Event_Chat(string ChatType,string Sender,string ChatText)
   /if ((!${ChatType.Equal[${mychannel}]})&&(!${ChatType.Equal[TELL]})) /return
   /if (!${Spawn[${Sender}].ID}) {
      /e ${Sender} is not in the zone
      /return
   }
   /if (${ChatText.Equal[Follow me]}) {
      /delay 5
      /if (!${Spawn[${Sender}].ID}) {
         /e ${Sender} is not in zone for me to follow!
         /return
      }
      /varset follname ${Sender}
      /varset following 1
      :targetfoll
      /target pc ${follname}
      /delay 1s ${Target.Name.Equal[${follname}]}
      /if (${Target.Name.Equal[${follname}]}) {
         /goto :Loop
      } else /goto :targetfoll
      :Loop
      /face fast
      /if (${Target.Distance}>10) /keypress forward hold
      /if (${Target.Distance}<9) /keypress back
      /if (!${Target.ID}) /varset following 0
      /call CheckEvents
      /if ((${Target.Name.Equal[${follname}]})&&(${following}>0)) {
         /goto :Loop
      } else {
         /keypress forward
         /keypress back
      }
   }
   /if (${ChatText.Equal[End follow]}) {
      /varset following 0
      /keypress forward
      /keypress back
      /timed 50 /face pc ${follname}
   }
   /if (${ChatText.Equal[Gbuff now!]}) {
      /varset pallycount 0
      /target myself
      /call Cast "${acbuff}" gem6 7s
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      /for gmember 1 to ${Group}
         /target id ${Group.Member[${gmember}].ID}
         /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${acbuff}" gem5 7s
            /if (${Target.Class.Name.Equal[Paladin]}) {
               /call Cast "${longhpbuff}" gem4 10s
               /varcalc pallycount ${pallycount}+1
            }
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
            }
         }
      /next gmember
      /if ((${Math.Calc[${Group}-${pallycount}]}>=2)&&(${groupsymbuff}.NotEqual[NULL]})) /call Cast "${groupsymbuff}" gem5 10s
      /if ((${Math.Calc[${Group}-${pallycount}]}<2)||(${groupsymbuff}.Equal[NULL]})) {
         /for gmember 0 to ${Group}
            /target id ${Group.Member[${gmember}].ID}
            /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${singlesymbuff}" gem5 7s
         /next gmember
      }
   }
   /if (${ChatText.Equal[BoR now!]}) {
      /target myself
      /delay 5 ${Target.Name.Equal[${Me}]}
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      /for gmember 1 to ${Group}
         /target id ${Group.Member[${gmember}].ID}
         /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
            }
         }
      /next gmember
   }
   /if (${ChatText.Equal[nuke]}) {
      /if (${Me.PctMana}<30) {
         /chat #${mychannel} Cleric Mana ${Me.PctMana}%, holding on nukes!
      } else {
         /assist ${Sender}
         /delay 5
         /if (${Target.Type.NotEqual[NPC]}) {
            /assist ${Sender}
            /delay 5 ${Target.Type.Equal[NPC]}
         }
         /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
            /if (${Me.SpellReady[${nukeone}]}) {
               /if (${announce}==1) /tell ${tankname} %T shal feel the wrath of Brell! (${nukeone})
               /call Cast "${nukeone}" spell 3s
            } else /if (${Me.SpellReady[${nuketwo}]}) {
               /if (${announce}==1) /tell ${tankname} %T shal feel the wrath of Brell! (${nuketwo})
               /call Cast "${nuketwo}" spell 3s
            } else /chat #${mychannel} nukes not ready
            /if (${Me.PctMana}<=60) /chat #${mychannel} FYI Cleric Mana ${Me.PctMana}%
         } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
      }
   }
   /if (${ChatText.Equal[stun]}) {
      /assist ${Sender}
      /delay 5
      /if (${Target.Type.NotEqual[NPC]}) {
         /assist ${Sender}
         /delay 5 ${Target.Type.Equal[NPC]}
      }
      /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
         /if (${Me.SpellReady[${stunone}]}) {
            /if (${announce}==1) /tell ${tankname} Casting ${stunone} on %T
            /call Cast "${stunone}" spell 3s
         } else /if (${Me.SpellReady[${stuntwo}]}) {
            /if (${announce}==1) /tell ${tankname} Casting ${stuntwo} on %T
            /call Cast "${stuntwo}" spell 3s
         } else /chat #${mychannel} stuns not ready
      } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
   }
   /if (${ChatText.Equal[buffme]}) {
      /call FindExactPC ${Sender}
      /if (${Macro.Return}.NotEqual[TARGET_SUCCESS]}) /return
      /if (${Target.Class.Name.Equal[Paladin]}) {
         /call Cast "${longhpbuff}" gem4 10s
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
         /return
      }
      /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      }
      /call Cast "${acbuff}" gem6 7s
      /call Cast "${singlesymbuff}" gem5 7s
   }
   /if ((${ChatText.Equal[patch me]})||(${ChatText.Equal[heal]})||(${ChatText.Equal[heal me]})||(${ChatText.Equal[heal plz]})||(${ChatText.Equal[heal me plz]})||(${ChatText.Equal[need heal]})) {
      /call FindExactPC ${Sender}
      /if (${Macro.Return}.NotEqual[TARGET_SUCCESS]}) /return
      /if (${Target.Distance}<=${patchhealrange}) {
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 2s
         /delay 15 ${Me.SpellReady[${patchheal}]}
      } else /tell ${tankname} ${Sender} your OOR
   }
   /if ((${ChatText.Equal[sym]})||(${ChatText.Equal[wog]})||(${ChatText.Equal[V]})||(${ChatText.Equal[bor]})||(${ChatText.Equal[rgc]})||(${ChatText.Equal[hot me]})||(${ChatText.Equal[ch me]})||(${ChatText.Equal[pb]})) {
      /if (${Spawn[pc ${Sender}].Distance}>250) /return
      /call FindExactPC ${Sender}
      /if (${Macro.Return}.NotEqual[TARGET_SUCCESS]}) /return
   }
   /if (${ChatText.Equal[sym]}) /call Cast "${singlesymbuff}" gem5 7s
   /if (${ChatText.Equal[wog]}) /call Cast "${acbuff}" gem6 7s
   /if (${ChatText.Equal[V]}) /call Cast "${longhpbuff}" gem4 10s
   /if (${ChatText.Equal[bor]}) {
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
   }
   /if (${ChatText.Equal[rgc]}) {
      /if (${FindItem[Blackflame Sphere].ID}) {
         /call Cast "Blackflame Sphere" item
      } else /if (${FindItem[Wand of Casual Blessings].ID}) {
         /call Cast "Wand of Casual Blessings" item
      } else /call Cast "${rgcspell}" gem8 5s
   }
   /if (${ChatText.Equal[buff pet]}) {
      /target ${Spawn[pc ${Sender}].Pet}
      /delay 8
      /target ${Spawn[pc ${Sender}].Pet}
      /call Cast "${acbuff}" gem6 7s
      /call Cast "${singlesymbuff}" gem5 7s
   }
   /if (${ChatText.Equal[da pet]}) {
      /target ${Spawn[pc ${Sender}].Pet}
      /delay 6
      /target ${Spawn[pc ${Sender}].Pet}
      /if (${Me.AltAbilityReady[39]}) /if (${Target.Name}.Equal[${Spawn[pc ${Sender}].Pet.Name}]}) {
         /call Cast "39" alt
      } else {
         /chat #${mychannel} Bestow Divine Aura is not ready, or Target (%T) OOR or wrong target
      }
   }
   /if (${ChatText.Equal[pb]}) /call Cast "Pure Blood" gem6 10s
   /if (${ChatText.Equal[hot me]}) {
      /if (${Target.Distance}<=${hotspellrange}) {
         /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
         /call Cast "${hotspell}" gem2 2s
         /delay 15 ${Me.SpellReady[${hotspell}]}
      } else /tell ${tankname} ${Sender} your OOR
   }
   /if (${ChatText.Equal[ch me]}) {
      /if (${Target.Distance}<=100) {
         /if (${announce}==1) /tell ${tankname} (Complete Heal) --- %T --- 10 secs
         /call Cast "Complete Healing" gem2 5s
         /tell ${tankname} ${Me.PctMana}m
         /delay 15 ${Me.SpellReady[${hotspell}]}
      } else /tell ${tankname} ${Sender} your OOR
   }
   /if (${ChatText.Equal[mana check]}) /chat #${mychannel} Cleric Mana ${Me.PctMana}%
   /if (${ChatText.Equal[slowcamp]}) {
      /if (${Me.Standing}) /sit
      /delay 5m ${Me.PctMana}>=98
      /camp
      /end
   }
/return

Sub Event_Exp
   /call ExpTrack
/return
 
Last edited:
Many Alatyami!!! going to put this in and try it tonight after work!

Donnavan



-----------
You know you EQ too much when you get mad that the guy in front of you in traffic and think "that's it!! I'm going to HT his ass!!! then get mad because you can't find your hot button on the dash board....then relize you can't find it because you loaded a new UI last week.....(true story).....
 
Oh yah ... something to note ...

On the PullLoot.ini since I used the idea behind yafm it autopopulates.

0 = Destroy
1 = Keep

And if you have a higher level cleric you might want to edit the spell listed in the declares.
 
new error since the last patch:

due to complete missuse of the string top-level object, it has been removed.

any idea whats going on? seems to still heal the group and the MT
 
yeah i got that with an older version of the AFKcleric macro but newer version works finee
 
For the no drop confirmation windows, if you haven't fixed it already, just put a /lootnodrop never somewhere in the beginning. As for the string errors, I and others answered that question 750 times on the mq boards, I'm not going to repeat myself here.
 
Cleaning it up right now ...

Thanks for the tip on the no drop ...
 
Updated the healer.mac ....

* Rixed the TLO spam errors.
* Removed trickyda, it didn't really work well, if any wants I can put it back in.
* Removed healpet also, I really use this thing in a group, so never got to test that function. If anyone wants it back I can put it back in, but only better.

Alatyami
 
Well i have tried a lot of cleric macros, so far this has been the most reliable. I do how ever have a few questions on how to fix a few problems i have ran into.

1. When the cleric is OOM it will spam in group the heal msg until has the mana to cast - is there a way to do a check for oom and if not have the mana will wait until the cleric has mana enough for the spell?

2. The buff part is a bit hard, I havent figured out how to add buff options to this macro, I can use tells to ask "buffme" and the cleric will determine if the asker needs spell haste as well as WoV and Symbol, but does not have the option to ask for conviction and virtue and temp or the option to ask in group wich does happen a lot when grouping with others. the autoenc.mac has a great buff part. It will target and cast the buffs by the name of the buffs asked for in group say, tells or even just /say. I will post that part as a example:

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

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

#turbo 40 

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

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


Sub Main 
/call GeneralDeclares 

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

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

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


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

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

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

/call SwapStatFood 1 

/squelch /alert clear 6 

/if ( ${autoAnnounce} ) /announce on 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/call CheckIniBuffs 

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

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

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

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

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

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

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

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

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

/varset n ${chatText.Count[ ]} 

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

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

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

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

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

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

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

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

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

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

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

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

Sub Event_Ranger 
/call IllusionRanger 
/return__________________


3. Last thing is i have looked over the healer part a few times looking for the slash commands, I am not sure how to toggle the nuke, stun and other options on or off. If anyone can help me figure some of this out would be great. This has been the best cleric macro i have found for reliability in keeping the heals inc for the tank and others in the group, with a few adds and tweaks this is going to be awsome ;)
 
Last edited:
mrtyler....2 words for you - "code tags"
 
How hard would it be to put in a camp on death event, and a Gm check event into the healer macro?

I think I know what to do, but need a few pointers.
 
How hard would it be to put in a camp on death event

With the other events:

Rich (BB code):
#event death "#*#You have entered #*#"
Then at the end:
Rich (BB code):
Sub event_death
/if ${Me.State.Equal[Stand]} /sit
/camp 
/endmac
/return
 
here is how I modified the healer.mac to add camp on death, and GM check to it. I'm not sure I put the /call GMcheck in the right spot, so take a look and let me know.

Rich (BB code):
|- healer.mac
|- Author: Alatyami, Redguides.com Moderator
|- Original Credits:
|------------------------------------------------------------------------------|
|- Modifications:
|- [07-14-2005] * Fixed the TLO errors
|- * Removed trickyda, it didn't really work to well anyways
|- Donnavan2005 - added camp on death and GM check 23July2005
|------------------------------------------------------------------------------|

#include spell_routines.inc
#include Exp_Tracking.inc
#event Exp "You gain#*#"
#event death "#*#You have entered #*#"
#Chat Chat
#Chat tell

Sub Main

|------------------READ THIS SECTION AND EDIT IF NEEDED------------------------|
|- The following declarations are used to determine spell names and spell
|- ranges for the spells you would like to use.

/declare mychannel string outer pullhealer
/declare autohealmode int outer 3
|-Edit this line to change your start message to the primary tank
/declare tankstartmsg string outer Healer alive and awake .. lets kill stuff
/declare healspell string outer Complete Healing
/declare healspellrange int outer 100
/declare patchheal string outer Ethereal Light
/declare patchhealrange int outer 200
/declare hotspell string outer Celestial Elixir
/declare hotspellrange int outer 100
/declare daspell string outer Divine Barrier
/declare yaulpspell string outer Yaulp V
/declare usegroupheal int outer 1
/declare groupheal string outer Word of Restoration
/declare grouphealrange int outer 70
/declare usedivarb int outer 1
/declare healafterdivarb int outer 0
/declare announce int outer 1
/declare autosit int outer 1
/declare distancetosit int outer 40
/declare autointerrupt int outer 1
/declare onlyhealfd int outer 1
/declare interrupt2healself int outer 1
/declare interrupt2healselfhp int outer 50
/declare noInvis int outer 1
/declare defaultstophealpoint int outer 80
/declare acbuff string outer Ward of Valiance
/declare longhpbuff string outer Conviction
/declare singlesymbuff string outer Symbol of Balikor
/declare groupsymbuff string outer NULL
/declare spellhastebuff string outer Blessing of Reverence
/declare rgcspell string outer Remove Greater Curse
/declare healpetmode int outer 2
/declare pethealpoint int outer 65
/declare manatohealpet int outer 25
/declare pethealspell string outer Complete Healing
/declare pethealspellrange int outer 100
/declare nukeone string outer Judgement
/declare nuketwo string outer Order
/declare stunone string outer Sound of Divinity
/declare stuntwo string outer Shock of Wonder
/declare rootspellname string outer Greater Immobilize
/declare rootspelltime int outer 2


|------------------------------------------------------------------------------|
/declare selfhealpoint int outer 70
/declare dacastpoint int outer 29
/declare divarbpoint int outer 25
/declare interrupt2divarb int outer 12
|- Heal at % for WAR/PAL/SK
/declare tankhealpoint int outer 65
|- Heal at % for WIZ/MAG/ENC/DRU
/declare casterhotpoint int outer 85
/declare casterpatchpoint int outer 60
|- Heal at % for NEC/SHM
/declare necshmpatchpoint int outer 60
|- Heal at % for all other classes
/declare defaultpatchpoint int outer 70

|------------------------END EDITING------------------------|

/declare healpct int outer 60
/declare tankname string outer ${Target}
/declare tanknameid int outer
/declare tankclass string outer
/declare minorhurt int outer 0
/declare majorhurt int outer 0
/declare worsthurt string outer NULL
/declare worsthurtid int outer
/declare worsthp int outer 100
/declare worstclass string outer NULL
/declare gmember int outer
/declare nohotforua string outer NULL
/declare nohotforub string outer NULL
/declare nohotforuc string outer NULL
/declare nohotforud string outer NULL
/declare rodwait int outer 0
/declare following int outer 0
/declare follname string outer NULL
/declare pallycount int outer 0
/declare stophealpoint int outer ${defaultstophealpoint}
/declare buffbeg int outer 0
/declare oomspam int outer 1
/declare lomspam int outer 1
/declare duckspam int outer 1
/declare duckfdspam int outer 1
/declare duckselfspam int outer 1
/declare nomtspam int outer 1
/declare ghealhurtcount int outer 0
/declare divarboor int outer 0
/declare aetime int outer 0

|-- Uncomment the following line if you want to use a chat channel
|-- /join ${mychannel}


/if (!${Target.ID}) {
/echo Target the Tank when you run this macro to designate him as MT
/end
} else {
/varset tanknameid ${Target.ID}
/varset tankclass ${Target.Class.Name}
}

/if (${Defined[Param0]}) {
/varset healpct ${Param0}
} else /echo No Heal% specified, defaulting to 60%

/if (!${Defined[Param1]}) {
/echo Usage: /mac AFCleric % healspell
/echo Example: /mac AFCleric 40 Complete Heal
/echo Defaulting to ${healspell} at ${healpct}%
} else {
/if (!${Defined[Param2]}) {
/varset healspell ${Param1}
} else /if (!${Defined[Param3]}) {
/varset healspell ${Param1} ${Param2}
} else /if (!${Defined[Param4]}) {
/varset healspell ${Param1} ${Param2} ${Param3}
} else {
/varset healspell ${Param1} ${Param2} ${Param3} ${Param4}
}
}

/call ExpPrep |- Start the xp tracker,

/echo AutoHealer Active, running in Autohealmode ${autohealmode}
/echo Casting ${healspell} on ${tankname} at ${healpct}% HP
/tell ${tankname} You are me primary heal.
/if (${autohealmode}==0) /echo ONLY ${tankname} will be healed
/if (${autohealmode}==1) /echo ONLY ${tankname} and myself will be healed
/if (${autohealmode}==2) /echo ${tankname}, myself and my group will be healed
/if (${autohealmode}==3) /echo ${tankname} and myself will be healed before the rest of the group

:tankwatchloop
/call GMCheck
/if (${Spawn[${tanknameid}].Name.NotEqual[${tankname}]}) /varset tanknameid 0
/if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) {
/if (${SpawnCount[${tankname} ${tankclass}]}==1) {
/varset tanknameid ${Spawn[${tankname} ${tankclass}].ID}
/echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid}
}
/if (${SpawnCount[${tankname} ${tankclass}]}>1) {
/if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
/beep
/varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID}
/echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro
} else {
/beep
/echo Need to restart macro to correctly identify the MT
}
}
}
/if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) {
/if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
/varset tanknameid ${Spawn[pc ${tankname ${tankclass}}].ID}
/echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro
}
}
/if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) {
/if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) {
/target id ${tanknameid}
/delay 6 ${Target.ID}==${tanknameid}
}
}
/if (!${Spawn[${tanknameid}].ID}) {
/if (${nomtspam}==1) {
/e Warning No Designated MT is available
/timed 300 /varset nomtspam 1
/varset nomtspam 0
}
}
/if ((${Me.PctMana}<=50)&&(${announce}==1)&&(${lomspam}==1)) {
/tell ${tankname} ${Me.PctMana}m
/varset lomspam 0
/timed 300 /varset lomspam 1
}
/if ((${Me.PctMana}<=7)&&(${announce}==1)&&(${oomspam}==1)) {
/tell ${tankname} oom
/varset oomspam 0
/timed 300 /varset oomspam 1
/call MedTime
}
/if (${GameState.Equal[CHARSELECT]}) /end
/if (${Target.ID}==${tanknameid}) {
/varset stophealpoint ${Math.Calc[${healpct}*1.1]}
/if ((${Target.Distance}<=${patchhealrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/call Cast "${patchheal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patchheal}]}
}
/if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) {
/if (${announce}==1) /tell ${tankname} (${healspell}) --- %T ---
/call Cast "${healspell}" gem1 1s CheckHP
/delay 15 ${Me.SpellReady[${healspell}]}
/if (${announce}==1) /tell ${tankname} ${Me.PctMana}
}
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents
}
/if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
/if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand
}
/if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
/if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand
}
/if (${autohealmode}==0) {
/call CheckEvents
/goto :tankwatchloop
}
/if ((${autohealmode}>=1)&&(${Me.PctHPs}<=${selfhealpoint})) /call Healself
/if (${autohealmode}>=2) {
/if ((${Target.PctHPs}>${healpct})||(${Target.Distance}>${healspellrange})||(${Target.PctHPs}<=1)||(!${Target.ID})||(${Target.ID}!=${tanknameid} )) {
/call Healgroup
}
}
/if ((${autohealmode}<2)&&(${Me.PctHPs}>${selfhealpoint})&&(${Me.PctMana}<=98)) /call MedTime
/call CheckEvents
/goto :tankwatchloop
/return


Sub Healself
/if (${Me.PctHPs}>${selfhealpoint}) /return
/varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
/if ((!${Target.ID})||(${Target.PctHPs}>=${Math.Calc[1.1*${healpct}]})||(${Target.PctHPs}<=1)||(${Target.ID}!=${tanknameid})) {
/if ((${Me.PctHPs}<=${selfhealpoint})&&(${Me.PctHPs}>${dacastpoint})) {
/target myself
/delay 6 ${Target.Name.Equal[${Me}]}
/if (${Target.Name.Equal[${Me}]}) {
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/call Cast "${patchheal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patchheal}]}
}
}
}
/if (${Me.PctHPs}<=${Math.Calc[${selfhealpoint}*0.7]}) {
/target myself
/delay 6 ${Target.Name.Equal[${Me}]}
/if (${Target.Name.Equal[${Me}]}) {
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
/call Cast "${patchheal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patchheal}]}
}
}
/varset stophealpoint ${defaultstophealpoint}
/return


Sub Healgroup
:healgroup
/varset worsthurt NULL
/varset worsthp 100
/varset worstclass NULL
/varset minorhurt 0
/varset majorhurt 0
/varset ghealhurtcount 0
/for gmember 0 to ${Group}
/if (${onlyhealfd}==0) {
/if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
/if (${Group.Member[${gmember}].PctHPs}<=${worsthp}) {
/varset worsthurt ${Group.Member[${gmember}].Name}
/varset worsthurtid ${Group.Member[${gmember}].ID}
/varset worsthp ${Group.Member[${gmember}].PctHPs}
/varset worstclass ${Group.Member[${gmember}].Class.Name}
}
}
}
/if (${onlyhealfd}==1) {
/if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
/if ((${Group.Member[${gmember}].Class.Name.NotEqual[Monk]})&&(${Group.Member[${gmember}].Class.Name.NotEqual[Necromancer]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
/varset worsthurt ${Group.Member[${gmember}].Name}
/varset worsthurtid ${Group.Member[${gmember}].ID}
/varset worsthp ${Group.Member[${gmember}].PctHPs}
/varset worstclass ${Group.Member[${gmember}].Class.Name}
}
/if ((${Group.Member[${gmember}].Class.Name.Equal[Monk]})||(${Group.Member[${gmember}].Class.Name.Equal[Necromancer]})) {
/if ((${Group.Member[${gmember}].State.Equal[feign]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
/varset worsthurt ${Group.Member[${gmember}].Name}
/varset worsthurtid ${Group.Member[${gmember}].ID}
/varset worsthp ${Group.Member[${gmember}].PctHPs}
/varset worstclass ${Group.Member[${gmember}].Class.Name}
}
}
}
}
/if ((${Group.Member[${gmember}].Distance}<=${grouphealrange})&&(${Group.Member[${gmember}].PctHPs}<=85)) /varcalc ghealhurtcount ${ghealhurtcount}+1
/if ((${Group.Member[${gmember}].PctHPs}<=85)&&(${Group.Member[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1
/if ((${Group.Member[${gmember}].PctHPs}<=60)&&(${Group.Member[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1
/next gmember
/if (${autohealmode}==3) {
/if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) /if (${Spawn[${tanknameid}].ID}) {
/target id ${tanknameid}
/delay 6 ${Target.ID}==${tanknameid}
/delay 1
/if ((${Target.ID}==${tanknameid})&&(${Target.PctHPs}<=${healpct})&&(${Target.Distance}<=${healspellrange})) /return
}
/if (${Me.PctHPs}<=${selfhealpoint}) /return
}
/if ((${majorhurt}==0)&&(${minorhurt}==0)) {
/if (${Spawn[${tanknameid}].ID}) {
/target id ${tanknameid}
/delay 6 ${Target.ID}==${tanknameid}
/delay 1
}
/if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) {
/if (${Me.PctMana}<=98) /call MedTime
}
/call CheckEvents
/return
}
/if ((${usedivarb}==1)&&(${worsthp}<=${divarbpoint})&&(${Me.AltAbilityReady[divine arbitration]})) /call Divarbcast
/if ((${Math.Calc[${majorhurt}+${minorhurt}]}>=3)&&(${usegroupheal}==1)) {
/if (${announce}==1) /tell ${tankname} Inc Grp Heal, get close
/call Cast "${groupheal}" gem4 1s
/delay 15 ${Me.SpellReady[${groupheal}]}
/call CheckEvents
/return
}
/if (${worsthurtid}==${tanknameid}) /return
/if (${worsthurtid}==${Me.ID}) {
/call Healself
/call CheckEvents
/return
}



/if ((${worstclass}.Equal[Warrior]})||(${worstclass}.Equal[Paladin]})||(${worstclass}.Equal[Shadow Knight]})) {
/if ((${worsthp}<=${tankhealpoint})&&(${worsthp}>=${Math.Calc[0.7*${tankhealpoint}]})&&(${majorhurt}<=1)&&(${minorhurt}<=1)) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
/if (${announce}==1) /tell ${tankname} ((${healspell}) --- %T ---
/if (${announce}==1) /tell ${tankname} ${Me.PctMana}
/call Cast "${healspell}" gem1 1s CheckHP
/delay 15 ${Me.SpellReady[${healspell}]}
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents
/return
}
/if (${worsthp}<=${tankhealpoint}) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/call Cast "${patchheal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patchheal}]}
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents
/return
}
} else /if ((${worstclass}.Equal[Magician]})||([${worstclass}.Equal[Wizard]})||(${worstclass}.Equal[Enchanter]})||(${worstclass}.Equal[Druid]})) {
/if ((${worsthp}<=${casterhotpoint})&&(${worsthp}>${casterpatchpoint})) {
/if ((${worsthurt}.Equal[${nohotforua}]})||(${worsthurt}.Equal[${nohotforub}]})||(${worsthurt}.Equal[${nohotforuc}]})||(${worsthurt}.Equal[${nohotforud}]})) /return
/if (${nohotforua}.Equal[NULL]}) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/varset nohotforua ${Target.Name}
/if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
/varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
/call Cast "${hotspell}" gem3 1s CheckHP
/timed 200 /varset nohotforua NULL
/delay 15 ${Me.SpellReady[${hotspell}]}
} else /if (${nohotforub}.Equal[NULL]}) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/varset nohotforub ${Target.Name}
/if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
/varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
/call Cast "${hotspell}" gem3 1s CheckHP
/timed 200 /varset nohotforub NULL
/delay 15 ${Me.SpellReady[${hotspell}]}
} else /if (${nohotforuc}.Equal[NULL]}) {
/target id${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/varset nohotforuc ${Target.Name}
/if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
/varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
/call Cast "${hotspell}" gem3 1s CheckHP
/timed 200 /varset nohotforuc NULL
/delay 15 ${Me.SpellReady[${hotspell}]}
} else /if (${nohotforud}.Equal[NULL]}) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/varset nohotforud ${Target.Name}
/if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
/varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
/call Cast "${hotspell}" gem3 1s CheckHP
/timed 200 /varset nohotforud NULL
/delay 15 ${Me.SpellReady[${hotspell}]}
}
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents
/return
}
/if ((${worsthp}<=${casterpatchpoint})&&(${worsthp}>=1)) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/call Cast "${patchheal}" gem2 1s CheckHP
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents
/delay 15 ${Me.SpellReady[${patchheal}]}
/return
}
/varset stophealpoint ${defaultstophealpoint}
} else /if ((${worstclass}.Equal[Necromancer]})||(${worstclass}.Equal[Shaman]})) {
/if ((${worsthp}<=${necshmpatchpoint})&&(${worsthp}>=1)) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/varset stophealpoint ${Math.Calc[${necshmpatchpoint}+5]}
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/call Cast "${patchheal}" gem2 1s CheckHP
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents
/delay 15 ${Me.SpellReady[${patchheal}]}
/return
}
} else /if ((${worsthp}<=${defaultpatchpoint})&&(${worsthp}>=1)) {
/target id ${worsthurtid}
/delay 5 ${Target.ID}==${worsthurtid}
/if (!${Target.ID}) /return
/if (${Target.ID}!=${worsthurtid}) /return
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/varset stophealpoint ${Math.Calc[${defaultpatchpoint}+5]}
/call Cast "${patchheal}" gem2 1s CheckHP
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents
/delay 15 ${Me.SpellReady[${patchheal}]}
/return
}
/varset stophealpoint ${defaultstophealpoint}
/if ((${healpetmode}==2)&&(${Me.PctMana}>${manatohealpet})) /call HealPet
/return


Sub Divarbcast
/varset divarboor 0
/for gmember 0 to ${Group}
/if (${Group.Member[${gmember}].Distance}>200) /varcalc divarboor ${divarboor}+1
/next gmember
/if (${Math.Calc[${Group}-${divarboor}]}>=2) {
/if (${announce}==1) /tell ${tankname} Inc Divine Arbitration
/call Cast "Divine Arbitration" alt 2s
/if ((${healafterdivarb}==1)&&(${Me.PctMana}>40)) {
/if (${announce}==1) /tell ${tankname} Inc Grp Heal, get close
/call Cast "${groupheal}" gem4 2s
/delay 15 ${Me.SpellReady[${groupheal}]}
}
}
/return





Sub CheckEvents
/delay 1
/doevents Exp
/doevents Chat
/doevents tell
/doevents flush
/return


Sub MedTime
omwait
/call CheckEvents
/If ((${FindItem["Rod of Mystical Transvergance"].InvSlot})&&(${Me.PctMana}<=70)&&(${Me.PctHPs}>=98)&&(${rodwait}==0)) {
/call Cast "Rod of Mystical Transvergance" item
/varset rodwait 1
/timed 3000 /varset rodwait 0
}
/if ((${autosit}==1)&&(${Me.PctMana}<=98)&&(!${Me.Casting.ID})) {
/if ((${Bool[${Me.Standing}]})&&(${NearestSpawn[NPC].Distance}>=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${distancetosit}]})&&(${Me.PctHPs}>90)) /sit
/if ((${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})&&(${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]})) /stand
}
/if ((${Bool[${Me.Standing}]})&&(${autosit}==2)&&(${Me.PctMana}<=98)&&(${Me.PctHPs}>90)&&(!${Me.Casting.ID})) /sit
/if ((${Bool[${Me.Sitting}]})&&(${autosit}>=1)&&(${Me.PctMana}>98)&&(!${Window[SpellBookWnd].Open})) /stand
/if ((${Bool[${Me.Standing}]})&&(!${Me.Mount.ID})&&(${Me.SpellReady[${yaulpspell}]})&&(!${Me.Buff[${yaulpspell}].ID})) {
/if ((!${Me.Buff[Vallon].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Strength of Tunare].ID})) /call Cast "${yaulpspell}"
}
/if (${buffbeg}==1) /call Buffbeg
/if (${Me.PctHPs}<=${selfhealpoint}) /return
/if (${Me.PctMana}<=8) /goto omwait
/return


Sub CheckHP
/if (!${Window[CastingWindow].Open}) /return
/if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})) {
/if ((${announce}==1)&&(${duckspam}==1)) {

/e Ducking heal on ${Target.Name}
/varset duckspam 0
/timed 60 /varset duckspam 1
}
/call Interrupt
/return
}
/if ((${interrupt2healself}==1)&&(${Target.Name.NotEqual[${Me}]})&&(${Me.PctHPs}<${interrupt2healselfhp})) {
/if ((${usedivarb}==1)&&(${Me.PctHPs}<=${divarbpoint})&&(${Me.AltAbilityReady[Divine Arbitration]})) {
/call Interrupt
/call Divarbcast
/return
}
/if ((${announce}==1)&&(${duckselfspam}==1)) {

/e Ducking heal on ${Target} so I can heal myself
/varset duckselfspam 0
/timed 60 /varset duckselfspam 1
}
/call Interrupt
/return
}
/if (${onlyhealfd}==1) {
/if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Monk]})) {
/if (${Target.State.NotEqual[feign]}) {
/if ((${announce}==1)&&(${duckfdspam}==1)) {

/e Ducking heal on ${Target.Name} because he isn't staying FD
/varset duckfdspam 0
/timed 40 /varset duckfdspam 1
}
/call Interrupt
/return
}
}
}
/if ((${usedivarb}==1)&&(${Target.PctHPs}<=${divarbpoint})&&(${Target.Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) {
/for gmember 0 to ${Group}
/if (${Target.ID}==${Group.Member[${gmember}].ID}) {
/call Interrupt
/call Divarbcast
/return
}
/next gmember
}
/return


Sub Buffbeg
/if (${buffbeg}==0) /return
/echo Begging for buffs now
/if ((!${Me.Buff[Voice of Quellious].ID})&&(!${Me.Buff[Tranquility].ID})&&(!${Me.Buff[Koadic's Endless Intellect].ID})&&(!${Me.Buff[Clairvoyance].ID})&&(!${Me.Buff[Voice of Clairvoyance].ID})) {
/if (${NearestSpawn[PC guild enchanter]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild enchanter].Distance}<=100) {
/tell ${tankname} ${NearestSpawn[PC guild enchanter]} need C plz
/delay 20
/if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
} else /e No guild Enchanter available for C5
}
/if ((!${Me.Buff[Protection of the Nine].ID})&&(!${Me.Buff[Blessing of the Nine].ID})&&(!${Me.Buff[Steeloak Skin].ID})&&(!${Me.Buff[Blessing of Steeloak].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
/if (${NearestSpawn[PC guild druid]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild druid].Distance}<=100) {
/tell ${tankname} ${NearestSpawn[PC guild druid]} need dru crack plz
/delay 20
/if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
} else /e No guild Druid available for DRU crack
}
/if ((!${Me.Buff[Spiritual Dominion].ID})&&(!${Me.Buff[Spiritual Ascendance].ID})) {
/if (${NearestSpawn[PC guild beastlord]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild beastlord].Distance}<=100) {
/tell ${tankname} ${NearestSpawn[PC guild beastlord]} need bst crack plz
/delay 20
/if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
} else /e No guild Beastlord available for BST crack
}
/if ((!${Me.Buff[Kazad`s Mark].ID})&&(!${Me.Buff[Symbol of Kazad].ID})&&(!${Me.Buff[Symbol of Balikor].ID})&&(!${Me.Buff[Balikor's Mark].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
/if (${NearestSpawn[PC guild cleric]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild cleric].Distance}<=100) {
/tell ${tankname} ${NearestSpawn[PC guild cleric]} need sym plz
/delay 20
/if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
} else /e No guild Cleric available for Symbol
}
/if ((!${Me.Buff[Brell's Stalwart Shield].ID})&&(!${Me.Buff[Brell's Brawny Bulwark].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Spiritual Vitality].ID})) {
/if (${NearestSpawn[PC guild paladin]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild paladin].Distance}<=100) {
/tell ${tankname} ${NearestSpawn[PC guild paladin]} need BSS plz
/delay 20
/if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
} else /e No guild Paladin available for BSS
}
/if ((!${Me.Buff[Shield of Maelin].ID})&&(!${Me.Buff[Focus of the Seventh].ID})&&(!${Me.Buff[Focus of Soul].ID})&&(!${Me.Buff[Wunshi's Focusing].ID})&&(!${Me.Buff[Talisman of Wunshi].ID})) {
/if (${NearestSpawn[PC guild shaman]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild shaman].Distance}<=100) {
/tell ${tankname} ${NearestSpawn[PC guild shaman]} need focus plz
/delay 20
/if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
} else /e No guild Shaman available for Focus
}
/varset buffbeg 0
/return


Sub FindExactPC(string name)
/declare nameid int local
/declare counter int local 1
:FindNext
/if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return NOT_FOUND
/varset nameid ${NearestSpawn[${counter}, pc ${name}].ID}
/if (${nameid}.CleanName.Equal[${name}]}) {
/target id ${nameid}
/delay 1s ${Target.ID}==${nameid}
/if (${Target.ID}==${nameid}) /return TARGET_SUCCESS
}
/varcalc counter ${counter}+1
/if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext
/return NOT_FOUND


Sub Event_Chat(string ChatType,string Sender,string ChatText)
/if ((!${ChatType.Equal[${mychannel}]})&&(!${ChatType.Equal[TELL]})) /return
/if (!${Spawn[${Sender}].ID}) {
/e ${Sender} is not in the zone
/return
}
/if (${ChatText.Equal[Follow me]}) {
/delay 5
/if (!${Spawn[${Sender}].ID}) {
/e ${Sender} is not in zone for me to follow!
/return
}
/varset follname ${Sender}
/varset following 1
:targetfoll
/target pc ${follname}
/delay 1s ${Target.Name.Equal[${follname}]}
/if (${Target.Name.Equal[${follname}]}) {
/goto :Loop
} else /goto :targetfoll
:Loop
/face fast
/if (${Target.Distance}>10) /keypress forward hold
/if (${Target.Distance}<9) /keypress back
/if (!${Target.ID}) /varset following 0
/call CheckEvents
/if ((${Target.Name.Equal[${follname}]})&&(${following}>0)) {
/goto :Loop
} else {
/keypress forward
/keypress back
}
}
/if (${ChatText.Equal[End follow]}) {
/varset following 0
/keypress forward
/keypress back
/timed 50 /face pc ${follname}
}
/if (${ChatText.Equal[Gbuff now!]}) {
/varset pallycount 0
/target myself
/call Cast "${acbuff}" gem6 7s
/if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
/if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
/for gmember 1 to ${Group}
/target id ${Group.Member[${gmember}].ID}
/delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
/if (${Target.ID}==${Group.Member[${gmember}].ID}) {
/if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${acbuff}" gem5 7s
/if (${Target.Class.Name.Equal[Paladin]}) {
/call Cast "${longhpbuff}" gem4 10s
/varcalc pallycount ${pallycount}+1
}
/if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
/if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
/if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
}
}
/next gmember
/if ((${Math.Calc[${Group}-${pallycount}]}>=2)&&(${groupsymbuff}.NotEqual[NULL]})) /call Cast "${groupsymbuff}" gem5 10s
/if ((${Math.Calc[${Group}-${pallycount}]}<2)||(${groupsymbuff}.Equal[NULL]})) {
/for gmember 0 to ${Group}
/target id ${Group.Member[${gmember}].ID}
/delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
/if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${singlesymbuff}" gem5 7s
/next gmember
}
}
/if (${ChatText.Equal[BoR now!]}) {
/target myself
/delay 5 ${Target.Name.Equal[${Me}]}
/if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
/if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
/for gmember 1 to ${Group}
/target id ${Group.Member[${gmember}].ID}
/delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
/if (${Target.ID}==${Group.Member[${gmember}].ID}) {
/if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
/if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
/if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
}
}
/next gmember
}
/if (${ChatText.Equal[nuke]}) {
/if (${Me.PctMana}<30) {
/chat #${mychannel} Cleric Mana ${Me.PctMana}%, holding on nukes!
} else {
/assist ${Sender}
/delay 5
/if (${Target.Type.NotEqual[NPC]}) {
/assist ${Sender}
/delay 5 ${Target.Type.Equal[NPC]}
}
/if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
/if (${Me.SpellReady[${nukeone}]}) {
/if (${announce}==1) /tell ${tankname} %T shal feel the wrath of Brell! (${nukeone})
/call Cast "${nukeone}" spell 3s
} else /if (${Me.SpellReady[${nuketwo}]}) {
/if (${announce}==1) /tell ${tankname} %T shal feel the wrath of Brell! (${nuketwo})
/call Cast "${nuketwo}" spell 3s
} else /chat #${mychannel} nukes not ready
/if (${Me.PctMana}<=60) /chat #${mychannel} FYI Cleric Mana ${Me.PctMana}%
} else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
}
}
/if (${ChatText.Equal[stun]}) {
/assist ${Sender}
/delay 5
/if (${Target.Type.NotEqual[NPC]}) {
/assist ${Sender}
/delay 5 ${Target.Type.Equal[NPC]}
}
/if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
/if (${Me.SpellReady[${stunone}]}) {
/if (${announce}==1) /tell ${tankname} Casting ${stunone} on %T
/call Cast "${stunone}" spell 3s
} else /if (${Me.SpellReady[${stuntwo}]}) {
/if (${announce}==1) /tell ${tankname} Casting ${stuntwo} on %T
/call Cast "${stuntwo}" spell 3s
} else /chat #${mychannel} stuns not ready
} else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
}
/if (${ChatText.Equal[buffme]}) {
/call FindExactPC ${Sender}
/if (${Macro.Return}.NotEqual[TARGET_SUCCESS]}) /return
/if (${Target.Class.Name.Equal[Paladin]}) {
/call Cast "${longhpbuff}" gem4 10s
/if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
/if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
/return
}
/if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
/if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
/if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
}
/call Cast "${acbuff}" gem6 7s
/call Cast "${singlesymbuff}" gem5 7s
}
/if ((${ChatText.Equal[patch me]})||(${ChatText.Equal[heal]})||(${ChatText.Equal[heal me]})||(${ChatText.Equal[heal plz]})||(${ChatText.Equal[heal me plz]})||(${ChatText.Equal[need heal]})) {
/call FindExactPC ${Sender}
/if (${Macro.Return}.NotEqual[TARGET_SUCCESS]}) /return
/if (${Target.Distance}<=${patchhealrange}) {
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/call Cast "${patchheal}" gem2 2s
/delay 15 ${Me.SpellReady[${patchheal}]}
} else /tell ${tankname} ${Sender} your OOR
}
/if ((${ChatText.Equal[sym]})||(${ChatText.Equal[wog]})||(${ChatText.Equal[V]})||(${ChatText.Equal[bor]})||(${ChatText.Equal[rgc]})||(${ChatText.Equal[hot me]})||(${ChatText.Equal[ch me]})||(${ChatText.Equal[pb]})) {
/if (${Spawn[pc ${Sender}].Distance}>250) /return
/call FindExactPC ${Sender}
/if (${Macro.Return}.NotEqual[TARGET_SUCCESS]}) /return
}
/if (${ChatText.Equal[sym]}) /call Cast "${singlesymbuff}" gem5 7s
/if (${ChatText.Equal[wog]}) /call Cast "${acbuff}" gem6 7s
/if (${ChatText.Equal[V]}) /call Cast "${longhpbuff}" gem4 10s
/if (${ChatText.Equal[bor]}) {
/if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
/if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
}
/if (${ChatText.Equal[rgc]}) {
/if (${FindItem[Blackflame Sphere].ID}) {
/call Cast "Blackflame Sphere" item
} else /if (${FindItem[Wand of Casual Blessings].ID}) {
/call Cast "Wand of Casual Blessings" item
} else /call Cast "${rgcspell}" gem8 5s
}
/if (${ChatText.Equal[buff pet]}) {
/target ${Spawn[pc ${Sender}].Pet}
/delay 8
/target ${Spawn[pc ${Sender}].Pet}
/call Cast "${acbuff}" gem6 7s
/call Cast "${singlesymbuff}" gem5 7s
}
/if (${ChatText.Equal[da pet]}) {
/target ${Spawn[pc ${Sender}].Pet}
/delay 6
/target ${Spawn[pc ${Sender}].Pet}
/if (${Me.AltAbilityReady[39]}) /if (${Target.Name}.Equal[${Spawn[pc ${Sender}].Pet.Name}]}) {
/call Cast "39" alt
} else {
/chat #${mychannel} Bestow Divine Aura is not ready, or Target (%T) OOR or wrong target
}
}
/if (${ChatText.Equal[pb]}) /call Cast "Pure Blood" gem6 10s
/if (${ChatText.Equal[hot me]}) {
/if (${Target.Distance}<=${hotspellrange}) {
/if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
/call Cast "${hotspell}" gem2 2s
/delay 15 ${Me.SpellReady[${hotspell}]}
} else /tell ${tankname} ${Sender} your OOR
}
/if (${ChatText.Equal[ch me]}) {
/if (${Target.Distance}<=100) {
/if (${announce}==1) /tell ${tankname} (Complete Heal) --- %T --- 10 secs
/call Cast "Complete Healing" gem2 5s
/tell ${tankname} ${Me.PctMana}m
/delay 15 ${Me.SpellReady[${hotspell}]}
} else /tell ${tankname} ${Sender} your OOR
}
/if (${ChatText.Equal[mana check]}) /chat #${mychannel} Cleric Mana ${Me.PctMana}%
/if (${ChatText.Equal[slowcamp]}) {
/if (${Me.Standing}) /sit
/delay 5m ${Me.PctMana}>=98
/camp
/end
}
/return

Sub event_death
/if ${Me.State.Equal[Stand]} /sit
/camp 
/endmac
/return

Sub Event_Exp
/call ExpTrack
/return

Sub GMCheck
/if (${Spawn[gm].ID}) {
/beep
/beep
/beep
/echo GM has entered the zone!
/echo MASS HYSTERIA!!! DOGS AND CATS LIVING TOGETHER!!!! ending the macro...
/g Hey guys, I need to run, have an emergency to deal with!! Thanks for the fun!!
/delay 2s
/quit
/endmacro
}
/return

anyfeed back I can get would be greatly appreciated

EDIT: did the modifications that were suggested by Alatyami
 
Last edited:
Looks good ... go ahead and add a modification note at the top so you'll get credit for the edits!

I am currently working on beefing up the buffing line and group buff checks.

Just curious though ... in the GM Check whats up with the move forward then back? Might want to add in a /g saying Sorry guys I gotta go, i got an emergency to deal with. That way if you have you own afk group going and a GM echo's you commands it will go on record that there was an emergency and thats why your group jetted out so fast when the GM entered the zone.
 
Any chance someone could maybe give me a Sk Mac or change this war to sk?? also anyone have this clr updated for 70clr??
 
Thanks Cade ... I learn when I watch ya do that.......

question though ... ignorant .... in the #event death you do not have an _ but in the sub you do .... does that matter
 
OK love this set of macros!

But am having trouble with the healer getting tells for buffs (Unparsable in Calculation: 'C') lots of stuff after that too. Healer can't find the sender of tell to target and buff.

Also when puller tries to loot he opens corpse and just sits there, never loots. (no errors just doesn't loot)

I am using the healer with Donnavan's mod found right above for referance but this happens with the original post as well.

Any help is appreciated, would be happy to include the erros from healer if someone can tell me how to get them into a file so i can paste them here.
 
Last edited:
Re: Puller not looting

Seems to be a /Call HandleItem in the loot subroutine that is not found in any of the files for this...Is there another file I should have or a plugin maybe that is not mentioned or that i am missing?

Thanks in advance for the help!
 
Honestly I'm not sure on your looting question. I just have my tank loot. as for buffs, I have not used that part either. I just use buff timers. First time my healer heals my Sk he runs through a 'buff routine' then times it down till he needs to recast conviction/devotion/what not.... and since I only duo with macros and not use them in groups I have never run into the problem of anyone begging for buffs.

I wish I could be of more help. If you want to know where/how to do some timers let me know and I'll toss up some of the examples that I use.


Liezard: it's not hard to change thes macro's for and sk/clr combo, I did it just playing around (yea it's gimp comparred to most macros but it works for me) also changing the cleric spell set up is pretty easy to do as well. You just have to play with it a little bit. If you want some examples let me know and I'll send you a few.

Donnavan
 
I'm interested in changing the regular heal to use cleric clicky leg heal, but I'm not sure exactly where and what to change. I want it to just replace the normal healspell.

Would you change something in this area?

Rich (BB code):
}
/if (${GameState.Equal[CHARSELECT]}) /end
/if (${Target.ID}==${tanknameid}) {
/varset stophealpoint ${Math.Calc[${healpct}*1.1]}
/if ((${Target.Distance}<=${patchhealrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
/if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
/call Cast "${patchheal}" gem2 1s CheckHP
/delay 15 ${Me.SpellReady[${patchheal}]}
}
/if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) {
/if (${announce}==1) /tell ${tankname} (${healspell}) --- %T ---
/call Cast "${healspell}" gem1 1s CheckHP
/delay 15 ${Me.SpellReady[${healspell}]}
/if (${announce}==1) /tell ${tankname} ${Me.PctMana}
}
/varset stophealpoint ${defaultstophealpoint}
/call CheckEvents

Any help is much appreciated.
 
What I am confused about it is you use the command /mac healer targeting your Tank to start this macro. While when you do that you get the following echo.

Rich (BB code):
/if (!${Defined[Param1]}) {
      /echo Usage: /mac AFCleric % healspell
      /echo Example: /mac AFCleric 40 Complete Heal
      /echo Defaulting to ${healspell} at ${healpct}%
   } else {

So if I do the /mac AFCleric 75 Complete Heal command it will then call a diffrent macro AFCleric right?

Should the code be changed or am I a newb and dont understand this correctly?
 
I'm not sure I completely understand your question, but I'll take a crack at it while I'm still waiting for mine to be answered.

Are you saying because you're typing in some text in addition to the name of the macro, that MQ will look for another macro by that name?

If so, that's not true. It starts up the AFCleric macro, but uses the text you entered after that to change the defaults of the macro until you end it or change it again. In your case, what you typed would start up the macro with the default setting to cast complete heal when your target gets down to 75% health.

Did that answer your question?
 
Not completly this Mac is called healer. But in the code it tells you if you want to change the code from a CH on my tank at 75% I type /mac AFCleric. That is a completly diffrent macro in my macro folder then this one. I guess I am wondering why there is both the Healer and AFCleric in the macro list? And why is the Healer Macro with the code I posted above telling me to use that Macro for the heal? When they both have almost identical code. I am having trouble explaining what I mean LOL.
 
Gnome-it is becuse Healer.mac is a modification of AFCeric.mac and no one edited the /echos to reflects that.

Donnavan-yes some timer examples would help some thanks. As far as "just having the tank loot" do you mean you loot stuff manually or have the macro doing it? The puller.mac won't actually loot for me I need to do it or the puller won't look for another target cause the corpse is the closest one.
 
I see what you're saying now Gnomes, and Muffin is right. When it tells you to use "/mac AFCleric blah" just replace AFCleric with the name of your macro. You can change it to whatever you want. In this case, you would put in healer instead of afcleric.

Still trying to figure out how to make it use greaves click to heal if anyone can help!
 
Figured it out.

Just change all the healing spells in the beginning to "Greaves of Forbidden Rites"

And change all the lines for the heals in the following way:

From: /call Cast "${patchheal}" gem2 1s CheckHP

To: /call Cast "${patchheal}" item 1s CheckHP
 
I am getting the following errors with the Healer macro when running. At diffrent time it spams the omwwait routine. Also the buff me tells ends the macro. Also is there away buffing someone else besides the tank with out pausing the macro? When I try to click on a diffrent group member i automaticaly target back on my tank.



error.jpg
 
Unless it only works for the tank, telling the cleric "buffme" will do all buffs on you. If it doesn't work in tells, try chat channel...I haven't used it enough to know if it matters which one you're in.
 
Gnomesrule, I had the same problem.

The thing is some /if cases try to compare strings which doesnt work the way its intented, I have replaced those checks with Boolean checks.

Unfortunatly I dont have the other mods made which are mentioned in the posts between the First from Alatyami and this here.

What I have also done is I implemented a Check so only current Groupmembers are able to trigger the chatevents via a tell to the cleric direct.
I did that to prevent anyone being able to command my Cleric.
I also implemented a chat event with a Password to get an invite into grp if the Cleric is the Grpleader.
Search for "YourPassword" and replace with one you like.

Code:
|- healer.mac
|- Author: Alatyami, Redguides.com Moderator
|- Original Credits:
|- Secondary Credits: Alatyami, Crystane
|------------------------------------------------------------------------------|
|- Modifications:
|- [07-14-2005] * Fixed the TLO errors
|-              * Removed trickyda, it didn't really work to well anyways
|- [01-27-2006] * Fixed some code, which made the macro crash.
|-		* Added Checks, if the Requestor of stuff is inside the Group and therefor allowed to request 
|-		  Buffs, etc from the Cleric Via tells.
|-		* Added Password Check to request Groupinvites, Careful dont post your Password, later on via useing
|-		  my version here to modify further and reposting it.
|------------------------------------------------------------------------------|

#include spell_routines.inc
|#include Exp_Tracking.inc
|#event Exp "You gain#*#"
#Chat Chat
#Chat tell

Sub Main

|------------------READ THIS SECTION AND EDIT IF NEEDED------------------------|
|- The following declarations are used to determine spell names and spell
|- ranges for the spells you would like to use.

   /declare mychannel string outer pullhealer
   /declare autohealmode int outer 3
   |-Edit this line to change your start message to the primary tank
   /declare tankstartmsg string outer Healer alive and awake .. lets kill stuff
   /declare healspell string outer Complete Healing
   /declare healspellrange int outer 100
   /declare patchheal string outer Pious Light
   /declare patchhealrange int outer 200
   /declare hotspell string outer Pious Elixir
   /declare hotspellrange int outer 100
   /declare daspell string outer Divine Barrier
   /declare yaulpspell string outer Yaulp VII
   /declare usegroupheal int outer 1
   /declare groupheal string outer Word of Vivification
   /declare grouphealrange int outer 70
   /declare usedivarb int outer 1
   /declare healafterdivarb int outer 0
   /declare announce int outer 1
   /declare autosit int outer 1
   /declare distancetosit int outer 40
   /declare autointerrupt int outer 1
   /declare onlyhealfd int outer 1
   /declare interrupt2healself int outer 1
   /declare interrupt2healselfhp int outer 50
   /declare noInvis int outer 1
   /declare defaultstophealpoint int outer 80
   /declare acbuff string outer Ward of Valiance
   /declare longhpbuff string outer Conviction
   /declare singlesymbuff string outer Symbol of Kazad
   /declare groupsymbuff string outer NULL
   /declare spellhastebuff string outer Blessing of Reverence
   /declare rgcspell string outer NULL
   /declare healpetmode int outer 2
   /declare pethealpoint int outer 65
   /declare manatohealpet int outer 25
   /declare pethealspell string outer Complete Healing
   /declare pethealspellrange int outer 100
   /declare nukeone string outer Condemnation
   /declare nuketwo string outer Reproach
   /declare stunone string outer Sound of Divinity
   /declare stuntwo string outer Shock of Wonder
   /declare rootspellname string outer Greater Immobilize
   /declare rootspelltime int outer 2


|------------------------------------------------------------------------------|
   /declare selfhealpoint int outer 70
   /declare dacastpoint int outer 29
   /declare divarbpoint int outer 35
   /declare interrupt2divarb int outer 20
|- Heal at % for WAR/PAL/SK
   /declare tankhealpoint int outer 75
|- Heal at % for WIZ/MAG/ENC/DRU
   /declare casterhotpoint int outer 85
   /declare casterpatchpoint int outer 60
|- Heal at % for NEC/SHM
   /declare necshmpatchpoint int outer 60
|- Heal at % for all other classes
   /declare defaultpatchpoint int outer 70

|------------------------END EDITING------------------------|

   /declare healpct int outer 80
   /declare tankname string outer ${Target}
   /declare tanknameid int outer
   /declare tankclass string outer
   /declare minorhurt int outer 0
   /declare majorhurt int outer 0
   /declare worsthurt string outer NULL
   /declare worsthurtid int outer
   /declare worsthp int outer 100
   /declare worstclass string outer NULL
   /declare gmember int outer
   /declare nohotforua string outer NULL
   /declare nohotforub string outer NULL
   /declare nohotforuc string outer NULL
   /declare nohotforud string outer NULL
   /declare rodwait int outer 0
   /declare following int outer 0
   /declare follname string outer NULL
   /declare pallycount int outer 0
   /declare stophealpoint int outer ${defaultstophealpoint}
   /declare buffbeg int outer 0
   /declare oomspam int outer 1
   /declare lomspam int outer 1
   /declare duckspam int outer 1
   /declare duckfdspam int outer 1
   /declare duckselfspam int outer 1
   /declare nomtspam int outer 1
   /declare ghealhurtcount int outer 0
   /declare divarboor int outer 0
   /declare aetime int outer 0

|-- Uncomment the following line if you want to use a chat channel
  |-- /join ${mychannel}


   /if ((!${Target.ID})||(!${Group.Member[${Target.CleanName}]})) {
      /echo Target the Tank when you run this macro to designate him as MT
      /echo He needs to be in the group as well.
      /end
   } else {
      /varset tanknameid ${Target.ID}
      /varset tankclass ${Target.Class.Name}
   }

   /if (${Defined[Param0]}) {
      /varset healpct ${Param0}
   } else /echo No Heal% specified, defaulting to 80%

   /if (!${Defined[Param1]}) {
      /echo Usage: /mac Healer % healspell
      /echo Example: /mac Healer 40 Complete Heal
      /echo Defaulting to ${healspell} at ${healpct}%
   } else {
      /if (!${Defined[Param2]}) {
         /varset healspell ${Param1}
      } else /if (!${Defined[Param3]}) {
         /varset healspell ${Param1} ${Param2}
      } else /if (!${Defined[Param4]}) {
         /varset healspell ${Param1} ${Param2} ${Param3}
      } else {
         /varset healspell ${Param1} ${Param2} ${Param3} ${Param4}
      }
   }

|   /call ExpPrep  |- Start the xp tracker,

   /echo AutoHealer Active, running in Autohealmode ${autohealmode}
   /echo Casting ${healspell} on ${tankname} at ${healpct}% HP
   /tell ${tankname} You are my primary healing target.
   /delay 2s
   /tell ${tankname} Tell me "Commandlist" if need help.
   /if (${autohealmode}==0) /echo ONLY ${tankname} will be healed
   /if (${autohealmode}==1) /echo ONLY ${tankname} and myself will be healed
   /if (${autohealmode}==2) /echo ${tankname}, myself and my group will be healed
   /if (${autohealmode}==3) /echo ${tankname} and myself will be healed before the rest of the group

   :tankwatchloop

   /if (${Spawn[${tanknameid}].Name.NotEqual[${tankname}]}) /varset tanknameid 0
   /if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) {
      /if (${SpawnCount[${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[${tankname} ${tankclass}].ID}
         /echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid}
      }
      /if (${SpawnCount[${tankname} ${tankclass}]}>1) {
         /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
            /beep
            /varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID}
            /echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro
         } else {
            /beep
            /echo Need to restart macro to correctly identify the MT
         }
      }
   }
   /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) {
      /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[pc ${tankname ${tankclass}}].ID}
         /echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro
      }
   }
   /if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) {
      /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
      }
   }
   /if (!${Spawn[${tanknameid}].ID}) {
      /if (${nomtspam}==1) {
         /echo Warning No Designated MT is available
         /timed 300 /varset nomtspam 1
         /varset nomtspam 0
      }
   }
   /if ((${Me.PctMana}<=50)&&(${announce}==1)&&(${lomspam}==1)) {
      /tell ${tankname} ${Me.PctMana}m
      /varset lomspam 0
      /timed 300 /varset lomspam 1
   }
   /if ((${Me.PctMana}<=7)&&(${announce}==1)&&(${oomspam}==1)) {
      /tell ${tankname} oom
      /varset oomspam 0
      /timed 300 /varset oomspam 1
      /call MedTime
   }
   /if (${GameState.Equal[CHARSELECT]}) /end
   /if (${Target.ID}==${tanknameid}) {
      /varset stophealpoint ${Math.Calc[${healpct}*1.1]}
      /if ((${Target.Distance}<=${patchhealrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
      /if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) {
         /if (${announce}==1) /tell ${tankname} (${healspell}) --- %T ---
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
        /if (${announce}==1) /tell ${tankname} ${Me.PctMana}
      }
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
   }
   /if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand
   }
   /if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand
   }
   /if (${autohealmode}==0) {
      /call CheckEvents
      /goto :tankwatchloop
   }
   /if ((${autohealmode}>=1)&&(${Me.PctHPs}<=${selfhealpoint})) /call Healself
   /if (${autohealmode}>=2) {
      /if ((${Target.PctHPs}>${healpct})||(${Target.Distance}>${healspellrange})||(${Target.PctHPs}<=1)||(!${Target.ID})||(${Target.ID}!=${tanknameid}  )) {
         /call Healgroup
      }
   }
   /if ((${autohealmode}<2)&&(${Me.PctHPs}>${selfhealpoint})&&(${Me.PctMana}<=98)) /call MedTime
   /call CheckEvents
   /goto :tankwatchloop
/return


Sub Healself
   /if (${Me.PctHPs}>${selfhealpoint}) /return
   /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
   /if ((!${Target.ID})||(${Target.PctHPs}>=${Math.Calc[1.1*${healpct}]})||(${Target.PctHPs}<=1)||(${Target.ID}!=${tanknameid})) {
      /if ((${Me.PctHPs}<=${selfhealpoint})&&(${Me.PctHPs}>${dacastpoint})) {
         /target myself
         /delay 6 ${Target.Name.Equal[${Me}]}
         /if (${Target.Name.Equal[${Me}]}) {
            /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
            /call Cast "${patchheal}" gem2 1s CheckHP
            /delay 15 ${Me.SpellReady[${patchheal}]}
         }
      }
   }
   /if (${Me.PctHPs}<=${Math.Calc[${selfhealpoint}*0.7]}) {
      /target myself
      /delay 6 ${Target.Name.Equal[${Me}]}
      /if (${Target.Name.Equal[${Me}]}) {
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
   }
   /varset stophealpoint ${defaultstophealpoint}
/return


Sub Healgroup
   :healgroup
   /varset worsthurt NULL
   /varset worsthp 100
   /varset worstclass NULL
   /varset minorhurt 0
   /varset majorhurt 0
   /varset ghealhurtcount 0
   /for gmember 0 to ${Group}
      /if (${onlyhealfd}==0) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if (${Group.Member[${gmember}].PctHPs}<=${worsthp}) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
         }
      }
      /if (${onlyhealfd}==1) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if ((${Group.Member[${gmember}].Class.Name.NotEqual[Monk]})&&(${Group.Member[${gmember}].Class.Name.NotEqual[Necromancer]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
            /if ((${Group.Member[${gmember}].Class.Name.Equal[Monk]})||(${Group.Member[${gmember}].Class.Name.Equal[Necromancer]})) {
               /if ((${Group.Member[${gmember}].State.Equal[feign]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
                  /varset worsthurt ${Group.Member[${gmember}].Name}
                  /varset worsthurtid ${Group.Member[${gmember}].ID}
                  /varset worsthp ${Group.Member[${gmember}].PctHPs}
                  /varset worstclass ${Group.Member[${gmember}].Class.Name}
               }
            }
         }
      }
      /if ((${Group.Member[${gmember}].Distance}<=${grouphealrange})&&(${Group.Member[${gmember}].PctHPs}<=85)) /varcalc ghealhurtcount ${ghealhurtcount}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=85)&&(${Group.Member[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=60)&&(${Group.Member[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1
   /next gmember
   /if (${autohealmode}==3) {
      /if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
         /if ((${Target.ID}==${tanknameid})&&(${Target.PctHPs}<=${healpct})&&(${Target.Distance}<=${healspellrange})) /return
      }
      /if (${Me.PctHPs}<=${selfhealpoint}) /return
   }
   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
      }
      /if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) {
         /if (${Me.PctMana}<=98) /call MedTime
      }
      /call CheckEvents
      /return
   }
   /if ((${usedivarb}==1)&&(${worsthp}<=${divarbpoint})&&(${Me.AltAbilityReady[divine arbitration]})) /call Divarbcast
   /if ((${Math.Calc[${majorhurt}+${minorhurt}]}>=3)&&(${usegroupheal}==1)) {
      /if (${announce}==1) /tell ${tankname} Inc Grp Heal, get close
      /call Cast "${groupheal}" gem4 1s
      /delay 15 ${Me.SpellReady[${groupheal}]}
      /call CheckEvents
      /return
   }
   /if (${worsthurtid}==${tanknameid}) /return
   /if (${worsthurtid}==${Me.ID}) {
      /call Healself
      /call CheckEvents
      /return
   }



   /if ((${Bool[${worstclass}.Find[Warrior]]})||(${Bool[${worstclass}.Find[Paladin]]})||(${Bool[${worstclass}.Find[Shadow Knight]]})) {
      /if ((${worsthp}<=${tankhealpoint})&&(${worsthp}>=${Math.Calc[0.7*${tankhealpoint}]})&&(${majorhurt}<=1)&&(${minorhurt}<=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /tell ${tankname} ((${healspell}) --- %T ---
        /if (${announce}==1) /tell ${tankname} ${Me.PctMana}
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
      /if (${worsthp}<=${tankhealpoint}) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
   } else /if ((${Bool[${worstclass}.Find[Magician]]})||(${Bool[${worstclass}.Find[Wizard]]})||(${Bool[${worstclass}.Find[Enchanter]]})||(${Bool[${worstclass}.Find[Druid]]})) {
      /if ((${worsthp}<=${casterhotpoint})&&(${worsthp}>${casterpatchpoint})) {
         /if ((${worsthurt}.Equal[${nohotforua}]})||(${worsthurt}.Equal[${nohotforub}]})||(${worsthurt}.Equal[${nohotforuc}]})||(${worsthurt}.Equal[${nohotforud}]})) /return
         /if (${nohotforua}.Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
            /varset nohotforua ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforua NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforub}.Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforub ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforub NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforuc}.Equal[NULL]}) {
            /target id${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforuc ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforuc NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforud}.Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforud ${Target.Name}
            /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforud NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         }
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
      /if ((${worsthp}<=${casterpatchpoint})&&(${worsthp}>=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
    /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /return
      }
      /varset stophealpoint ${defaultstophealpoint}
   } else /if ((${Bool[${worstclass}.Find[Necromancer]]})||(${Bool[${worstclass}.Find[Shaman]]})) {
      /if ((${worsthp}<=${necshmpatchpoint})&&(${worsthp}>=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
    /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${necshmpatchpoint}+5]}
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
    /call Cast "${patchheal}" gem2 1s CheckHP
    /varset stophealpoint ${defaultstophealpoint}
    /call CheckEvents
    /delay 15 ${Me.SpellReady[${patchheal}]}
    /return
      }
   } else /if ((${worsthp}<=${defaultpatchpoint})&&(${worsthp}>=1)) {
      /target id ${worsthurtid}
      /delay 5 ${Target.ID}==${worsthurtid}
      /if (!${Target.ID}) /return
      /if (${Target.ID}!=${worsthurtid}) /return
      /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
      /varset stophealpoint ${Math.Calc[${defaultpatchpoint}+5]}
      /call Cast "${patchheal}" gem2 1s CheckHP
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
      /delay 15 ${Me.SpellReady[${patchheal}]}
      /return
   }
   /varset stophealpoint ${defaultstophealpoint}
|   /if ((${healpetmode}==2)&&(${Me.PctMana}>${manatohealpet})) /call HealPet
/return


Sub Divarbcast
   /varset divarboor 0
   /for gmember 0 to ${Group}
      /if (${Group.Member[${gmember}].Distance}>200) /varcalc divarboor ${divarboor}+1
   /next gmember
   /if (${Math.Calc[${Group}-${divarboor}]}>=2) {
      /if (${announce}==1) /tell ${tankname} Inc Divine Arbitration
      /call Cast "Divine Arbitration" alt 2s
      /if ((${healafterdivarb}==1)&&(${Me.PctMana}>40)) {
         /if (${announce}==1) /tell ${tankname} Inc Grp Heal, get close
         /call Cast "${groupheal}" gem4 2s
         /delay 15 ${Me.SpellReady[${groupheal}]}
      }
   }
/return





Sub CheckEvents
   /delay 1
|   /doevents Exp
   /doevents Chat
   /doevents tell
   /doevents flush
/return


Sub MedTime
   :oomwait
   /call CheckEvents
   /If ((${FindItem["Rod of Mystical Transvergance"].InvSlot})&&(${Me.PctMana}<=70)&&(${Me.PctHPs}>=98)&&(${rodwait}==0)) {
      /call Cast "Rod of Mystical Transvergance" item
      /varset rodwait 1
      /timed 3000 /varset rodwait 0
   }
   /if ((${autosit}==1)&&(${Me.PctMana}<=98)&&(!${Me.Casting.ID})) {
      /if ((${Bool[${Me.Standing}]})&&(${NearestSpawn[NPC].Distance}>=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${distancetosit}]})&&(${Me.PctHPs}>90)) /sit
      /if ((${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})&&(${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]})) /stand
   }
   /if ((${Bool[${Me.Standing}]})&&(${autosit}==2)&&(${Me.PctMana}<=98)&&(${Me.PctHPs}>90)&&(!${Me.Casting.ID})) /sit
   /if ((${Bool[${Me.Sitting}]})&&(${autosit}>=1)&&(${Me.PctMana}>98)&&(!${Window[SpellBookWnd].Open})) /stand
   /if ((${Bool[${Me.Standing}]})&&(!${Me.Mount.ID})&&(${Me.SpellReady[${yaulpspell}]})&&(!${Me.Buff[${yaulpspell}].ID})) {
      /if ((!${Me.Buff[Vallon].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Strength of Tunare].ID})) /call Cast "${yaulpspell}"
   }
   /if (${buffbeg}==1) /call Buffbeg
   /if (${Me.PctHPs}<=${selfhealpoint}) /return
   /if (${Me.PctMana}<=8) /goto :oomwait
/return


Sub CheckHP
   /if (!${Window[CastingWindow].Open}) /return
   /if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})) {
      /if ((${announce}==1)&&(${duckspam}==1)) {

         /echo Ducking heal on ${Target.Name}
         /varset duckspam 0
         /timed 60 /varset duckspam 1
      }
      /call Interrupt
      /return
   }
   /if ((${interrupt2healself}==1)&&(${Target.Name.NotEqual[${Me}]})&&(${Me.PctHPs}<${interrupt2healselfhp})) {
      /if ((${usedivarb}==1)&&(${Me.PctHPs}<=${divarbpoint})&&(${Me.AltAbilityReady[Divine Arbitration]})) {
         /call Interrupt
         /call Divarbcast
         /return
      }
      /if ((${announce}==1)&&(${duckselfspam}==1)) {

         /echo Ducking heal on ${Target} so I can heal myself
         /varset duckselfspam 0
         /timed 60 /varset duckselfspam 1
      }
      /call Interrupt
      /return
   }
   /if (${onlyhealfd}==1) {
      /if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Monk]})) {
         /if (${Target.State.NotEqual[feign]}) {
            /if ((${announce}==1)&&(${duckfdspam}==1)) {

               /echo Ducking heal on ${Target.Name} because he isn't staying FD
               /varset duckfdspam 0
               /timed 40 /varset duckfdspam 1
            }
            /call Interrupt
            /return
         }
      }
   }
   /if ((${usedivarb}==1)&&(${Target.PctHPs}<=${divarbpoint})&&(${Target.Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) {
      /for gmember 0 to ${Group}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /call Interrupt
            /call Divarbcast
            /return
         }
      /next gmember
   }
/return


Sub Buffbeg
   /if (${buffbeg}==0) /return
   /echo Begging for buffs now
   /if ((!${Me.Buff[Voice of Quellious].ID})&&(!${Me.Buff[Tranquility].ID})&&(!${Me.Buff[Koadic's Endless Intellect].ID})&&(!${Me.Buff[Clairvoyance].ID})&&(!${Me.Buff[Voice of Clairvoyance].ID})) {
      /if (${NearestSpawn[PC guild enchanter]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild enchanter].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild enchanter]} need C plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /echo No guild Enchanter available for C5
   }
   /if ((!${Me.Buff[Protection of the Nine].ID})&&(!${Me.Buff[Blessing of the Nine].ID})&&(!${Me.Buff[Steeloak Skin].ID})&&(!${Me.Buff[Blessing of Steeloak].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${NearestSpawn[PC guild druid]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild druid].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild druid]} need dru crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /echo No guild Druid available for DRU crack
   }
   /if ((!${Me.Buff[Spiritual Dominion].ID})&&(!${Me.Buff[Spiritual Ascendance].ID})) {
      /if (${NearestSpawn[PC guild beastlord]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild beastlord].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild beastlord]} need bst crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /echo No guild Beastlord available for BST crack
   }
   /if ((!${Me.Buff[Kazad`s Mark].ID})&&(!${Me.Buff[Symbol of Kazad].ID})&&(!${Me.Buff[Symbol of Balikor].ID})&&(!${Me.Buff[Balikor's Mark].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${NearestSpawn[PC guild cleric]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild cleric].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild cleric]} need sym plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /echo No guild Cleric available for Symbol
   }
   /if ((!${Me.Buff[Brell's Stalwart Shield].ID})&&(!${Me.Buff[Brell's Brawny Bulwark].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Spiritual Vitality].ID})) {
      /if (${NearestSpawn[PC guild paladin]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild paladin].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild paladin]} need BSS plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /echo No guild Paladin available for BSS
   }
   /if ((!${Me.Buff[Shield of Maelin].ID})&&(!${Me.Buff[Focus of the Seventh].ID})&&(!${Me.Buff[Focus of Soul].ID})&&(!${Me.Buff[Wunshi's Focusing].ID})&&(!${Me.Buff[Talisman of Wunshi].ID})) {
      /if (${NearestSpawn[PC guild shaman]}.NotEqual[NULL]}) /if (${NearestSpawn[PC guild shaman].Distance}<=100) {
         /tell ${tankname} ${NearestSpawn[PC guild shaman]} need focus plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /echo No guild Shaman available for Focus
   }
   /varset buffbeg 0
/return


Sub FindExactPC(string name)
   /declare nameid int local
   /declare counter int local 1
   :FindNext
   /if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return 2
   /varset nameid ${NearestSpawn[${counter}, pc ${name}].ID}
   /if (${Spawn[${nameid}].CleanName.Equal[${name}]}) {
      /target id ${nameid}
      /delay 1s ${Target.ID}==${nameid}
      /if (${Target.ID}==${nameid}) /return 1
   }
   /varcalc counter ${counter}+1
   /if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext
/return 2


Sub Event_Chat(string ChatType,string Sender,string ChatText)
   /if ((!${ChatType.Equal[${mychannel}]})&&(!${ChatType.Equal[TELL]})) /return
   /if (!${Spawn[${Sender}].ID}) {
      /echo ${Sender} is not in the zone
      /return
   }
   /if (${ChatText.Equal[Follow me]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /delay 5
      /if (!${Spawn[${Sender}].ID}) {
         /echo ${Sender} is not in zone for me to follow!
         /return
      }
      /varset follname ${Sender}
      /varset following 1
      :targetfoll
      /target pc ${follname}
      /delay 1s ${Target.Name.Equal[${follname}]}
      /if (${Target.Name.Equal[${follname}]}) {
         /goto :Loop
      } else /goto :targetfoll
      :Loop
      /face fast
      /if (${Target.Distance}>10) /keypress forward hold
      /if (${Target.Distance}<9) /keypress back
      /if (!${Target.ID}) /varset following 0
      /call CheckEvents
      /if ((${Target.Name.Equal[${follname}]})&&(${following}>0)) {
         /goto :Loop
      } else {
         /keypress forward
         /keypress back
      }
   }
   /if (${ChatText.Equal[End follow]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /varset following 0
      /keypress forward
      /keypress back
      /timed 50 /face pc ${follname}
   }
   /if (${ChatText.Equal[Gbuff now!]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /varset pallycount 0
      /target myself
      /call Cast "${acbuff}" gem6 7s
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      /for gmember 1 to ${Group}
         /target id ${Group.Member[${gmember}].ID}
         /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${acbuff}" gem5 7s
            /if (${Target.Class.Name.Equal[Paladin]}) {
               /call Cast "${longhpbuff}" gem4 10s
               /varcalc pallycount ${pallycount}+1
            }
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
            }
         }
      /next gmember
      /if ((${Math.Calc[${Group}-${pallycount}]}>=2)&&(!${Bool[${groupsymbuff}]})) /call Cast "${groupsymbuff}" gem5 10s
      /if ((${Math.Calc[${Group}-${pallycount}]}<2)||(${Bool[${groupsymbuff}]})) {
         /for gmember 0 to ${Group}
            /target id ${Group.Member[${gmember}].ID}
            /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${singlesymbuff}" gem5 7s
         /next gmember
      }
   }
   /if (${ChatText.Equal[BoR now!]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /target myself
      /delay 5 ${Target.Name.Equal[${Me}]}
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      /for gmember 1 to ${Group}
         /target id ${Group.Member[${gmember}].ID}
         /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
            }
         }
      /next gmember
   }
   /if (${ChatText.Equal[nuke]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${Me.PctMana}<30) {
         /chat #${mychannel} Cleric Mana ${Me.PctMana}%, holding on nukes!
      } else {
         /assist ${Sender}
         /delay 5
         /if (${Target.Type.NotEqual[NPC]}) {
            /assist ${Sender}
            /delay 5 ${Target.Type.Equal[NPC]}
         }
         /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
            /if (${Me.SpellReady[${nukeone}]}) {
               /if (${announce}==1) /tell ${tankname} %T shal feel the wrath of Brell! (${nukeone})
               /call Cast "${nukeone}" spell 3s
            } else /if (${Me.SpellReady[${nuketwo}]}) {
               /if (${announce}==1) /tell ${tankname} %T shal feel the wrath of Brell! (${nuketwo})
               /call Cast "${nuketwo}" spell 3s
            } else /chat #${mychannel} nukes not ready
            /if (${Me.PctMana}<=60) /chat #${mychannel} FYI Cleric Mana ${Me.PctMana}%
         } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
      }
   }
   /if (${ChatText.Equal[stun]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /assist ${Sender}
      /delay 5
      /if (${Target.Type.NotEqual[NPC]}) {
         /assist ${Sender}
         /delay 5 ${Target.Type.Equal[NPC]}
      }
      /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
         /if (${Me.SpellReady[${stunone}]}) {
            /if (${announce}==1) /tell ${tankname} Casting ${stunone} on %T
            /call Cast "${stunone}" spell 3s
         } else /if (${Me.SpellReady[${stuntwo}]}) {
            /if (${announce}==1) /tell ${tankname} Casting ${stuntwo} on %T
            /call Cast "${stuntwo}" spell 3s
         } else /chat #${mychannel} stuns not ready
      } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
   }
   /if (${ChatText.Equal[buffme]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /call FindExactPC ${Sender}
      /if (${Macro.Return}!=1) /return
      /if (${Target.Class.Name.Equal[Paladin]}) {
         /call Cast "${longhpbuff}" gem4 10s
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
         /return
      }
      /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      }
      /call Cast "${acbuff}" gem6 7s
      /call Cast "${singlesymbuff}" gem5 7s
   }
   /if ((${ChatText.Equal[patch me]})||(${ChatText.Equal[heal]})||(${ChatText.Equal[heal me]})||(${ChatText.Equal[heal plz]})||(${ChatText.Equal[heal me plz]})||(${ChatText.Equal[need heal]})) {
      /if (!${Group.Member[${Sender}]}) /return
      /call FindExactPC ${Sender}
      /if ({${Macro.Return}!=1) /return
      /if (${Target.Distance}<=${patchhealrange}) {
         /if (${announce}==1) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 2s
         /delay 15 ${Me.SpellReady[${patchheal}]}
      } else /tell ${tankname} ${Sender} your OOR
   }
   /if ((${ChatText.Equal[sym]})||(${ChatText.Equal[wog]})||(${ChatText.Equal[V]})||(${ChatText.Equal[bor]})||(${ChatText.Equal[rgc]})||(${ChatText.Equal[hot me]})||(${ChatText.Equal[ch me]})||(${ChatText.Equal[pb]})) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${Spawn[pc ${Sender}].Distance}>250) /return
      /call FindExactPC ${Sender}
      /if (${Macro.Return}!=1) /return
   }
   /if (${ChatText.Equal[sym]}) /call Cast "${singlesymbuff}" gem5 7s
   /if (${ChatText.Equal[wog]}) /call Cast "${acbuff}" gem6 7s
   /if (${ChatText.Equal[V]}) /call Cast "${longhpbuff}" gem4 10s
   /if (${ChatText.Equal[bor]}) {
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
   }
   /if (${ChatText.Equal[rgc]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${FindItem[Blackflame Sphere].ID}) {
         /call Cast "Blackflame Sphere" item
      } else /if (${FindItem[Wand of Casual Blessings].ID}) {
         /call Cast "Wand of Casual Blessings" item
      } else /call Cast "${rgcspell}" gem8 5s
   }
   /if (${ChatText.Equal[buff pet]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /target ${Spawn[pc ${Sender}].Pet}
      /delay 8
      /target ${Spawn[pc ${Sender}].Pet}
      /call Cast "${acbuff}" gem6 7s
      /call Cast "${singlesymbuff}" gem5 7s
   }
   /if (${ChatText.Equal[da pet]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /target ${Spawn[pc ${Sender}].Pet}
      /delay 6
      /target ${Spawn[pc ${Sender}].Pet}
      /if (${Me.AltAbilityReady[39]}) /if (${Target.Name}.Equal[${Spawn[pc ${Sender}].Pet.Name}]}) {
         /call Cast "39" alt
      } else {
         /chat #${mychannel} Bestow Divine Aura is not ready, or Target ( %T ) OOR or wrong target
      }
   }
   /if (${ChatText.Equal[pb]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /call Cast "Pure Blood" gem6 10s
   }
   /if (${ChatText.Equal[hot me]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${Target.Distance}<=${hotspellrange}) {
         /if (${announce}==1) /tell ${tankname} (${hotspell}) --- %T ---
         /call Cast "${hotspell}" gem2 2s
         /delay 15 ${Me.SpellReady[${hotspell}]}
      } else /tell ${tankname} ${Sender} your OOR
   }
   /if (${ChatText.Equal[ch me]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${Target.Distance}<=100) {
         /if (${announce}==1) /tell ${tankname} (Complete Heal) --- %T --- 10 secs
         /call Cast "Complete Healing" gem2 5s
         /tell ${tankname} ${Me.PctMana}m
         /delay 15 ${Me.SpellReady[${hotspell}]}
      } else /tell ${tankname} ${Sender} your OOR
   }
   /if (${ChatText.Equal[mana check]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /chat #${mychannel} Cleric Mana ${Me.PctMana}%
   }
   /if (${ChatText.Equal[slowcamp]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${Me.Standing}) /sit
      /delay 5m ${Me.PctMana}>=98
      /camp
      /end
   }
/if (${ChatText.Equal[Commandlist]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /tell ${Sender} List of Commands: Follow me ; End follow ; Gbuff now! ; BoR now! ; nuke ; stun ; buffme ; patch me ; sym ; wog ; V (for Convitction) ; bor ; rgc ; buff pet ; da pet ; pb ; hot me ; ch me ; mana check ; Commandlist
   }
/if (${ChatText.Equal[YourPassword]}) {
      /invite ${Sender}
   }
/return

Sub Event_Exp
   /call ExpTrack
/return

Keep inputs commeing and i will try to implement.
 
Last edited:
Thanks for the help with that crystane.

Keep inputs commeing and i will try to implement.

Do you think if I gave you a shaman bot macro that has combat in it, that you could implement it into this one to have the cleric assist? The combat I have assists at certain percentage and turns off attack on enrage.
 
I am going to test out your code now Crystane and thanks!

I do notice you took out the code added by Donnovan that had the check on death of cleric and GM Check if he enters in zone.

I was also thinking instead of in his instance where he just has the cleric Camp out. Couldnt it be made that it sends tell to tank saying Your no longer my Desinated MA or something like that and shut off Macro?
 
dark,

its easy to implement into your shm macro to send the clr a tell as soon as the shms target has a certain percentage.

The hard part is first to look into your shms macro and get a clue what it does

Gnomerules,
as easy, as to put a camp command on death of the clr into a subroutine,as easy its possible
to let it only send a tell to the tank saying whatever and
add the line /end which will shut off the macro.
 
Crystane I really like your code and it worked alot better then the others I have tried. I was curious I did not see a option to send a tell and ask for Conviction. I am new to this type of Coding so I will see if I can figure it out. Thanks alot for this mod!!!
 
Sorry Crystane, I wasn't clear enough about what I was asking.

Basically what I was asking is about adding combat to the healer macro, where it would assist the MA. Currently, I'm running this with below 20's cleric/warrior and adding a shaman to it as soon as get time to catch him up to them. The cleric has a "hand of the god" proccing weapon so I'm trying to get him to assist.

I'll check out the shaman macro and see if I can transfer the stuff over myself. The shaman macro I have is shambot from mq boards in VIP, so can't post the whole thing here.

Gnomes, I looked in the healer macro I have and the command for "longhp" buff is "V".
 
Gnome,

I adjusted my posted code to have the Commandlist more complete on request via tell to the clr.

The tellcommand for Conviction is indeed V as Dark posted.
I just missed that hehe.

Dark,
you could put a check into your MT or MA toons macro, which checks if my health is like greater then 80percent and Target health is like less then 70 then send a tell to your cleric, like Assist me in melee or nuke or stun.

nuke and stun as tell from the MT will cause the cleric to nuke and stun the target of the MT.

For the Melee assist you need to put an additional Chatpart into the Chatsubroutine, for example.

Rich (BB code):
/if (${ChatText.Equal[assist me and melee]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /assist ${Sender}
      /delay 5
      /stick 10
      /delay 5s ${Target.Distance}<12
      /stick loose
      /keypress left
      /keypress right
}

NOTE!!!! the stick command will require you to have the plugin mq2moveutils loaded.

Too bad you cant share the shm macro with us.
However and this is not asking for but an info,

I like red cents if you like my posts and or found the help useful......
 
Puller/Healer Mod
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart