• 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

Healer.mac Update

Maskoi

old and salty
Joined
Sep 28, 2005
RedCents
82,796¢
For years one of my favorite macros was the healer.mac from Redguides. With all the changes in EQ over the years it was updated a few times here and there (Thanks to Crystane and Alatyami). I recently started playing my cleric again and was sad I couldn't use this macro. A friend of mine updated it for me and it seems to working OK so far. I am using this on my 77 cleric with a couple hundred AA's. I will try to keep it updated with any fixes when I come across any bugs while leveling.

1.Quick fix to be able to select Merc as MT

2. Implemented Promised heal feature to include new expansions Promised Renewal@73 Promised Restoration@78 Promised Recuperation@83
New variable- Set prheal to 0 if using Complete Heal and to 1 if using Promised heal line

3.Changed recast time to 24 secs instead of 18 secs since Spell duration AAs affect PRHeal line of spells

4. Adjusted GoMana event to recognize all Gift of Mana AA messages

5. Added Cleric Aura feature

Rich (BB code):
|- healer.mac
|- Author: Alatyami, NotAddicted.com
|- Original Credits: <Attempting to find the original author>
|- Secondary Credits: Alatyami, Crystane, Emperor
|------------------------------------------------------------------------------|
|- Modifications:
|------------------------------------------------------------------------------|
| Aug 14, 2008 - Alatyami
| * Added Slot 10 Memorization.
|------------------------------------------------------------------------------|
|- [07-14-2005] * Fixed the TLO errors
|-              * Removed trickyda, it didn't really work too well anyways
|- by Crystane  :
|- [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.
|- [02-12-2006] * Added AutoNuke feature, with toggle and some logic.
|- [03-17-2006] * Added Groupheal on Gift of Mana Feature.
|-		  Autonuke and Groupheal on GoM are toggled on by default now, but can be turned off via tells.
|-		  Added an Areanuke feature on command, for some AE style farming fun.
|- [07-01-2006] * Added Undead nukes and AAs, Hammer and AA as well as a feature to keep up buffs for grp and emself.
|-		  Keeping a Dmgrune on the Grps Tank.
|-		  Placeing a Reverse Damageshield on Mobs
|- [07-05-2006]	  Implemented checks to prevent long buffcasts when a mob is incomming, so the healer is ready to heal when its needed most.
|- [11-07-2006] * New Expansion implemented, still on test. Promised Renewal instead of CH to be able to spotheal meanwhile PRen is going to land.
|- By Emperor
|- [05-18-2009] * Quick fix to be able to select Merc as MT
|- 		  Implemented Promised heal feature to include new expansions Promised Renewal@73 Promised Restoration@78 Promised Recuperation@83
|-		  Changed recast time to 24 secs instead of 18 secs since Spell duration AAs affect PRHeal line of spells
|-		  Adjusted GoMana event to recognize all Gift of Mana AA messages
|-		  Added Cleric Aura feature
|------------------------------------------------------------------------------|

#include spell_routines.inc

#event GoMana		"You have been granted a gift of#*#"
#event GoMoff		"Your gift of#*#mana fades."
#event OutofFood	"You are out of #1#."
#Event WornOff		"Your #1# spell has worn off of #2#."
#Event WornOff2		"#*# fades."
#Event GainExp		"You gain party experience!!"
#Event HotonInc		"#1# tells you#*#Incoming pull.#*#"
#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

	| Spell Customization:

	/declare healspell string outer Promised Renewal Rk. II
	/declare patchheal string outer Sacred Light Rk. II
	/declare hotspell string outer Solemn Elixir Rk. II
	/declare daspell string outer Divine Destiny
	/declare yaulpspell string outer Yaulp IX Rk. II
	/declare groupheal string outer Word of Vivification
	/declare acbuff string outer Ward of Valiance
	/declare longhpbuff string outer Temerity Rk. II
	/declare grplonghpbuff string outer Hand of Tenacity Rk. II
	/declare singlesymbuff string outer Symbol of Kaerra
	/declare groupsymbuff string outer Elushar's Mark Rk. II
	/declare spellhastebuff string outer Aura of Resolve
	/declare pethealspell string outer Complete Healing
	/declare HammerPet string outer Unswerving Hammer of Retribution
	/declare nukeone string outer Divine Censure
	/declare nuketwo string outer Desolate Undead
	/declare nukeundead string outer Desolate Undead
	| Stun one is without pushback
	/declare stunone string outer Sound of Zeal
	| Stun two is with pushback
	/declare stuntwo string outer Awestruck
	/declare areanuke string outer Calamity
	/declare rootspellname string outer Petrifying Earth
	/declare reverseDS string outer Mark of the Martyr
	/declare slot10 string outer Yaulp IX Rk. II
	/declare aurabuff string outer Aura of the Pious
	
	| Options: 
	/declare prheal int outer 1
	/declare useaura int outer 1
	/declare usegroupheal int outer 1
	/declare usedivarb int outer 1
	/declare healafterdivarb int outer 0
	/declare announce int outer 0
	/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 60
	/declare noInvis int outer 1
	/declare defaultstophealpoint int outer 85	
	
	/declare rgcspell string outer NULL
	/declare healpetmode int outer 2
	/declare pethealpoint int outer 65
	/declare manatohealpet int outer 45
   
	/declare rootspelltime int outer 2
	
	/declare selfhealpoint int outer 70
	/declare dacastpoint int outer 40
	/declare divarbpoint int outer 28
	/declare interrupt2divarb int outer 26
	|- Heal at % for WAR/PAL/SK
	/declare tankhealpoint int outer 69
	|- Heal at % for WIZ/MAG/ENC/DRU
	/declare casterhotpoint int outer 75
	/declare casterpatchpoint int outer 55
	|- Heal at % for NEC/SHM
	/declare necshmpatchpoint int outer 45
	|- Heal at % for all other classes
	/declare defaultpatchpoint int outer 60
	|- Nuke till down to % Mana.
	/declare Manatonuke int outer 70
	|- Customize your Password here
	/declare YourPW string outer YourPassword

|------------------------END EDITING------------------------|
	/declare RevDSon outer FALSE
	/declare PossibleIncom	outer FALSE

	/declare BigHealtimer timer outer
	/declare BigHealtimer2 timer outer
	/declare Bighealtimeramount int outer
	/declare UseingPrRenewal outer FALSE
	/if (!${prheal}) {
	/varset Bighealtimeramount 0
	} else {
		/varset Bighealtimeramount 240
		/varset UseingPrRenewal TRUE
	}
	
	/declare healspellrange int outer ${Spell[${healspell}].Range}
	/declare patchhealrange int outer ${Spell[${patchheal}].Range}
	/declare hotspellrange int outer ${Spell[${hotspell}].Range}	
	/declare grouphealrange int outer ${Spell[${groupheal}].AERange}
	/declare pethealspellrange int outer ${Spell[${pethealspell}].Range}
	
   /declare tankname string outer ${Target}
   /declare tanknameid int outer
   /declare tankclass string outer
   /declare healpct int outer

/if (${Select[${Spawn[${tankname}].Class},Warrior,Palladin,ShadowKnight]}>=1) /varset healpct 78
/if (${Select[${Spawn[${tankname}].Class},Wizard,Druid,Mage]}>=1) {
	/varset healpct 90
	/varset Manatonuke 20
	} else /varset healpct 75
/if (${tankhealpoint}<${healpct}) /varset tankhealpoint ${healpct}

/echo Healpct set to ${healpct}
/echo Manatonuke set to ${Manatonuke}
   /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 0
   /declare duckfdspam int outer 1
   /declare duckselfspam int outer 0
   /declare nomtspam int outer 1
   /declare ghealhurtcount int outer 0
   /declare divarboor int outer 0
   /declare aetime int outer 0
   /declare autonuke int outer 1
   /declare GrpHealonGoM int outer 1
   /declare GoMana int outer 0
   /declare Casttimer timer outer


|-- Group and Self Buffs to keep up!
|- Set to TRUE if you want to keep some buffs on ya automatically.
|- Or FALSE if you want no possible delay in any heals.

	/declare DoAutoBuffs outer TRUE

|----------------------------------------------------------
	/declare Rebuffing outer TRUE
	/declare Rebuffstate outer TRUE
	/declare SpellBufftodo[9] string outer 
	/varset SpellBufftodo[1] "Armor of the Sacred Rk. II" 
	/varset SpellBufftodo[2] "Aura of Resolve"
	/varset SpellBufftodo[3] "Hand of Tenacity Rk. II"
	/varset SpellBufftodo[4] "Elushar's Mark Rk. II"
	/varset SpellBufftodo[5] "Rallied Aegis of Vie Rk. II"
	/varset SpellBufftodo[6] NULL
	/varset SpellBufftodo[7] NULL
	/varset SpellBufftodo[8] NULL
	/varset SpellBufftodo[9] NULL

	/declare TankWornOff[5] outer TRUE
	/declare TankBufftodo[5] string outer 

	/varset TankBufftodo[1] NULL
	/varset TankBufftodo[2] NULL
	/varset TankBufftodo[3] NULL
	/varset TankBufftodo[4] NULL
	/varset TankBufftodo[5] NULL


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


   /if ((!${Target.ID})||(!${Group.Member[${Target}]})) {
      /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 ${healpct}

   /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
   /echo Features [autonuke] and [GrpHealonGoM] are enabled. (toggle on/off)
   /delay 2s
|   /tell ${tankname} Do you know the Commandlist for Clr AA's?
   /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

   /call MemSpells

   :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 ((!${Spawn[${tankname}].NearestSpawn[npc radius 40 zradius 15].ID})&&(${Me.Pet.ID}<1)) /varset RevDSon FALSE
   /doevents HotonInc
   /call Nukeing
   /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)&&(!${Me.Invis})) /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}]})&&${BigHealtimer}<1) {
         /if ((${announce}==1)&&(!${Me.Invis})) /tell ${tankname} (${healspell}) --- %T ---
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
	 /if (${UseingPrRenewal} && ${Macro.Return.Equal[CAST_SUCCESS]}) /varset BigHealtimer ${Bighealtimeramount}
        /if ((${announce}==1)&&(!${Me.Invis})) /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 MemSpells 

   /echo Memming spells. Hang on. 
   /if ( !${Me.Gem[${healspell}]} ) { 
	/echo Memming Spell ${healspell}
	/memspell 1 "${healspell}"
	/delay 25 
   } 
   /if ( !${Me.Gem[${patchheal}]} ) { 
	/echo Memming Spell ${patchheal}
      /memspell 2 "${patchheal}"
      /delay 25 
   } 
   /if ( !${Me.Gem[${hotspell}]} ) { 
	/echo Memming Spell ${hotspell}
      /memspell 3 "${hotspell}"
      /delay 25 
   } 
   /if ( !${Me.Gem[${groupheal}]} ) { 
	/echo Memming Spell ${groupheal}
      /memspell 4 "${groupheal}"
      /delay 25
   } 
   /if ( !${Me.Gem[${HammerPet}]} ) { 
	/echo Memming Spell ${HammerPet}
      /memspell 5 "${HammerPet}"
      /delay 20 
   } 
   /if ( !${Me.Gem[${nukeone}]} ) { 
	/echo Memming Spell ${nukeone}
      /memspell 6 "${nukeone}"
      /delay 30 
   }
   /if ( !${Me.Gem[${daspell}]} ) { 
	/echo Memming Spell ${daspell}
      /memspell 7 "${daspell}"
      /delay 20 
   } 
   /if ( !${Me.Gem[${nukeundead}]} ) { 
	/echo Memming Spell ${nukeundead}
      /memspell 8 "${nukeundead}"
      /delay 30 
   } 
   /if ( !${Me.Gem[${reverseDS}]} ) { 
	/echo Memming Spell ${reverseDS}
      /memspell 9 "${reverseDS}"
      /delay 30 
   }
    
   /if ( !${Me.Gem[${slot10}]} ) { 
      /echo Memming Spell ${slot10}
      /memspell 10 "${slot10}"
      /delay 30 
   } 

	/echo Spells are memmed. 
	/if (${Window[SpellBookWnd].Open}) /cleanup
/return 

Sub Event_HotonInc(line, SenderName)
	/if (!${Group.Member[${SenderName.Arg[1]}]}) /return
	/if (${Target.ID}!=${Spawn[${tankname}].ID}) {
		/target ${tankname}
		/delay 1s ${Target.ID}==${Spawn[${tankname}].ID}
	}
	/if (${Me.SpellReady[${hotspell}]} && !${Me.Casting.ID} && ${Target.Distance}<${Spell[${hotspell}].Range}) {
		/call Cast "${hotspell}" gem3 5s
	}
/return

Sub Nukeing
	/if ((${Me.PctMana}>=${Manatonuke})&&(${autonuke}==1)&&(${Spawn[${tankname}].PctHPs}>${tankhealpoint})&&(${Spawn[${tankname}].NearestSpawn[npc radius 30 zradius 15].ID} || ${Select[${Spawn[${tankname}].Class},Wizard,Druid,Necromancer]}>=1)&&(${Me.PctHPs}>80)) {
		/assist ${tankname}
		/delay 1s ${Target.Type.Equal[NPC]}
		/if (${Target.Type.NotEqual[NPC]}) {
			/assist ${tankname}
			/delay 5 ${Target.Type.Equal[NPC]}
		}
		/delay 5
		/if (${Target.Type.Equal[PC]}) /goto :skipautonuke
		/if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
			/if (${Me.Book[${reverseDS}]}>0 && ${Target.PctHPs}>55 && !${RevDSon} && ${Spawn[${tankname}].PctHPs}>${healpct}) {
				/if (${Me.SpellReady[${reverseDS}]}) {
					/call cast "${reverseDS}" gem9 1s NukeBuffCheckHP
					/if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset RevDSon TRUE
					/goto :Nukedone
				} else {
					/if (${Me.Gem[${reverseDS}]}!=9) /memspell 9 "${reverseDS}"
					/delay 4s
					/goto :Nukedone
				}
			}
			/if (${Me.Pet.ID}<1 && ${Me.Book[${HammerPet}]}>0 && ${Spawn[${tankname}].PctHPs}>${healpct}) {
				/if (${Select[${Spawn[${tankname}].Class},Wizard,Druid,Necromancer]}>=1 && ${Target.Speed}<1) /goto :skippet
				/delay 5 ${Me.SpellReady[${HammerPet}]}
				/call cast "${HammerPet}" gem5 1s NukeBuffCheckHP
				/if (${Me.AltAbility[Celestial Hammer]}>0 && ${Me.AltAbilityReady[Celestial Hammer]}) /call cast "Celestial Hammer" alt 1s
				/goto :Nukedone
			}
			:skippet
			/if (${Me.SpellReady[${nukeone}]} && ${Select[${Target.Body},Undead]}!=1 && ${Spawn[${tankname}].PctHPs}>${healpct}) {
				/if ((${announce}==1)&&(!${Me.Invis})) /tell ${tankname} %T shal feel the wrath of Brell! (${nukeone})
				/call Cast "${nukeone}" gem5 1s NukeBuffCheckHP
				/delay 5
			} else /if (${Me.SpellReady[${nukeundead}]} && ${Select[${Target.Body},Undead]}==1 && ${Spawn[${tankname}].PctHPs}>${healpct}) {
				/if ((${announce}==1)&&(!${Me.Invis})) /tell ${tankname} %T shal feel the wrath of Brell! (${nukeundead})
				/if (${Me.AltAbility[Turn Undead]}>0 && ${Me.AltAbilityReady[Turn Undead]} && ${Target.PctHPs}>50) /call cast "Turn Undead" alt 1s
				/delay 3
				/call Cast "${nukeundead}" gem8 1s NukeBuffCheckHP
				/delay 5
			} else {
				/if (${Me.Gem[${nukeundead}]}!=8 && ${Select[${Target.Body},Undead]}==1) {
					/memspell 8 "${nukeundead}"
					/delay 20
				}
				/if (${Me.SpellReady[${stunone}]} && ${Spawn[${tankname}].PctHPs}>${healpct}) {
					/if ((${announce}==1)&&(!${Me.Invis})) /tell ${tankname} %T shal feel the wrath of Brell! (${stunone})
					/call Cast "${stunone}" gem6 1s NukeBuffCheckHP
					/delay 5
				}
			} 
		}
		:Nukedone
		/doevents GoMana
		:skipautonuke
		/target ${tankname}
		/delay 1s ${Target.Type.Equal[PC]}
	}
