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

A request, if anyone has some time (1 Viewer)

Sosafina

New member
Joined
Sep 13, 2005
RedCents
I had a very nice cleric macro (MyCleric) that I have used for a while, until DoD. I am really used to this macro, and kind of dislike the way AFCleric works, so I was wondering if anyone would be able to help me "fix" MyCleric so that it would work for me again. Anyways, if anyone has some free time and can help, here is the code (posting all of it since I'm not sure what is relevant):

MyCleric.mac
PHP:
|MyCleric.mac
|v0.62
#include Spell_Routines.inc
#include MyClericSubs.inc
#include MyClericEvents.inc
#include CCH.inc

Sub Main
/declare Version       string outer 0.60
/declare TDA           int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,TargetDAPoint]}
/declare THP           int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,TankHealPoint]}
/declare CHP           int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,CasterHealPoint]}
/declare EHP           int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,EmergencyHealPoint]}
/declare ShmHP         int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,ShamanHealPoint]}
/declare DArb          int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,DivineArbPoint]}
/declare SelfHP        int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,SelfHealPoint]}
/declare THPcrg        int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,TankHealPointCRGoing]}
/declare CHPcrg        int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,CasterHealPointCRGoing]}
/declare GroupCR       int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,GroupHealPoint]}
/declare DAPoint       int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,SelfDAPoint]}
/declare SelfDArb      int    outer ${Ini[MyCleric_${Me.Name}.ini,Heal_Percentages,SelfDivineArbPoint]}
/declare AtkPoint      int    outer ${Ini[MyCleric_${Me.Name}.ini,Misc,AttackPoint]}
/declare TopOffRng     int    outer ${Ini[MyCleric_${Me.Name}.ini,Misc,TopOffRange]}
/declare SafetyMargin  int    outer ${Ini[MyCleric_${Me.Name}.ini,Misc,SafetyMargin]}
/declare CancelPct     int    outer ${Ini[MyCleric_${Me.Name}.ini,Misc,CancelPct]}
/declare TagDist       int    outer ${Ini[MyCleric_${Me.Name}.ini,Misc,TagAlongDistance]}
/declare FDHealDist    int    outer ${Ini[MyCleric_${Me.Name}.ini,Misc,FDHealDistance]}
/declare MeleMode      bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,MeleMode]}
/declare RaidMode      bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,RaidMode]}
/declare HealFD        bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,HealOnlyFD]}
/declare TopOff        bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,TopOffTank]}
/declare UseMount      bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,UseMount]}
/declare UseYaulp      bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,UseYaulp]}
/declare UseRod        bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,UseRod]}
/declare UseSelfBuffs  bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,UseSelfBuffs]}
/declare UseClickBuffs bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,UseClickBuffs]}
/declare ManaReport    bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,ManaReport]}
/declare DoGroupMsgs   bool   outer ${Ini[MyCleric_${Me.Name}.ini,Modes,DoGroupMsgs]}
/declare Mount         string outer ${Ini[MyCleric_${Me.Name}.ini,Misc,MountItem]}
/declare CRSpell       string outer ${Ini[MyCleric_${Me.Name}.ini,Misc,CRSpell]}
/declare LightMsg      string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,Light]}
/declare RemedyMsg     string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,Remedy]}
/declare CHMsg         string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,CompleteHeal]}
/declare GHealMsg      string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,GroupHeal]}
/declare CRMsg         string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,AACRSpell]}
/declare DArbMsg       string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,DivineArbitration]}
/declare TDAMsg        string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,TargetDA]}
/declare SelfDAMsg     string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,SelfDA]}
/declare OORMsg        string outer ${Ini[MyCleric_${Me.Name}.ini,Messages,OutOfRange]}