/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)&&(!${Me.Invis})) /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)&&(!${Me.Invis})) /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}<=75)&&(${Group.Member[${gmember}].PctHPs}>=55)) /varcalc minorhurt ${minorhurt}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=55)&&(${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})||(${GoMana}>0))&&(${Target.Distance}<=${healspellrange})) /return
      }
      /if (${Me.PctHPs}<=${selfhealpoint}) /return
   }
   /if ((${majorhurt}==0)&&(${minorhurt}==0)&&(${GoMana}==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))||((${GoMana}==1)&&(${usegroupheal}==1)) ) {
      /if ((${announce}==1)&&(!${Me.Invis})) /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 (${Select[${worstclass},Warrior,Paladin,Shadow Knight]}>0) {
      /if ((${worsthp}<=${tankhealpoint})&&(${worsthp}>=${Math.Calc[0.7*${tankhealpoint}]})&&(${majorhurt}<=1)&&(${minorhurt}<=1)&&${BigHealtimer2}<1) {
         /target id ${worsthurtid}
/echo ${worstclass}
    /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
/echo ${Target.Name}
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if ((${announce}==1)&&(!${Me.Invis})) /tell ${tankname} ((${healspell}) --- %T ---
        /if (${announce}==1) /tell ${tankname} ${Me.PctMana}
/echo Casting ${healspell}
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
	 /if (${UseingPrRenewal} && ${Macro.Return.Equal[CAST_SUCCESS]}) /varset BigHealtimer2 ${Bighealtimeramount}
         /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)&&(!${Me.Invis})) /tell ${tankname} (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
   } else /if (${Select[${worstclass},Magician,Wizard,Enchanter,Druid]}>0) {
      /if ((${worsthp}<=${casterhotpoint})&&(${worsthp}>${casterpatchpoint})) {
         /if (${Select[${worsthurt},${nohotforua},${nohotforub},${nohotforuc},${nohotforud}]}>=1) /return
         /if (${Select[${nohotforua},NULL]}>=1) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
            /varset nohotforua ${Target.Name}
            /if ((${announce}==1)&&(!${Me.Invis})) /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 (${Select[${nohotforub},NULL]}>=1) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforub ${Target.Name}
            /if ((${announce}==1)&&(!${Me.Invis})) /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 (${Select[${nohotforuc},NULL]}>=1) {
            /target id${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforuc ${Target.Name}
            /if ((${announce}==1)&&(!${Me.Invis})) /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 (${Select[${nohotforud},NULL]}>=1) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforud ${Target.Name}
            /if ((${announce}==1)&&(!${Me.Invis})) /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)&&(!${Me.Invis})) /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 (${Select[${worstclass},Necromancer,Shaman]}>0) {
      /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)&&(!${Me.Invis})) /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)&&(!${Me.Invis})) /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)&&(!${Me.Invis})) /tell ${tankname} Inc Divine Arbitration
      /call Cast "Divine Arbitration" alt 2s
      /if ((${healafterdivarb}==1)&&((${Me.PctMana}>40)||((${Me.PctMana}>20)&&(${GoMana}>0)))) {
         /if ((${announce}==1)&&(!${Me.Invis})) /tell ${tankname} Inc Grp Heal, get close
         /call Cast "${groupheal}" gem4 2s
         /delay 15 ${Me.SpellReady[${groupheal}]}
      }
   }
/return





Sub CheckEvents
   /delay 1
   /doevents GainExp
   /doevents GoMoff
   /doevents GoMana
   /doevents Chat
   /doevents tell
	/doevents
   /doevents flush
	/call Checkbuffs
	/call CheckAura
/return


Sub MedTime
   :oomwait
   /call CheckEvents
   /doevents HotonInc
   /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 NukeBuffCheckHP
   /if (!${Window[CastingWindow].Open}) /return
   /if ((${autointerrupt}>=1)&&(${Spawn[${tankname}].PctHPs}<${tankhealpoint})) {
      /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 or buffspell on ${Target} so I can heal myself
         /varset duckselfspam 0
         /timed 60 /varset duckselfspam 1
      }
      /call Interrupt
      /return
   }
   /for gmember 0 to ${Group}
   /if ((${usedivarb}==1)&&(${Spawn[${Group.Member[${gmember}]}].PctHPs}<=${divarbpoint})&&(${Spawn[${Group.Member[${gmember}]}].Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) {
            /call Interrupt
            /call Divarbcast
            /return
   }
   /next gmember
/return

Sub CheckHP
   /if (!${Window[CastingWindow].Open}) /return
   /if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})&&(${Target.Type.Equal[PC]})&&!${Rebuffing}) {
      /if ((${announce}==1)&&(${duckspam}==1)) {
         /echo Ducking heal on ${Target.Name}
         /varset duckspam 0
         /timed 60 /varset duckspam 1
      }
      /call Interrupt
      /return
   }
   /if (${Me.Casting.Name.Equal[${reverseDS}]} && ${Spawn[${tankname}].PctHPs}<${tankhealpoint}) {
	/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 or buffspell 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]}))&&((${Target.Name.NotEqual[${tankname}]})||(${Target.Type.NotEqual[NPC]}))) {
         /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
         }
      }
   }
   /for gmember 0 to ${Group}
   /if ((${usedivarb}==1)&&(${Spawn[${Group.Member[${gmember}]}].PctHPs}<=${divarbpoint})&&(${Spawn[${Group.Member[${gmember}]}].Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) {
            /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}" gem9 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}" gem9 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}" gem9 7s
            /if (${Target.Class.Name.Equal[Paladin]}) {
               /call Cast "${longhpbuff}" gem9 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}" gem9 5s
            }
         }
      /next gmember
      /if ((${Math.Calc[${Group}-${pallycount}]}>=2)&&(!${Bool[${groupsymbuff}]})) /call Cast "${groupsymbuff}" gem9 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}" gem9 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) {
         /tell ${Sender} 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 /tell ${Sender} nukes not ready
            /if (${Me.PctMana}<=60) /chat #${mychannel} FYI Cleric Mana ${Me.PctMana}%
         } else /tell ${Sender} 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 /tell ${Sender} stuns not ready
      } else /tell ${Sender} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
   }
   /if (${ChatText.Equal[areanuke]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /target ${Me.NearestSpawn[npc radius 35 zradius 25]}
      /delay 8
      /if (${Target.Type.NotEqual[NPC]}) {
         /assist ${Sender}
         /delay 8 ${Target.Type.Equal[NPC]}
      }
      /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
         /if (${Me.SpellReady[${areanuke}]}) {
            /if (${announce}==1) /tell ${Sender} Casting ${areanuke} on %T
            /call Cast "${areanuke}" spell 3s
         } else /tell ${Sender} ${areanuke} not ready.
      } else /tell ${Sender} 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}" gem9 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}" gem9 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}" gem9 5s
      }
      /call Cast "${acbuff}" gem9 7s
      /call Cast "${singlesymbuff}" gem9 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)&&(!${Me.Invis})) /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[grpV]})||(${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}" gem9 7s
   /if (${ChatText.Equal[wog]}) /call Cast "${acbuff}" gem9 7s
   /if (${ChatText.Equal[grpV]}) /call Cast "${grplonghpbuff}" gem9 10s
   /if (${ChatText.Equal[V]}) /call Cast "${longhpbuff}" gem9 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}" gem9 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}" gem9 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}" gem9 7s
      /call Cast "${singlesymbuff}" gem9 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}" gem3 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" gem1 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
      /tell ${Sender} 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: Autonuke ; areanuke ; GrpHealonGoM ; Follow me ; End follow ; Gbuff now! ; BoR now! ; nuke ; stun ; buffme ; patch me ; sym ; rgc ; buff pet ; da pet ; pb ; hot me ; ch me ; mana check ; Commandlist
   }