/declare g             int    outer
/declare WH            int    outer
/declare DA            int    outer
/declare MTHP          int    outer
/declare FTimer        int    outer
/declare TankID        int    outer
/declare AnchorX       int    outer
/declare AnchorY       int    outer
/declare GroupHeal     int    outer
/declare MeleTarID     int    outer
/declare TagAlongID    int    outer
/declare AnchorHeading int    outer
/declare GA            bool   outer
/declare TA            bool   outer
/declare SA            bool   outer
/declare GH            bool   outer
/declare RT            bool   outer
/declare CGT           bool   outer
/declare ETA           bool   outer FALSE
/declare EGA           bool   outer FALSE
/declare Spam          bool   outer TRUE
/declare LomSpam       bool   outer TRUE
/declare Rage          bool   outer
/declare Anchor        bool   outer
/declare CRGoing       bool   outer
/declare MeleTar       bool   outer
/declare TankSpam      bool   outer
/declare TagAlong      bool   outer
/declare MeleTimer     bool   outer TRUE
/declare TankAvail     bool   outer
/declare RodTimer      timer  outer
/declare HitTimer      timer  outer
/declare Yaulp         string outer ${If[${Me.Book[Yaulp VII]},Yaulp VII,Yaulp VI]}
/declare YaulpGem       int   outer 6 
/declare SpellHaste    string outer ${If[${Me.Book[Blessing of Devotion]},Blessing of Devotion,Blessing of Reverence]}
/declare SpellHasteGem  int   outer 8
/declare GroupSH       string outer ${If[${Me.Book[Aura of Devotion]},Aura of Devotion,Aura of Reverence]}
/declare GroupSHGem     int   outer 8
/declare ACBuff        string outer ${If[${Me.Book[Ward of Valiance]},Ward of Valiance,Ward of Gallantry]}
/declare ACBuffGem      int   outer 9
/declare ComboBuff     string outer ${If[${Me.Book[Conviction]},Conviction,Virtue]}
/declare ComboBuffGem   int   outer 9
/declare GroupCombo    string outer ${If[${Me.Book[Hand of Conviction]},Hand of Conviction,Hand of Virtue]}
/declare GroupComboGem  int   outer 9
/declare ArmorBuff     string outer ${If[${Me.Book[Armor of the Pious]},Armor of the Pious,Armor of the Zealot]}
/declare ArmorBuffGem   int   outer 9
/declare SymbolBuff    string outer ${If[${Me.Book[Symbol of Balikor]},Symbol of Balikor,Symbol of Marzin]}
/declare SymbolBuffGem  int   outer 9
/declare GroupSymbol   string outer ${If[${Me.Book[Balikor's Mark]},Balikor's Mark,Kazad's Mark]}
/declare GroupSymbolGem int   outer 9
/declare gemnum    int   local
/declare TankName      string outer
/declare TankList      string outer ${Ini[MyCleric_${Me.Name}.ini,Misc,TankList]}
/declare CasterList    string outer ${Ini[MyCleric_${Me.Name}.ini,Misc,CasterList]}
/declare CasterHS      string outer ${If[${Me.Book[Pious Remedy]},Pious Remedy,Supernal Remedy]}
/declare TankHS        string outer ${If[${Me.Book[Ancient: Hallowed Light]},Ancient: Hallowed Light,Pious Light]}
/declare GHSpell       string outer ${If[${Me.Book[Word of Vivification]},Word of Vivification,Word of Replenishment]}

/call CCHPreReqs
|CheckBuildDate
/if (${Version.NotEqual[${Ini[MyCleric_${Me.Name}.ini,Misc,Version]}]}) /goto :LoadAliases
/if (${MacroQuest.BuildDate.Equal[${Ini[MyCleric_${Me.Name}.ini,Misc,LoadDate]}]}) /goto :SkipAliases
   
:LoadAliases
/ini MyCleric_${Me.Name}.ini Misc LoadDate ${MacroQuest.BuildDate}
/ini MyCleric_${Me.Name}.ini Misc Version ${Version}

|AA Aliases
/echo loading Aliases
/squelch /alias /Avatar /echo Using Divine Avatar!
/squelch /alias /Hammer /echo Using Celestial Hammer!

|Mode Aliases
/squelch /alias /MeleMode /echo Toggling MeleMode
/squelch /alias /RaidMode /echo Toggling RaidMode
/squelch /alias /HealOnlyFD /echo Toggling HealOnlyFD
/squelch /alias /TopOffTank /echo Toggling TopOffTank
/squelch /alias /UseMount /echo Toggling UseMount
/squelch /alias /UseYaulp /echo Toggling UseYaulp
/squelch /alias /UseSelfBuffs /echo Toggling UseSelfBuffs
/squelch /alias /TagAlong /echo Setting TagAlong to
/squelch /alias /TagAlongOff /echo Turning TagAlong Off
/squelch /alias /ManaReport /echo Toggling ManaReport

|Variable Aliases
/squelch /alias /MTHealPoint /echo New HealPoint for MT
/squelch /alias /NewMT /docommand /echo New Main Tank!
/squelch /alias /TargetDAPoint /echo New TargetDAPoint
/squelch /alias /CasterHealPoint /echo New CasterHealPoint
/squelch /alias /TankHealPoint /echo New TankHealPoint
/squelch /alias /ShamanHealPoint /echo New ShamanHealPoint
/squelch /alias /DivineArbPoint /echo New DivineArbPoint
/squelch /alias /SelfHealPoint /echo New SelfHealPoint
/squelch /alias /TankHealPointCRGoing /echo New TankHealPointCRGoing
/squelch /alias /CasterHealPointCRGoing /echo New CasterHealPointCRGoing
/squelch /alias /GroupHealPoint /echo New GroupHealPoint
/squelch /alias /SelfDAPoint /echo New SelfDAPoint
/squelch /alias /SelfDivineArbPoint /echo New SelfDivineArbPoint
/squelch /alias /TopOffRange /echo New TopOffRange
/squelch /alias /CancelPct /echo New CancelPercentage
/squelch /alias /FDHealDistance /echo New FDHealDistance
/squelch /alias /Settings /echo Current Settings
/squelch /alias /Anchor /echo Setting Anchor
/squelch /alias /TagDistance /echo Setting Tag Along Distance

|Buffing Aliases
/squelch /alias /DoGroupCombo /echo Buffing the group with Combo Buff!
/squelch /alias /DoGroupSymbol /echo Buffing the group with Symbol!
/squelch /alias /DoGroupSpellHaste /echo Buffing the group with Spell Haste!
/squelch /alias /Combo /echo Combo Buff to
/squelch /alias /Symbol /echo Symbol to
/squelch /alias /SpellHaste /echo Spell Haste to
/squelch /alias /ACBuff /echo ACBuff to

:SkipAliases
|Macro Setup
/varset MTHP ${Param0}
/varset TankID ${Target.ID}
/varset TankName ${Target.CleanName}
/if (!${TankID}) {
   /echo No Target, no Tank, Defaulting to RaidMode!
   /varset RaidMode TRUE
   /varset TankID 0
}
/if (!${MTHP}) {
   /echo No Heal% Specified! Defaulting to RaidMode!
   /varset RaidMode TRUE
   /varset TankID 0
}
/if (${TankID}==${Me.ID}) {
   /echo You can't be the tank! Defaulting to RaidMode!
   /varset RaidMode TRUE
   /varset TankID 0
}
/if (${UseClickBuffs}) /call ClickBuffDeclares
/echo ******************************
/echo Cleric.mac Initialized
/if (!${RaidMode}) /echo ${TankName} is the Tank. Current ID: ${TankID}
/if (${RaidMode}) /echo Operating in RaidMode, Bot and Group will be healed.
/echo ******************************
|End Setup
:Top
/call ClickRods
/if (${GameState.Equal[CHARSELECT]}) /end
/if (${ManaReport}) /call CheckMana
/if (!${RaidMode}) {
   /if (!${Bool[${TankName}]}) {
      /echo You are attempting to run group mode with no tank identified! Ending..
      /end
   }
}
:CastingLoop
/if (${Me.Casting.ID}) /goto :CastingLoop
:GroupLoop
/call GroupStatus
:TankLoop
/if (${RaidMode}) /goto :MeLoop
|Check Tank Status
/call TankStatus
:MeLoop
/doevents ImHit
/if (${Me.CurrentMana}<${Spell[${CasterHS}].Mana}) /goto :ActionsLoops
|Am I invis? If so Pause.
/call CheckInvis
|Do I need Healed or DA?
/varset SA FALSE
   /if (${GA}) {
      /if ((${UseCR}||${UseWR}) && ${HitTimer}==0) /goto :GroupAction
   }
   /if (${Me.PctHPs}<${SelfHP}) {
      /call CheckBot
      /if (${Math.Calc[${Spawn[${TankID}].PctHPs}+40]}<${Me.PctHPs}) /goto :ActionsLoops
      /goto :MeLoop
   }
   /if (${SA}) /goto :GroupLoop
|Do I need to sit or stand?
/if (${RaidMode}) /call CheckTarget
/call SitOrStand
:ActionsLoops
/doevents Exp
/call CheckMele
/if (${TagAlong} && !${MeleTar}) /call TagAlong
:TankAction
/if (${Me.CurrentMana}<${Spell["Complete Healing"].Mana}) /goto :SkipActions
/if (${TA}) {
   /call TankAction
   /if (${EGA}) {
      /call GroupAction
      /varset EGA FALSE
   }
   /goto :Top
}
:GroupAction
/if (${GA}) /call GroupAction
|Top off Tank?
/if (${TopOff}) /call TopOff
/if (${GA} || ${TA}) /goto :Top

/if (${UseSelfBuffs}) {
   /if (${NearestSpawn[NPC].Distance}>70) /call CheckSelfBuffs
}
:SkipActions
/doevents
|Use Yalp or summon a mount?
/if (${Me.State.Equal[STAND]}) {
    /if (${UseMount}) {
       /if (!${Bool[${Me.Mount}]}) /call Cast "${Mount}" item
       /delay 2
     }
    /if (${UseYaulp}) {
     /if (!${UseMount}) {
          /if (!${Me.Gem[${Yaulp}]} && ${Me.Gem[${Yaulp}]}!=${YaulpGem}) {
              /echo Trying to unmem wrong song...
              /varset gemnum ${Me.Gem[${Yaulp}]}
              /delay 5
              /echo Trying to mem ${Yaulp} in Slot ${YaulpGem}
              /memspell ${YaulpGem} "${Yaulp}"
              /delay 35
              }
            /if (!${Bool[${Me.Buff["${Yaulp}"]}]} && ${Me.SpellReady["${Yaulp}"]} && ${Me.PctMana}<97 && !${Me.Moving} && ${Me.State.Equal[STAND]}) /call Cast "${Yaulp}" gem6
              }
             }   
            }
/if (${Rage}) /attack off
/if (${MeleMode}) /call Mele
/goto :Top
/return

MyClericEvents.INC
PHP:
|MyClericEvents.inc
|v0.03
#event ImHit "#*#mauls YOU for#*#"
#event ImHit "#*#gores YOU for#*#"
#event RageOn "#*#has become ENRAGED."
#event BrokeMez "#*#has been awakened by |${Me.CleanName}|."
#event Avatar "[MQ2] Using Divine Avatar!"
#event Hammer "[MQ2] Using Celestial Hammer!"
#event ToggleMeleMode "[MQ2] Toggling MeleMode"
#event ToggleRaidMode "[MQ2] Toggling RaidMode"
#event ToggleHealOnlyFD "[MQ2] Toggling HealOnlyFD"
#event ToggleTopOffTank "[MQ2] Toggling TopOffTank"
#event ToggleUseMount "[MQ2] Toggling UseMount"
#event ToggleUseYaulp "[MQ2] Toggling UseYaulp"
#event ToggleUseSelfBuffs "[MQ2] Toggling UseSelfBuffs"
#event ToggleManaReport "[MQ2] Toggling ManaReport"
#event SetTagAlong "[MQ2] Setting TagAlong to #1#"
#event TurnTagAlongOff "[MQ2] Turning TagAlong Off"
#event SetMainTankerHealPoint "[MQ2] New HealPoint for MT #1#"
#event NewMT "[MQ2] New Main Tank!"
#event ToggleTargetDAPoint "[MQ2] New TargetDAPoint #1#"
#event ToggleTankHealPoint "[MQ2] New TankHealPoint #1#"
#event ToggleCasterHealPoint "[MQ2] New CasterHealPoint #1#"
#event ToggleShamanHealPoint "[MQ2] New ShamanHealPoint #1#"
#event ToggleDivineArbPoint "[MQ2] New DivineArbPoint #1#"
#event ToggleSelfHealPoint "[MQ2] New SelfHealPoint #1#"
#event ToggleTankHealPointCRGoing "[MQ2] New TankHealPointCRGoing #1#"
#event ToggleCasterHealPointCRGoing "[MQ2] New CasterHealPointCRGoing #1#"
#event ToggleGroupHealPoint "[MQ2] New GroupHealPoint #1#"
#event ToggleSelfDAPoint "[MQ2] New SelfDAPoint #1#"
#event ToggleSelfDivineArbPoint "[MQ2] New SelfDivineArbPoint #1#"
#event ToggleTopOffRange "[MQ2] New TopOffRange #1#"
#event ToggleCancelPct "[MQ2] New CancelPercentage #1#"
#event SetFDHealDist "[MQ2] New FDHealDistance #1#"
#event SetTagDist "[MQ2] Setting Tag Along Distance #1#"
#event DispaySettings "[MQ2] Current Settings"
#event SetAnchor "[MQ2] Setting Anchor"
#event GroupCombo "[MQ2] Buffing the group with Combo Buff!"
#event GroupSymbol "[MQ2] Buffing the group with Symbol!"
#event GroupSpellHaste "[MQ2] Buffing the group with Spell Haste!"
#event SingleCombo "[MQ2] Combo Buff to #1#"
#event SingleSymbol "[MQ2] Symbol to #1#"
#event SingleSpellHaste "[MQ2] Spell Haste to #1#"
#event SingleACBuff "[MQ2] ACBuff to #1#"

Sub Event_ImHit
   /varset HitTimer 100
/return

Sub Event_RageOn
/if (${MeleMode}) {
   /varset Rage TRUE
   /varset MeleMode FALSE
   /timed 110 /varset Rage FALSE
   /timed 110 /varset MeleMode TRUE
}
/return

Sub Event_BrokeMez

/docommand /timed ${Math.Calc[${Math.Rand[60]}+30]} /g Sorry!!
/varset MeleMode FALSE
/timed 1200 /varset MeleMode TRUE

/return

Sub Event_Avatar
   /if (${Bool[${Me.AltAbility[Divine Avatar]}]}) {
      /if (${Me.AltAbilityReady[Divine Avatar]}) {
         /if (${UseYaulp}) {
            /varset UseYaulp FALSE
            /timed 500 /varset UseYaulp TRUE
         }
         /call CastSpell "Divine Avatar! Also Known as SUPER YAULP!" "Divine Avatar" alt ""
   }
/return

Sub Event_Hammer
   /if (${Bool[${Me.AltAbility[Celestial Hammer]}]}) {
      /if (${Me.AltAbilityReady[Celestial Hammer]}) /call CastSpell "Celestial Hammer! Hammer o' the DPS Cle!" "Celestial Hammer" alt ""
   }
/return

Sub Event_ToggleMeleMode
/if (${MeleMode}) {
   /varset MeleMode FALSE
   /ini MyCleric_${Me.Name}_${Me.Name}.ini Modes MeleMode FALSE
   /echo MeleMode Now OFF!
   /attack off
} else {
   /varset MeleMode TRUE
   /ini MyCleric_${Me.Name}.ini Modes MeleMode TRUE
   /echo MeleMode Now ON!
   /varset UseYaulp TRUE
   /ini MyCleric_${Me.Name}.ini Modes UseYaulp TRUE
   /echo UseYaulp Now ON!
   /varset UseMount FALSE
   /ini MyCleric_${Me.Name}.ini Modes UseMount FALSE
   /echo UseMount Now OFF!
   /if (${Bool[${Me.Buff[Summon Drogmor]}]}) {
      /notify BuffWindow Buff${Math.Calc[${Me.Buff[Summon Drogmor].ID}-1].Int} leftmouseup
   } else /if (${Bool[${Me.Buff[Summon Horse]}]}) {
      /notify BuffWindow Buff${Math.Calc[${Me.Buff[Summon Horse].ID}-1].Int} leftmouseup
   }
}
/return

Sub Event_ToggleRaidMode
/if (${RaidMode}) {
   /varset RaidMode FALSE
   /ini MyCleric_${Me.Name}.ini Modes RaidMode FALSE
   /echo RaidMode Now OFF!
   /echo GroupMode is ON!
} else {
   /varset RaidMode TRUE
   /ini MyCleric_${Me.Name}.ini Modes RaidMode TRUE
   /varset TankID 0
   /echo RaidMode Now ON!
   /echo GroupMode is OFF!
}
/return

Sub event_ToggleHealOnlyFD
/if (${HealFD}) {
   /varset HealFD FALSE
   /ini MyCleric_${Me.Name}.ini Modes HealOnlyFD FALSE
   /echo HealOnlyFD Now OFF!
} else {
   /varset HealFD TRUE
   /ini MyCleric_${Me.Name}.ini Modes HealOnlyFD TRUE
   /echo HealOnlyFD Now ON!
}
/return

Sub Event_ToggleTopOffTank
/if (${TopOff}) {
   /varset TopOff FALSE
   /ini MyCleric_${Me.Name}.ini Modes TopOffTank FALSE
   /echo TopOffTank Now OFF!
} else {
   /varset TopOff TRUE
   /ini MyCleric_${Me.Name}.ini Modes TopOffTank TRUE
   /echo TopOffTank Now ON!
}
/return

Sub Event_ToggleUseMount
/if (${UseMount}) {
   /varset UseMount FALSE
   /ini MyCleric_${Me.Name}.ini Modes UseMount FALSE
   /echo UseMount Now OFF!
   /if (${Bool[${Me.Buff[Summon Drogmor]}]}) {
      /notify BuffWindow Buff${Math.Calc[${Me.Buff[Summon Drogmor].ID}-1].Int} leftmouseup
   } else /if (${Bool[${Me.Buff[Summon Horse]}]}) {
      /notify BuffWindow Buff${Math.Calc[${Me.Buff[Summon Horse].ID}-1].Int} leftmouseup
   }
} else {
   /varset UseMount TRUE
   /ini MyCleric_${Me.Name}.ini Modes UseMount TRUE
   /echo UseMount Now ON!
   /varset UseYaulp FALSE
   /ini MyCleric_${Me.Name}.ini Modes UseYaulp FALSE
   /echo UseYaulp Now OFF!
   /varset MeleMode FALSE
   /ini MyCleric_${Me.Name}.ini Modes MeleMode FALSE
   /echo MeleMode Now OFF!
   /attack off
}
/return

Sub Event_ToggleUseYaulp
/if (${UseYaulp}) {
   /varset UseYaulp FALSE
   /ini MyCleric_${Me.Name}.ini Modes UseYaulp FALSE
   /echo UseYaulp Now OFF!
} else {
   /varset UseYaulp TRUE
   /ini MyCleric_${Me.Name}.ini Modes UseYaulp TRUE
   /echo UseYaulp Now ON!
   /varset UseMount FALSE
   /ini MyCleric_${Me.Name}.ini Modes UseMount FALSE
   /echo UseMount Now OFF!
   /if (${Bool[${Me.Buff[Summon Drogmor]}]}) {
      /notify BuffWindow Buff${Math.Calc[${Me.Buff[Summon Drogmor].ID}-1].Int} leftmouseup
   } else /if (${Bool[${Me.Buff[Summon Horse]}]}) {
      /notify BuffWindow Buff${Math.Calc[${Me.Buff[Summon Horse].ID}-1].Int} leftmouseup
   }
}
/return

Sub Event_ToggleUseSelfBuffs
/if (${UseSelfBuffs}) {
   /varset UseSelfBuffs FALSE
   /ini MyCleric_${Me.Name}.ini Modes UseSelfBuffs FALSE
   /echo UseSelfBuffs Now OFF!
} else {
   /varset UseSelfBuffs TRUE
   /ini MyCleric_${Me.Name}.ini Modes UseSelfBuffs TRUE
   /echo UseSelfBuffs Now ON!
}
/return

Sub Event_ToggleManaReport
/if (${ManaReport}) {
   /varset ManaReport FALSE
   /ini MyCleric_${Me.Name}.ini Modes ManaReport FALSE
   /echo ManaReport Now OFF!
} else {
   /varset ManaReport TRUE
   /ini MyCleric_${Me.Name}.ini Modes ManaReport TRUE
   /echo ManaReport Now ON!
}
/return

Sub event_SetTagAlong(string Line,string Person)
   /if (${NearestSpawn[pc ${Person}].Distance}>100 || !${Bool[${Spawn[pc ${Person}]}]}) {
      /echo You are not near such a person!
      /return
   } else {
      /varset TagAlongID ${NearestSpawn[pc ${Person}].ID}
      /varset TagAlong TRUE
      /varset AnchorX NULL
      /varset AnchorY NULL
      /varset Anchor FALSE
      /echo You will now try to follow ${Person} around!
   }
/return

Sub event_TurnTagAlongOff
   /call TagOff
/return

Sub Event_SetMainTankerHealPoint(string Line,int NewPct)
/varset MTHP ${NewPct}
/return

Sub Event_NewMT
/if (${Target.Distance}<110) {
   /if (${Target.Type.Equal[PC]}) {
      /varset TankName ${Target.CleanName}
      /varset TankID ${Target.ID}
      /echo ${TankName} with ID ${TankID} is new MT for group!
   } else {
      /echo That target is not a PC!
   }
} else {
   /echo That person is not close enough!
}
/return

Sub Event_Exp
/if (${ManaReport}) /docommand /timed ${Math.Calc[${Math.Rand[70]}+30]} /g ${Me.PctMana}m
/return

Sub event_ToggleTargetDAPoint(string Line,int NewPct)
/varset TDA ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages TargetDAPoint ${NewPct}
/return

Sub event_ToggleTankHealPoint(string Line,int NewPct)
/varset THP ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages TankHealPoint ${NewPct}
/return

Sub event_ToggleCasterHealPoint(string Line,int NewPct)
/varset CHP ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages CasterHealPoint ${NewPct}
/return

Sub event_ToggleShamanHealPoint(string Line,int NewPct)
/varset ShmHP ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages ShamanHealPoint ${NewPct}
/return

Sub event_ToggleDivineArbPoint(string Line,int NewPct)
/varset DArb ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages DivineArbPoint ${NewPct}
/return

Sub event_ToggleSelfHealPoint(string Line,int NewPct)
/varset SelfHP ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages SelfHealPoint ${NewPct}
/return

Sub event_ToggleTankHealPointCRGoing(string Line,int NewPct)
/varset THPcrg ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages TankHealPointCRGoing ${NewPct}
/return

Sub event_ToggleCasterHealPointCRGoing(string Line,int NewPct)
/varset CHPcrg ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages CasterHealPointCRGoing ${NewPct}
/return

Sub event_ToggleGroupHealPoint(string Line,int NewPct)
/varset GroupCR ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages GroupHealPoint ${NewPct}
/return

Sub event_ToggleSelfDAPoint(string Line,int NewPct)
/varset DAPoint ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages SelfDAPoint ${NewPct}
/return

Sub event_ToggleSelfDivineArbPoint(string Line,int NewPct)
/varset SelfDArb ${NewPct}
/ini MyCleric_${Me.Name}.ini Heal_Percentages SelfDivineArbPoint ${NewPct}
/return

Sub event_ToggleTopOffRange(string Line,int NewPct)
/varset TopOffRng ${NewPct}
/ini MyCleric_${Me.Name}.ini Misc TopOffRange ${NewPct}
/return

Sub event_ToggleCancelPct(string Line,int NewPct)
/varset CancelPct ${NewPct}
/ini MyCleric_${Me.Name}.ini Misc CancelPct ${NewPct}
/return

Sub event_SetFDHealDist(string Line,int NewDist)
/varset FDHealDist ${NewDist}
/ini MyCleric_${Me.Name}.ini Misc FDHealDistance ${NewDist}
/return

Sub event_SetTagDist(string Line,int NewDist)
/varset TagDist ${NewDist}
/ini MyCleric_${Me.Name}.ini Misc TagAlongDistance ${NewDist}
/return

Sub event_SetAnchor
/if (${Anchor}) {
   /varset AnchorX NULL
   /varset AnchorY NULL
   /varset Anchor FALSE
   /echo Deleting Anchor..
} else {
   /if (${TagAlong}) {
      /echo Turning off TagAlong to set Anchor
      /varset TagAlongID 0
      /varset TagAlong FALSE
   }
   /varset Anchor TRUE
   /varset AnchorX ${Me.X.Int}
   /varset AnchorY ${Me.Y.Int}
   /echo Anchor Location: ${AnchorX}, ${AnchorY}
}   
/return

Sub event_GroupCombo
/if (${GroupCombo.Equal["Hand of Conviction"]} || ${ComboBuff.Equal[Conviction]}) {
   /target myself
   /delay 1s ${Target.ID}==${Me.ID}
   /call CastSpell "Conviction Inc" "${GroupCombo}" gem${GroupComboGem} ""
} else {
   /for g 0 to ${Group}
      /target ID ${${g}].ID}
      /delay 1s ${Target.ID}==${Group.Member[${g}].ID}
      /if (${Me.Gem[${ComboGem}]}].Name.NotEqual["${ComboBuff}"]}) /memspell ${ComboGem} "${ComboBuff}"
     :Waitforgem
      /if (!${Me.SpellReady["${ComboBuff}"]}) /goto :Waitforgem
      /call Cast "${ComboBuff}" gem${ComboGem}
   /next g
}
/return

Sub event_GroupSymbol
/if (${GroupSymbol.Equal[Balikor's Mark]} || ${SymbolBuff.Equal[Symbol of Kazad]}) {
   /target myself
   /delay 1s ${Target.ID}==${Me.ID}
   /call CastSpell "Symbol Inc" "${GroupSymbol}" gem${GroupSymbolGem} ""
} else {
   /for g 0 to ${Group}
      /target ID ${Group.Member[${g}].ID}
      /delay 1s ${Target.ID}==${Group.Member[${g}].ID}
      /if (${Me.Gem[${SymbolBuffGem}]}.Name.NotEqual["${SymbolBuff}"]}) /memspell ${SymbolBuffGem} "${SymbolBuff}"
     :Waitforgem
      /if (!${Me.SpellReady["${SymbolBuff}"]}) /goto :Waitforgem
      /if (${Group.Member[${g}].Class.ShortName.Equal[PAL]}) {
         /call Cast "${SymbolBuff}" gem${SymbolBuffGem}
         /goto :NextG
      }
      /call Cast "${SymbolBuff}" gem${SymbolBuffGem}
  :NextG
   /next g
}
/return

Sub event_GroupSpellHaste
/if (${GroupSH.Equal["Aura of Devotion"]} || ${SpellHaste.Equal["Blessing of Reverence"]}) {
   /target myself
   /delay 1s ${Target.ID}==${Me.ID}
   /call CastSpell "Spell Haste Inc" "${GroupSH}" gem${GroupSHGem} ""
} else {
   /for g 0 to ${Group}
      /if (${Group.Member[${g}].Class.ShortName.Equal[MNK]} || ${Group.Member[${g}].Class.ShortName.Equal[WAR]} || ${Group.Member[${g}].Class.ShortName.Equal[ROG]} || ${Group.Member[${g}].Class.ShortName.Equal[BER]}) /goto :NextG
      /target ID ${Group.Member[${g}].ID}
      /delay 1s ${Target.ID}==${Group.Member[${g}].ID}
      /if (${Me.Gem[${SpellHasteGem}]}].Name.NotEqual["${SpellHaste}"]}) /memspell ${SpellHasteGem} "${SpellHaste}"
     :Waitforgem
      /if (!${Me.SpellReady["${SpellHaste}"]}) /goto :Waitforgem
      /call Cast "${SpellHaste}" gem${SpellHasteGem}
  :NextG
   /next g
}
/return

Sub event_SingleCombo(string Line,string Name)
/if (${Bool[${Spawn[${Name}]}]}) {
   /if (${Spawn[${Name}].Distance}<110) {
      /target PC ${Name}
      /delay 1s ${Target.CleanName.Equal[${Name}]}
      /call Cast "${ComboBuff}" gem${ComboGem}
   } else {
      /echo ${Name} is not in range
   }
} else {
   /echo ${Name} is no in zone
}
/return

Sub event_SingleSymbol(string Line,string Name)
/if (${Bool[${Spawn[${Name}]}]}) {
   /if (${Spawn[${Name}].Distance}<110) {
      /target PC ${Name}
      /delay 1s ${Target.CleanName.Equal[${Name}]}
      /call Cast "${SymbolBuff}" gem${SymbolBuffGem}
   } else {
      /echo ${Name} is not in range
   }
} else {
   /echo ${Name} is no in zone
}
/return

Sub event_SingleSpellHaste(string Line,string Name)
/if (${Bool[${Spawn[${Name}]}]}) {
   /if (${Spawn[${Name}].Distance}<110) {
      /target PC ${Name}
      /delay 1s ${Target.CleanName.Equal[${Name}]}
      /call Cast "${SpellHaste}" gem${SpellHasteGem}
   } else {
      /echo ${Name} is not in range
   }
} else {
   /echo ${Name} is no in zone
}
/return

Sub event_SingleACBuff(string Line,string Name)
/if (${Bool[${Spawn[${Name}]}]}) {
   /if (${Spawn[${Name}].Distance}<110) {
      /target PC ${Name}
      /delay 1s ${Target.CleanName.Equal[${Name}]}
      /call Cast "${ACBuff}" gem${ACBuffGem}
   } else {
      /echo ${Name} is not in range
   }
} else {
   /echo ${Name} is no in zone
}
/return

Sub event_DispaySettings
/echo *************************
/echo Main Tank Heal Point: ${MTHP}
/echo Target DA Point: ${TDA}
/echo Tank Heal Point: ${THP}
/echo Caster Heal Point: ${CHP}
/echo Shaman Heal Point: ${ShmHP}
/echo Divine Arbitration Point: ${DArb}
/echo SelfHealPoint: ${SelfHP}
/echo Tank Heal Point CR Going: ${THPcrg}
/echo Caster Heal Point CR Going: ${CHPcrg}
/echo Group Heal Point: ${GroupCR}
/echo Self DA Point: ${DAPoint}
/echo Self Divine Arb Point: ${SelfDArb}
/echo Top Off Range: ${TopOffRng}
/echo Cancel Percentage: ${CancelPct}
/echo Mele Mode: ${If[${MeleMode},ON,OFF]}
/echo Heal Only FD: ${If[${HealFD},ON,OFF]}
/echo Top Off: ${If[${TopOff},ON,OFF]}
/echo Use Yaulp: ${If[${UseYaulp},ON,OFF]}
/echo Use Self Buffs ${If[${UseSelfBuffs},ON,OFF]}
/echo Use Click Buffs: ${If[${UseClickBuffs},ON,OFF]}
/if (${Anchor}) /echo Anchor Location: ${AnchorX}, ${AnchorY}
/if (${TagAlong}) /echo TagAlong set to ${Spawn[${TagAlongID}].CleanName}
/echo Raid/Group Mode: ${If[${RaidMode},Raid,Group]}
/echo ***************************
/return

MyClericSubs.inc
PHP:
|MyClericSubs.inc
|v0.07
Sub GroupStatus
   /varset GA FALSE
   /varset GH FALSE
   /varset GroupHeal 0
   /varset WH 0
   /for g ${Group} downto 0
      /if (${Group.Member[${g}].PctHPs}<${GroupCR}) {
         /if (${Group.Member[${g}].Distance}<115) {
            /if (${Group.Member[${g}].Type.Equal[PC]}) /varcalc GroupHeal ${GroupHeal}+1
         }
      }
   /next g
   /for g 1 to ${Group}
      /if (${Group.Member[${g}].PctHPs}>95) /goto :NextG
      /if (${Group.Member[${g}].ID}==${TankID}) /goto :NextG
      /if (${Group.Member[${g}].Distance}>230) /goto :NextG
      /if (${Group.Member[${g}].Type.Equal[NULL]}) /goto :NextG
      /if (${Group.Member[${g}].Type.NotEqual[PC]}) /goto :NextG
      /if (${HealFD}) {
         /if (${Group.Member[${g}].Class.ShortName.Equal[MNK]} || ${Group.Member[${g}].Class.ShortName.Equal[SHD]}) {
            /if ((${Group.Member[${g}].Distance}>${FDHealDist}) || (${Group.Member[${g}].Distance}<${FDHealDist} && !${Group.Member[${g}].LineOfSight})) {
               /if (${Group.Member[${g}].State.Equal[FEIGN]}) {
                  /varset WH ${Group.Member[${g}].ID}
                  /goto :NextG
               }
               /goto :NextG
            }
         }
      }
      /if (${Group.Member[${g}].Class.ShortName.Equal[SHM]}) {
         /if (${Group.Member[${g}].PctHPs}>=${ShmHP}) /goto :NextG
      }
      /if (${WH}==0) /varset WH ${Group.Member[${g}].ID}
      /if (${WH}>0) {
         /if (${Group.Member[${g}].PctHPs}<${Spawn[${WH}].PctHPs}) /varset WH ${Group.Member[${g}].Spawn.ID}
      }
     :NextG
   /next g
   /if (${GroupHeal}>=4) {
      /if (!${CRGoing}) /varset GH TRUE
   }
   /if (${WH}>0) {
      /if (${TankList.Find[${Spawn[${WH}].Class.ShortName}]}) {
         /if (${Spawn[${WH}].PctHPs}<${THP}) /varset GA TRUE
      } else /if (${CasterList.Find[${Spawn[${WH}].Class.ShortName}]}) {
         /if (${Spawn[${WH}].PctHPs}<${CHP}) /varset GA TRUE
      }
   }
/return

Sub TankStatus
   /varset TA FALSE
   /if (${NearestSpawn[${TankName}].ID}==${TankID}) /varset TankAvail TRUE
   /if (${NearestSpawn[${TankName}].ID}!=${TankID}) {
      /if (${Bool[${Spawn[${TankName}]}]}) {
         /if (${NearestSpawn[${TankName}].Distance}<220) {
            /varset TankID ${NearestSpawn[${TankName}].ID}
            /echo Tank Reacquired! If ${TankName} with ID ${TankID} is not the tank please restart macro!
            /varset TankAvail TRUE
         } else {
            /varset TankAvail FALSE
         }
      } else {
         /varset TankAvail FALSE
      }
   }
   /if (!${TankAvail}) {
      /if (${TankSpam}) {
         /echo No Tank Currently Available!
         /varset TankSpam FALSE
         /timed 600 /varset TankSpam TRUE
      }
   }
   /if (${TankAvail}) {
      /if (${Spawn[${TankID}].PctHPs}<${MTHP}) /varset TA TRUE
   }
/return

Sub CheckBot
   /doevents ImHit
   /if (${HitTimer}>0) {
      /attack off
      /stick off
      /target ID ${NearestSpawn[NPC].ID}
      /delay 8 ${Bool[${Me.TargetOfTarget}]}
      /if (${Me.TargetOfTarget.CleanName.Equal[${Me.CleanName}]}) {
         /if (${Bool[${Me.AltAbility["Divine Retribution"]}]}) {
            /if (${Me.AltAbilityReady["Divine Retribution"]}) /call CastSpell "--Divine Retribution--" "Divine Retribution" alt ""
         }
      }
      /if (${Me.PctHPs}<${SelfDArb}) {
         /if (${Bool[${Me.AltAbility["Divine Arbitration"]}]}) {
            /if (${Me.AltAbilityReady["Divine Arbitration"]}) {
               /call CastSpell "${DArbMsg}" "Divine Arbitration" alt ""
               /if (${castReturn.Equal[CAST_SUCCESS]}) /delay 7
            }
         }
      }
|The DA Routine
      /if (${Me.PctHPs}<${DAPoint}) {
         /if (${Bool[${Me.Buff["Sacred Barrier"]}]}) /goto :SkipDA
         /if (${Bool[${Me.Buff["Divine Aura"]}]}) /goto :SkipDA
         /if (${Bool[${Me.Buff["Divine Barrier"]}]}) /goto :SkipDA
         /if (${Bool[${Me.Buff["Divine Barrier"]}]}) /goto :SkipDA
         /if (${Bool[${Me.AltAbility["Bestow Divine Aura"]}]}) {
            /if (${Me.AltAbilityReady["Bestow Divine Aura"]}) {
               /target myself
               /delay 1s ${Target.ID}==${Me.ID}
               /call CastSpell "${SelfDAMsg}" "Bestow Divine Aura" alt ""
               /goto :SkipDA
            }
         }
         /if (${Bool[${Me.AltAbility["Sanctuary"]}]}) {
            /if (${Me.AltAbilityReady["Sanctuary"]}) {
               /call CastSpell "Using Sanctuary!" "Sanctuary" alt ""
               /goto :SkipDA
            }
         }
         /if (${Me.SpellReady["Divine Aura"]}) {
            /call CastSpell "${SelfDAMsg}" "Divine Aura" spell ""
         } else /if (${Me.SpellReady["Divine Barrier"]}) {
            /call Cast "${SelfDAMsg}" "Divine Barrier" spell ""
         }
     :SkipDA
      }
      /if (${UseClickBuffs}) {
         /if (${Me.PctHPs}<${Math.Calc[${DAPoint}/2].Int}) /call ClickBuffs
      }
   }
  :SelfHealLoop
   /if (${Bool[${Me.Buff["Sacred Barrier"]}]} || ${Bool[${Me.Buff["Divine Aura"]}]} || ${Bool[${Me.Buff["Divine Barrier"]}]}) {
      /call DACheckGroup
      /goto :SkipSelfHeal
   }
   /target myself
   /delay 1s ${Target.ID}==${Me.ID}
   /call CastSpell "${RemedyMsg}" "${CasterHS}" spell ""
  :SkipSelfHeal
   /if (${Math.Calc[${Spawn[${TankID}].PctHPs}*2]}<${Me.PctHPs}) /return
   /varset SA TRUE
   /if (${Bool[${Me.Buff["Sanctuary"]}]} && ${Me.PctHPs}<${SelfHP}) /goto :SelfHealLoop
/return

Sub TankAction
   /target PC ${Spawn[${TankID}]}
   /delay 1s ${Target.ID}==${TankID}
   /if (${Target.ID}==${TankID}) {
      /if (${Target.Distance}<220) {
         /if (${Target.Distance}<110) {
            /if (${Target.PctHPs}<${Math.Calc[${MTHP}*0.35]}) {
               /if (${Bool[${Me.AltAbility["Divine Arbitration"]}]}) {
                  /if (${Me.AltAbilityReady["Divine Arbitration"]}) {
                     /call CastSpell "${DArbMsg}" "Divine Arbitration" alt ""
                     /varset ETA FALSE
                     /return
                  }
               }
            }
            /if (${Target.PctHPs}<=${Math.Calc[${MTHP}*0.6]} || ${ETA}) {
               /call CastSpell "${LightMsg}" "${TankHS}" spell CheckHP
               /varset ETA FALSE
               /return
            }
            /call CastSpell "${CHMsg}" "Complete Healing" spell CheckAll
         } else {
            /call CastSpell "${OORMsg}" "${CasterHS}" spell CheckHP
            /varset ETA FALSE
         }
      }
   }
/return

Sub GroupAction
   /if (${GH}) {
      /if (${Bool[${Me.AltAbility["${CRSpell}"]}]}) {
         /if (${Me.AltAbilityReady["${CRSpell}"]}) {
            /call CastSpell "${CRMsg}" "${CRSpell}" alt ""
            /if (${castReturn.Equal[CAST_SUCCESS]}) {
               /varset CRGoing TRUE
               /timed 480 /varset CRGoing FALSE
               /timed 480 /varset THP ${Ini[MyCleric_${Me.Name}].ini,Heal_Percentages,TankHealPoint]}
               /timed 480 /varset CHP ${Ini[MyCleric_${Me.Name}].ini,Heal_Percentages,CasterHealPoint]}
            }
         } else {
         /call CastSpell "${GHealMsg}" "${GHSpell}" spell CheckHP
         }
      }
   }
   /if (${CRGoing}) {
      /varset CHP ${CHPcrg}
      /varset THP ${THPcrg}
   }
   /if (${Spawn[${WH}].PctHPs}<${TDA}) {
      /if (${Bool[${Me.AltAbility["Bestow Divine Aura"]}]}) {
         /if (${Me.AltAbilityReady["Bestow Divine Aura"]}) {
            /if (${Spawn[${WH}].Distance}<100) {
               /if (${Spawn[${WH}].Type.Equal[PC]}) {
                  /target ID ${Spawn[${WH}].ID}
                  /delay 1s ${Target.ID}==${Spawn[${WH}].ID}
                  /call CastSpell "${TDAMsg}" "Bestow Divine Aura" alt ""
                  /if (${castReturn.Equal[CAST_SUCCESS]}) {
                     /if (${Bool[${Me.AltAbility[Divine Arbitration]}]}) {
                        /if (${Me.AltAbilityReady["Divine Arbitration"]}) /call CastSpell "${DArbMsg}" "Divine Arbitration" alt ""
                     }
                  }
               }
            }
         }
      }
   }
   /if (${Spawn[${WH}].PctHPs}<${DArb}) {
      /if (${Spawn[${WH}].ID} != ${TankID}) {
         /if (${Bool[${Me.AltAbility["Divine Arbitration"]}]}) {
            /if (${Me.AltAbilityReady["Divine Arbitration"]}) {
               /if (${Spawn[${WH}].Distance}<100) {
                  /if (${Spawn[${WH}].Type.Equal[PC]}) {
                     /call CastSpell  "${DArbMsg}" "Divine Arbitration" alt ""
                     /return
                  }
               }
            }
         }
      }
   }
   /if (${HealFD}) {
      /if (${Spawn[${WH}].Class.ShortName.Equal[MNK]}) {
         /if ((${Spawn[${WH}].Distance}>${FDHealDist}) || (${Spawn[${WH}].Distance}<${FDHealDist} && !${Spawn[${WH}].LineOfSight})) {
            /if (${Spawn[${WH}].PctHPs}<${CHP}) {
               /if (${Spawn[${WH}].Distance}<230) {
                  /target ID ${WH}
                  /delay 1s ${Target.ID}==${WH}
                  /call CastSpell "${RemedyMsg}" "${CasterHS}" spell CheckFD
               }
            }
         }
         /return
      }
      /if (${Spawn[${WH}].Class.ShortName.Equal[SHD]}) {
         /if ((${Spawn[${WH}].Distance}>${FDHealDist}) || (${Spawn[${WH}].Distance}<${FDHealDist} && !${Spawn[${WH}].LineOfSight})) {
            /if (${Spawn[${WH}].PctHPs}<${THP}) {
               /target ID ${WH}
               /delay 1s ${Target.ID}==${WH}
               /if (${Spawn[${WH}].Distance}<110) {
                  /call CastSpell "${LightMsg}" "${TankHS}" spell CheckFD
               } else /if (${Spawn[${WH}].Distance}<230) {
                  /call CastSpell "${RemedyMsg}" "${CasterHS}" spell CheckFD
               }
            }
         }
         /return
      }
   }
   /if (${CasterList.Find[${Spawn[${WH}].Class.ShortName}]}) {
      /if (${Spawn[${WH}].PctHPs}<${CHP}) {
         /if (${Spawn[${WH}].Distance}<230) {
            /target ID ${WH}
            /delay 1s ${Target.ID}==${WH}
            /call CastSpell "${RemedyMsg}" "${CasterHS}" spell CheckHP
         }
      }
      /return
   }
   /if (${TankList.Find[${Spawn[${WH}].Class.ShortName}]}) {
      /if (${Spawn[${WH}].PctHPs}<${THP}) {
         /if (${Spawn[${WH}].Distance}<115) {
            /target ID ${WH}
            /delay 1s ${Target.ID}==${WH}
            /call CastSpell "${LightMsg}" "${TankHS}" spell CheckHP
         } else /if (${Spawn[${WH}].Distance}<230) {
            /target ID ${WH}
            /delay 1s ${Target.ID}==${WH}
            /call CastSpell "${RemedyMsg}" "${CasterHS}" spell CheckHP
         }
      }
   }
/return

Sub CheckMana
/if (${Me.PctMana}<15) {
   /if (${LomSpam}) {
      /g Out of Mana!! Need to med.
      /varset LomSpam FALSE
      /timed 500 /varset LomSpam TRUE
   }
}
/if (${Me.PctMana}<30) {
   /if (${LomSpam}) {
      /g Low On Mana ${Me.PctMana}m
      /varset LomSpam FALSE
      /timed 500 /varset LomSpam TRUE
   }
}
/return


Sub TopOff
   /if (${NearestSpawn[NPC].Distance}>${TopOffRng}) {
      /if ((${Spawn[${TankID}].PctHPs}<90) && (${Spawn[PC ${TankID}].ID})) {
         /if (${Me.PctMana}>85) {
            /target ${Spawn[${TankID}]}
            /delay 1s ${Target.ID}==${TankID}
            /if (${Target.ID}==${TankID}) /call CastSpell "${CHMsg}" "Complete Healing" spell CheckAll
         }
      }
   }
/return

Sub CheckMele
/if (${TA} || ${GA}) {
   /if (${Me.Combat}) /attack off
   /if (${Stick.Status.Equal[ON]}) /stick off
   /delay 5 !${Me.Moving}
   /delay 3
}
/return

Sub Mele
/if (!${Bool[${Spawn[${MeleTarID}]}]} || ${Spawn[${MeleTarID}].Type.Equal[Corpse]}) /varset MeleTar FALSE
/if (${MeleTar}) {
   /if (!${Me.Combat}) {
      /target ID ${MeleTarID}
      /delay 1s ${Target.ID}==${MeleTarID}
      /if (${Target.ID}!=${MeleTarID}) /return
      /if (${Target.PctHPs}<${AtkPoint}) {
         /stick 55%
         /attack on
      }
   }
   /if (${Me.Combat}) {
      /if (${InvSlot[Offhand].Item.Type.Equal[Shield]} && ${Me.AbilityReady[Bash]}) /doability Bash
   }
}
/if (!${MeleTar} && ${Anchor}) {
   /if (${Math.Distance[${AnchorY}, ${AnchorX}]}>30) /call MoveToAnchor
}
/if (${MeleTimer}) {
   /if (!${MeleTar}) {
      /if (${NearestSpawn[NPC].Distance}<100) {
         /if (${Math.Distance[${NearestSpawn[NPC].Y},${NearestSpawn[NPC].X}:${Spawn[${TankID}].Y},${Spawn[${TankID}].X}]}<${NearestSpawn[NPC].MaxRange}) {
            /if (${Stick.Status.Equal[ON]}) /stick off
            /assist ${Spawn[${TankName}].CleanName}
            /delay 15 ${Target.Type.Equal[NPC]}
            /if (${Target.Type.Equal[NPC]}) {
               /varset MeleTarID ${Target.ID}
               /varset MeleTar TRUE
            }
         }
      } else {
         /varset MeleTimer FALSE
         /timed 50 /varset MeleTimer TRUE
         }
      }
   }
}
/return