/if (${ChatText.Equal[${YourPW}]}) {
      /invite ${Sender}
   }
/if (${ChatText.Equal[autonuke]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${autonuke}>0) { 
	/varset autonuke 0 
	/echo Autonuke Disabled
	/tell ${Sender} Autonuke disabled. 
      } else /if (${autonuke}<1) { 
	/varset autonuke 1 
	/echo Autonuke Enabled 
	/tell ${Sender} Autonuke enabled. 
      }
}
/if (${ChatText.Equal[GrpHealonGoM]}) {
      /if (!${Group.Member[${Sender}]}) /return
      /if (${GrpHealonGoM}>0) { 
	/varset GrpHealonGoM 0 
	/echo Grpheal on GoM off!
	/tell ${Sender} Grpheal on GoM off!
      } else /if (${GrpHealonGoM}<1) { 
	/varset GrpHealonGoM 1 
	/echo Grpheal on GoM on!
	/tell ${Sender} Grpheal on GoM on!
      }
}
/doevents GoMana
/return

Sub Event_GainExp
/varset RevDSon FALSE
|   /call ExpTrack
/return

Sub Event_GoMana
	/varset GoMana 1
	/timed 180 /varset GoMana 0
	/call Healgroup
/return

Sub Event_OutofFood(Line, MissFoodorDrink)
/if (${NearestSpawn[NPC].Distance}>${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]} && ${Me.PctMana}>40) {
	/if (${MissFoodorDrink.Arg[1].Equal[food]}) {
		/call cast "Abundant Food" gem9 1s
		/delay 5 ${Cursor.ID}
		/if (${Cursor.ID}) /autoinv
	}
	/if (${MissFoodorDrink.Arg[1].Equal[drink]}) {
		/call cast "Abundant Drink" gem9 1s
		/delay 5 ${Cursor.ID}
		/if (${Cursor.ID}) /autoinv
	}
}
/return