Sub ClickRods
/if ( ${Cursor.Name.Equal[Rod of Mystical Transvergance]} ) /autoinventory
/if ( ${FindItem[=Rod of Mystical Transvergance].InvSlot} && !${RodTimer} && ${Me.PctMana}<95) {
  /call Cast "Rod of Mystical Transvergance" item
  /varset RodTimer 310s
}
/return

Sub CheckSelfBuffs



/if (!${RaidMode}) {
   /if (${Spawn[${TankID}].PctHPs}<95) /return
}

/if ( (!${Me.Buff["Armor of the Pious"].ID}) && (!${Me.Buff["Armor of the Zealot"].ID}) && (!${Me.Buff["Blessing of Steeloak"].ID}) && (!${Me.Buff["Steeloak Skin"].ID}) && (!${Me.Buff["Protection of the Nine"].ID}) && (!${Me.Buff["Blessing of the Nine"].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})) {
   /target myself
   /if (${Target.ID}==${Me.ID}) {
      /call Cast "${ArmorBuff}" gem${ArmorBuffGem}
   }
}




/if ((!${Me.Buff["Hand of Conviction"].ID}) && (!${Me.Buff["Conviction"].ID}) && (!${Me.Buff["Hand of Virtue"].ID}) && (!${Me.Buff["Virtue"].ID}) && (!${Me.Buff["Blessing of Steeloak"].ID}) && (!${Me.Buff["Steeloak Skin"].ID}) && (!${Me.Buff["Protection of the Nine"].ID}) && (!${Me.Buff["Blessing of the Nine"].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})) {
   /target myself
   /if (${Target.ID}==${Me.ID}) {
      /call Cast "${ComboBuff}" gem${ComboBuffGem}
   }
}

/if ((!${Me.Buff["Aura of Devotion"].ID}) && (!${Me.Buff[Aura of Reverence].ID}) && (!${Me.Buff[Blessing of Devotion].ID}) && (!${Me.Buff["Blessing of Reverence"].ID})) {
   /target myself
   /if (${Target.ID}==${Me.ID}) {
      /call Cast "${GroupSH}" gem${GroupSHGem}
   }
}

/return

Sub MoveToAnchor
/varset AnchorHeading ${Me.Heading.DegreesCCW.Int}
:AnchorMoveLoop
/face nolook loc ${AnchorY}, ${AnchorX}
/if (${Math.Distance[${AnchorY}, ${AnchorX}]}>11) {
   /keypress forward hold
} else {
   /keypress forward
   /face Heading ${AnchorHeading}
   /return
   }
/goto :AnchorMoveLoop
/return

Sub CheckTarget
/if (${Target.Type.NotEqual[PC]}) /return
/if (${Target.Distance}>230) /return
/if (${Target.Class.ShortName.Equal[SHM]}) {
   /if (${Target.PctHPs}>=${ShmHP}) /return
}
/if (${HealFD}) {
   /if ((${Target.Distance}>${FDHealDist}) || (${Target.Distance}<${FDHealDist} && !${Target.LineOfSight})) {
      /if (${Target.Class.ShortName.Equal[MNK]}) {
         /if (${Target.State.NotEqual[Feign]}) /return
         /if (${Target.PctHPs}<${CHP}) /call CastSpell "${RemedyMsg}" "${CasterHS}" spell CheckFD
         /return
      }
      /if (${Target.Class.ShortName.Equal[SHD]}) {
         /if (${Target.State.NotEqual[Feign]}) /return
         /if (${Target.Distance}<110) {
            /call CastSpell "${LightMsg}" "${TankHS}" spell CheckFD
         } else /if (${Target.Distance}<230) {
            /call CastSpell "${RemedyMsg}" "${CasterHS}" spell CheckFD
         }
         /return
      }
   }
}
/if (${CasterList.Find[${Target.Class.ShortName}]}) {
   /if (${Target.PctHPs}<${CHP}) /call CastSpell "${RemedyMsg}" "${CasterHS}" spell CheckHP
}
/if (${TankList.Find[${Target.Class.ShortName}]}) {
   /if (${Target.PctHPs}<${THP}) /call CastSpell "${LightMsg}" "${TankHS}" spell CheckHP
}
/return