Sub Event_GoMoff
/varset GoMana 0
/return

Sub Incomming
/if (!${Window[CastingWindow].Open}||${Casttimer}<20) /return
/declare Spawncounter int local
/declare SpawnTempID int local
/for Spawncounter 1 to ${SpawnCount[NPC radius 450 zradius 30]}
/if (${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].Speed}>150) {
	/if (${SpawnTempID}) {
		/if (${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].Distance}<${Spawn[ID ${SpawnTempID}].Distance}) /varset SpawnTempID ${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].ID}
	} else {
		/varset SpawnTempID ${Spawn[${NearestSpawn[${Spawncounter}, NPC]}].ID}
	}
	/varset PossibleIncom TRUE
}
/next Spawncounter
/if (${PossibleIncom}) {
	/if (${CastTimer}>${Math.Calc[${Spawn[ID ${SpawnTempID}].Distance}/10]}) {
		/echo Interrupting cast.
		/call Interrupt
	}
	/varset PossibleIncom FALSE
}
/return

Sub CheckBuffs
/if (${Rebuffstate} && ${DoAutoBuffs} && ${NearestSpawn[NPC].Distance}>=75 && ${Me.PctMana}>50) {
/declare i int local 1 
/for i 1 to ${SpellBufftodo.Size} 
	/doevents 
	/if (${Spell[${SpellBufftodo[${i}]}].Mana}>${Me.CurrentMana}) /goto :skipbuff
	/if (${Me.Book[${SpellBufftodo[${i}]}]}==0) /goto :skipbuff
	/if (!${Me.Buff[${SpellBufftodo[${i}]}].ID} && ${Spell[${SpellBufftodo[${i}]}].Stacks}) { 
		/keypress TAB
		/delay 3 
		/target myself
		/delay 3 
		/varset Rebuffing TRUE
		/varset Casttimer ${Math.Calc[${Spell[${SpellBufftodo[${i}]}].MyCastTime}*10]}
		/call cast ${SpellBufftodo[${i}]} gem9 5s Incomming
		/if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset Rebuffstate FALSE
		/keypress TAB
		/varset Rebuffing FALSE
	} 
   :skipbuff
   /next i 
/for i 1 to ${TankBufftodo.Size} 
	/doevents 
	/if (${Spell[${TankBufftodo[${i}]}].Mana}>${Me.CurrentMana}) /goto :skipbuff2
	/if (${Me.Book[${TankBufftodo[${i}]}]}==0) /goto :skipbuff2
	/if (${TankWornOff[${i}]}) {
		/target ${tankname}
		/delay 3
		/varset Rebuffing TRUE
		/varset Casttimer ${Math.Calc[${Spell[${TankBufftodo[${i}]}].MyCastTime}*10]}
		/call cast ${TankBufftodo[${i}]} gem9 5s Incomming
		/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
			/varset TankWornOff[${i}] FALSE
			/varset Rebuffstate FALSE
		}
		/varset Rebuffing FALSE	
	} else /varset Rebuffstate FALSE
   :skipbuff2
   /next i 
} 
/if (${Me.Gem[${reverseDS}]}!=9) {
	/memspell 9 "${reverseDS}"
	/delay 4s
}
/return

Sub CheckAura
/if (${useaura} && ${Me.Aura.ID}==NULL) {
	/echo Casting ${aurabuff}
	/call cast "${aurabuff}" gem8
}
/return
  
Sub Event_WornOff(string line, TempSpellname, TempName)
/declare i int local 1 
/for i 1 to ${TankBufftodo.Size} 
/if (${TempSpellname.Equal[${TankBufftodo[${i}]}]} && ${TempName.Equal[${tankname}]}) {
	/varset Rebuffstate TRUE
	/varset TankWornOff[${i}] TRUE
}
/next i 
/return

Sub Event_WornOff2
/declare i int local 1 
/for i 1 to ${SpellBufftodo.Size} 
/if (!${Me.Buff[${SpellBufftodo[${i}]}].ID} && ${Spell[${SpellBufftodo[${i}]}].Stacks}) /varset Rebuffstate TRUE
/next i 
/return
 
Last edited:
Set useaura to 0 this will turn off the the aura function

/declare useaura int outer 0
 
Healer.mac Update

Users who are viewing this thread

Back
Top
Cart