Sub CheckAll
   /if (${castEndTime}>25) {
      /if (${Me.PctHPs}<${EHP}) {
         /call Interrupt
         /return
      }
      /if (${Spawn[${TankID}].PctHPs}<${Math.Calc[${MTHP}*0.56]} && ${castEndTime}>50) {
         /call Interrupt
         /return
      }
      /varset WH 0
      /for g 1 to ${Group}
         /if (${Group.Member[${g}].Spawn.PctHPs}>${EHP}) /goto :NextG
         /if (${Group.Member[${g}].Spawn.ID}==${TankID}) /goto :NextG
         /if (${Group.Member[${g}].Distance}>230) /goto :NextG
         /if (${Group.Member[${g}].Type.Equal[NULL]}) /goto :NextG
         /if (${Group.Member[${g}].Type.NotEqual[PC]}) /goto :NextG
         /if (${HealFD}) {
            /if (${Group.Member[${g}].Class.ShortName.Equal[MNK]} || ${Group.Member[${g}].Class.ShortName.Equal[SHD]}) {
               /if ((${Group.Member[${g}].Distance}>${FDHealDist}) || (${Group.Member[${g}].Distance}<${FDHealDist} && !${Group.Member[${g}].LineOfSight})) {
                  /if (${Group.Member[${g}].State.Equal[FEIGN]}) {
                     /varset WH ${Group.Member[${g}].ID}
                     /goto :NextG
                  }
                  /goto :NextG
               }
            }
         }
         /if (${Group.Member[${g}].Class.ShortName.Equal[SHM]}) {
            /if (${Group.Member[${g}].PctHPs}>=${ShmHP}) /goto :NextG
         }
         /if (${WH}==0) /varset WH ${Group.Member[${g}].ID}
         /if (${WH}>0) {
            /if (${Group.Member[${g}].PctHPs}<${Spawn[${WH}].PctHPs}) /varset WH ${Group.Member[${g}].ID}
         }
        :NextG
      /next g
      /if (${WH}>0) {
         /if (${Spawn[${WH}].PctHPs}<${EHP} && ${Spawn[${WH}].PctHPs}<${Spawn[${TankID}].PctHPs}) {
            /call Interrupt
            /varset EGA TRUE
         }
      }
   }
/return

Sub Emergency(int TarID)
   /if (${Bool[${Me.AltAbility["Divine Arbitration"]}]} && ${Me.AltAbilityReady["Divine Arbitration"]}) {
      /call CastSpell "${DArbMsg}" "Divine Arbitration" alt ""
   } else {
      /target ID ${TarID}
      /delay 1s ${Target.ID}==${TarID}
      /call CastSpell "${RemedyMsg}" "${CasterHS}" spell ""
   }
/return

Sub TagAlong
   /if (!${Bool[${Spawn[${TagAlongID}]}]}) {
      /echo Unable to Locate TagAlong Person in Zone.
      /call TagOff
      /return
   }
   /if (${Spawn[pc ${TagAlongID}].Distance}>${Math.Calc[${TagDist}*2.5]}) {
      /echo ${Spawn[${TagAlongID}].CleanName} has gotten too far away to follow!
      /call TagOff
      /return
   }
   /if (${Spawn[${TagAlongID}].Distance}>${TagDist}) {
     :TagAlongLoop
      /doevents TurnTagAlongOff
      /if (${Spawn[${TagAlongID}].Name.Equal[NULL]}) {
         /varset TagAlong FALSE
         /varset TagAlongID 0
         /echo TagAlong lost it's person to follow!
         /return
      }
      /face loc ${Spawn[${TagAlongID}].Y},${Spawn[${TagAlongID}].X} nolook
      /keypress forward hold
      /if (${Math.Distance[${Spawn[${TagAlongID}].Y},${Spawn[${TagAlongID}].X}]}>${Math.Calc[${TagDist}*0.3]}) /goto :TagAlongLoop
      /keypress forward
      /delay 5 !${Me.Moving}
   }
/return

Sub TagOff
   /echo Turning off TagAlong!
   /varset TagAlongID 0
   /varset TagAlong FALSE
/return

Sub CheckHP
   /if (!${Bool[${Me.Casting}]}) /return
   /if (${Target.PctHPs}>=${CancelPct}) /call Interrupt
/return

Sub DACheckGroup
  :DAWaitLoop
   /for g ${Group} downto 1
      /if (${Group.Member[${DA}].PctHPs}<${Math.Calc[${Me.PctHPs}*0.6]}) {
         /if (${Bool[${Me.Buff[Divine Aura]}]}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[Divine Aura].ID}-1].Int} leftmouseup
         /if (${Bool[${Me.Buff[Divine Barrier]}]}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[Divine Barrier].ID}-1].Int} leftmouseup
         /if (${Bool[${Me.Buff[Sacred Barrier]}]}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[Sacred Barrier].ID}-1].Int} leftmouseup
         /target ID ${Group.Member[${DA}].ID}
         /if (${Me.AltAbilityReady["Divine Arbitration"]}) /call CastSpell "${DArbMsg}" "Divine Arbitration" alt ""
         /return
      }
   /next g
   /if (${Bool[${Me.Buff["Divine Barrier"]}]}) /goto :DAWaitLoop
   /if (${Bool[${Me.Buff["Divine Aura"]}]}) /goto :DAWaitLoop
   /if (${Bool[${Me.Buff["Sacred Barrier"]}]}) /goto :DAWaitLoop
/return

Sub ClickBuffs
   /for BC 1 to 31
      /if (${Bool[${Me.Buff[${ClickBuff[${BC}]}]}]}) {
         /notify BuffWindow Buff${Math.Calc[${Me.Buff[${ClickBuff[${BC}]}].ID}-1].Int} leftmouseup
      }
   /next BC
/return

Sub SitOrStand
/if (!${UseMount}) {
   /if (${Me.State.Equal[Stand]}) {
      /if (${Me.PctMana}<98) {
         /if (!${Me.Moving}) {
            /if (!${NearestSpawn[1, NPC radius 100 zradius 30].ID}) /sit
         }
      }
   }
}
/if (${Me.State.Equal[Sit]}) {
   /if (${NearestSpawn[1, NPC radius 99 zradius 30].ID}) /stand
}
/return

Sub CheckInvis
:InvisLoop
/if (${Me.Invis}) {
   /if (${Spam}) {
      /echo I am invisible! Action Halted!
      /varset Spam FALSE
      /timed 80 /varset Spam TRUE
   }
   /if (${Me.Casting.ID}) /goto :InvisLoop
   /goto :InvisLoop
}
/return

Sub CastSpell(msg, SpellName, SpellType, Check)
/if (${DoGroupMsgs}) {
   /if (${Spam}) {
      /g ${msg}
      /varset Spam FALSE
      /timed 50 /varset Spam TRUE
   }
}
/call Cast "${SpellName}" ${SpellType} 1s ${Check}
/return

Sub CheckPC
   /if (${Target.Type.NotEqual[PC]}) /call Interrupt
/return

Sub CheckFD
   /if (${Target.State.NotEqual[FEIGN]}) /call Interrupt
/return

Sub ClickBuffDeclares
/declare BC int outer
/declare ClickBuff[31] string outer
/varset ClickBuff[1] Conviction
/varset ClickBuff[2] Virtue
/varset ClickBuff[3] Hand of Conviction
/varset ClickBuff[4] Hand of Virtue
/varset ClickBuff[5] Armor of the Pious
/varset ClickBuff[6] Armor of the Zealot
/varset ClickBuff[7] Brell's Brawny Bulwark
/varset ClickBuff[8] Brell's Stalwart Shield
/varset ClickBuff[9] Talisman of Wunshi
/varset ClickBuff[10] Wunshi's Focusing
/varset ClickBuff[11] Focus of the Seventh
/varset ClickBuff[12] Focus of Soul
/varset ClickBuff[13] Spiritual Vitality
/varset ClickBuff[14] Spiritual Vigor
/varset ClickBuff[15] Blessing of Steeloak
/varset ClickBuff[16] Steeloak Skin
/varset ClickBuff[17] Blessing of the Nine
/varset ClickBuff[18] Protection of the Nine
/varset ClickBuff[19] Balikor's Mark
/varset ClickBuff[20] Symbol of Balikor
/varset ClickBuff[21] Kazad`s Mark
/varset ClickBuff[22] Symbol of Kazad
/varset ClickBuff[23] Strength of the Hunter
/varset ClickBuff[24] Strength of Tunare
/varset ClickBuff[25] Infusion of Spirit
/varset ClickBuff[26] Spirit of Fortitude
/varset ClickBuff[27] Talisman of Fortitude
/varset ClickBuff[28] Endurance of the Boar
/varset ClickBuff[29] Talisman of the Boar
/varset ClickBuff[30] Confidence
/varset ClickBuff[31] Faith
/return

CCH.inc
PHP:
|CCH.inc
|v0.01
#event OneBefore "#*#|${beforeMe}${beforeMe}${beforeMe}|#*#"
#event TwoBefore "#*#|${twoBefore}${twoBefore}${twoBefore}|#*#"
#event Rampage "#*# goes on a RAMPAGE!"
#event CCH "[MQ2] CCH Mode Activated -- #1# #2# #3# #4# #5# #6#"
#event EndCCH "[MQ2] Ending Chain CH"
#event EndCCH "You have been slain by#*#"

Sub CCHPreReqs
/declare DoCCH   timer outer
/declare CHEnd   timer outer 0
/declare Rampage bool  outer FALSE
/declare EndCCH  bool  outer FALSE
/declare Delay   int   outer

/if (${Version.NotEqual[${Ini[MyClericini,Misc,Version]}]}) /goto :LoadAliases
/if (${MacroQuest.BuildDate.Equal[${Ini[MyCleric_${Me.Name}.ini,Misc,LoadDate]}]}) /goto :SkipAliases
:LoadAliases
/squelch /alias /CCHMode /echo CCH Mode Activated --
/squelch /alias /CCHEnd /echo Ending Chain CH
:SkipAliases
   
/return

Sub event_CCH(Line,TankOne,TankTwo,MyNum,beforeMe,twoBefore,int delay)
/stick off
/delay 5 !${Me.Moving}
/varset Rampage FALSE
/varset Delay ${delay}
/varset DoCCH 200000
/varset EndCCH FALSE

  :Loop
   /if (${Me.Casting.ID}) {
      /doevents OneBefore
      /doevents TwoBefore
      /goto :Loop
   }
   /if (${Bool[${Spawn[pc ${TankOne}]}]}) {
      /target pc ${TankOne}
   } else {
      /varset TankOne ${TankTwo}
   }
   /doevents OneBefore
   /doevents TwoBefore
   /doevents Rampage
   /doevents EndCCH
   /doevents Died
   /if (${EndCCH}) /return
   /if (${Rampage} && ${HitTimer}>90) /rs RAMPAGE [${Me.Name}] RAMPAGE
   /if (${DoCCH}==0) {
      /varset DoCCH 200000
     :CCHLoop
      /if (${Target.Distance}<115) {
         /cast "Complete Healing"
         /delay 5 ${Bool[${Me.Casting.ID}]}
         /if (!${Bool[${Me.Casting.ID}]}) /goto :CCHLoop
         /varset CHEnd 100
         |/g <${MyNum}${MyNum}${MyNum}> [ %t ]
         /rsay <${MyNum}${MyNum}${MyNum}> [ %t ]

         
      } else /if (${Target.Distance}<230) {
         /echo Tank was out of Range for that cycle!! Waiting 7.5 Seconds and Casting Fast Heal..
         /varset CHEnd 100
         /g <${MyNum}${MyNum}${MyNum}> [ %t ]
         /delay 75
         /call CastSpell "${RemedyMsg}" "${CasterHS}" spell ""
      }
   }
   /goto :Loop
/return

Sub event_EndCCH
   /varset EndCCH TRUE
/return

Sub event_TwoBefore
   /if (${CHEnd}<${Math.Calc[${Delay}*1.8].Int}) /varset DoCCH ${Math.Calc[${Delay}*1.7].Int}
/return

Sub Event_OneBefore
   /if (${CHEnd}<${Math.Calc[${Delay}*1.1].Int}) /varset DoCCH ${Delay}
/return

Sub Event_Rampage
   /varset RT TRUE
   /timed 16 /varset RT FALSE
/return
 
Is there a way to see a log of the errors in the MQ window, or do I have to manually type them out?

I updated spell_routines, and macro doesn't CTD anymore, it just has about 20 lines of error every time it tries to cast.
 
no clue on logs.. i asked that once..

not sure if c/p works.. but i would guess you have to type them

it should say error @## blah blah ..


## is the line that is causing errors
 
A request, if anyone has some time

Users who are viewing this thread

Back
Top