AFCleric.mac - Cleric automation macro (updated Aug 24th)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

AFCleric.mac - Cleric automation macro (updated Aug 24th)

Post by fantum409 » Sun May 30, 2004 6:58 pm

Please give feedback. :smile:

NOTE: this uses spell_routines.inc from the snippets forum. (Nice one rusty~) AND ALSO ChatParse.inc
mokaddon.inc (pg 10, 11 of this thread) is an option and is commented out by default.

Code: Select all

#include spell_routines.inc
#include ChatParse.inc
|#include mokaddon.inc

#Event IRCchat "<#1#> #2#"
#Chat Chat
#Chat tell
#chat group

Sub Main 

|------------READ THIS SECTION AND EDIT IF NEEDED-----------|

   /declare mychannel string outer ChangeMeLine13
   /declare usegroupchat int outer 0
   /declare useircchat int outer 0
   /declare autohealmode int outer 3
   /declare healspell string outer Complete Healing
   /declare healspellrange int outer 100
   /declare patchheal string outer Pious Remedy
   /declare patchhealrange int outer 200
   /declare hotspell string outer Pious Elixir
   /declare hotspellrange int outer 100
   /declare daspell string outer Divine Barrier
   /declare yaulpspell string outer Yaulp VI
   /declare usegroupheal int outer 1 
   /declare groupheal string outer Word of Vivification 
   /declare grouphealrange int outer 70
   /declare announce int outer 1
   /declare autosit int outer 1
   /declare distancetosit int outer 40
   /declare autointerrupt int outer 1
   /declare onlyhealfd int outer 1
   /declare interrupt2healself int outer 1
   /declare interrupt2healselfhp int outer 50
   /declare noInvis int outer 1
   /declare defaultstophealpoint int outer 80
   /declare acbuff string outer Ward of Valiance
   /declare longhpbuff string outer Conviction
   /declare singlesymbuff string outer Symbol of Balikor
   /declare groupsymbuff string outer Balikor's Mark
   /declare spellhastebuff string outer Blessing of Reverence
   /declare groupspellhastebuff string outer Aura of Devotion
   /declare rgcspell string outer Remove Greater Curse
   /declare healpetmode int outer 2
   /declare pethealpoint int outer 65
   /declare manatohealpet int outer 25
   /declare pethealspell string outer Complete Healing
   /declare pethealspellrange int outer 100
   /declare nukeone string outer Reproach
   /declare nuketwo string outer Order
   /declare stunone string outer Sound of Divinity
   /declare stuntwo string outer Shock of Wonder
|   /declare mokaddon int outer 1
   /declare edbuffitem string outer Foresight Sash

|** Tweak Heals Here - tankhealpoint is for War/Pal/SK other
than MT, casterhotpoint and casterpatchpoint refer to
wiz/mag/enc/dru, necshmpatchpoint refers to necros and
shamans, defaultpatchpoint refers to all other classes.   **|

   /declare selfhealpoint int outer 70
   /declare dacastpoint int outer 29
   /declare tankhealpoint int outer 65
   /declare casterhotpoint int outer 85
   /declare casterpatchpoint int outer 60
   /declare necshmpatchpoint int outer 50
   /declare defaultpatchpoint int outer 70
   /declare healpotpoint int outer 15

|**---------------Divine Arbitration Config-----------------|
Fine tune div arb interruptions. interrupt2divarb is the
threshold for interrupting other spells for target/self HP
dropping below divarbpoint. interrupt2divarb is in 1/10th
seconds, so if 16 is used, spells with more than 1.6 seconds
left would be interrupted if divarbpoint HP is reached. **|
   /declare usedivarb int outer 1
   /declare divarbpoint int outer 25
   /declare healafterdivarb int outer 1 
   /declare interrupt2divarb int outer 14

|**---------------------TrickyDA Config---------------------|
The following are HP buffs cleric will click off, in order,
to get above 40% HP and avoid low HP aggro. Clr will then
click off DA and resume duties, beg new buffs, etc. To
enable, set trickyda to 1, 0 will disable **|

   /declare trickyda int outer 1
   /if (${trickyda}==1) {
      /declare intcount int outer 0
      /declare trickybuff[20] string outer
      /varset trickybuff[1] Virtue
      /varset trickybuff[2] Hand of Virtue
      /varset trickybuff[3] Conviction
      /varset trickybuff[4] Hand of Conviction
      /varset trickybuff[5] Focus of Soul
      /varset trickybuff[6] Focus of the Seventh
      /varset trickybuff[7] Wunshi's Focusing
      /varset trickybuff[8] Talisman of Wunshi
      /varset trickybuff[9] Protection of the 9
      /varset trickybuff[10] Blessing of the Nine
      /varset trickybuff[11] Steeloak Skin
      /varset trickybuff[12] Blessing of Steeloak
      /varset trickybuff[13] Symbol of Kazad
      /varset trickybuff[14] Kazad`s Mark
      /varset trickybuff[15] Symbol of Balikor
      /varset trickybuff[16] Balikor's Mark
      /varset trickybuff[17] Brell's Stalwart Shield
      /varset trickybuff[18] Brell's Brawny Bulwark
      /varset trickybuff[19] Spiritual Vigor
      /varset trickybuff[20] Spiritual Vitality
   }
|-------------------End TrickyDA Config---------------------|



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

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

   /if (${useircchat}==0) /join ${mychannel}
   /if (${useircchat}==1) {
      /iconnect 192.168.0.1 6667 #${mychannel} ${Me}
      /i nick ${Me}
      /timed 50 /i join #${mychannel}
   }

   /if (${FindItem[=Stone of Tainted Health].ID}) /call EquipItem "Stone of Tainted Health"

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

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

   /echo AFCleric Active, running in Autohealmode ${autohealmode}
   /echo Casting ${healspell} on ${tankname} at ${healpct}% HP
   /if (${autohealmode}==0) /echo ONLY ${tankname} will be healed
   /if (${autohealmode}==1) /echo ONLY ${tankname} and myself will be healed
   /if (${autohealmode}==2) /echo ${tankname}, myself and my group will be healed
   /if (${autohealmode}==3) /echo ${tankname} and myself will be healed before the rest of the group
   
   :tankwatchloop 
   /if (${Spawn[${tanknameid}].Name.NotEqual[${tankname}]}) /varset tanknameid 0
   /if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) {
      /if (${SpawnCount[${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[${tankname} ${tankclass}].ID}
         /echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid}
      }
      /if (${SpawnCount[${tankname} ${tankclass}]}>1) {
         /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
            /beep
            /varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID}
            /echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro
         } else {
            /beep
            /echo Need to restart macro to correctly identify the MT
         }
      }
   }
   /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) {
      /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[pc ${tankname ${tankclass}}].ID}
         /echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro
      }
   }
   /if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) {
      /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
      }
   }
   /if (!${Spawn[${tanknameid}].ID}) {
      /if (${nomtspam}==1) {
         /e Warning No Designated MT is available
         /timed 300 /varset nomtspam 1
         /varset nomtspam 0
      }
   }
   /if ((${Me.PctMana}<=20)&&(${announce}==1)&&(${lomspam}==1)) {
      /g ${Me.PctMana}m
      /varset lomspam 0
      /timed 300 /varset lomspam 1
   }
   /if ((${Me.PctMana}<=7)&&(${announce}==1)&&(${oomspam}==1)) {
      /g 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) /g Casting ${patchheal} on %T
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      } 
      /if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) { 
         /if (${announce}==1) /g Casting ${healspell} on %T
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
      } 
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
   }
   /if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand
   }
   /if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand
   }
   /if (${autohealmode}==0) {
      /call CheckEvents
      /goto :tankwatchloop
   }
   /if ((${autohealmode}>=1)&&(${Me.PctHPs}<=${selfhealpoint})) /call Healself
   /if (${autohealmode}>=2) {
      /if ((${Target.PctHPs}>${healpct})||(${Target.Distance}>${healspellrange})||(${Target.PctHPs}<=1)||(!${Target.ID})||(${Target.ID}!=${tanknameid})) {
         /call Healgroup
      }
   }
   /if ((${autohealmode}<2)&&(${Me.PctHPs}>${selfhealpoint})&&(${Me.PctMana}<=98)) /call MedTime
   /call CheckEvents
   /goto :tankwatchloop
/return
   

Sub Healself
   /if (${Me.PctHPs}<=${healpotpoint}) /call HealPotUse
   /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) /g Casting ${patchheal} on %T
            /call Cast "${patchheal}" gem2 1s CheckHP
            /delay 15 ${Me.SpellReady[${patchheal}]}
         }
      }
      /if ((${Me.PctHPs}<=${dacastpoint})&&(${Me.SpellReady[${daspell}]})) {
         /if (${announce}==1) /g Casting DA!! <<WARNING>> DA!! No Heals for 18 SECONDS
         :retryda
         /call Cast "${daspell}"
         /delay 1
         /if ((!${Me.Buff[${daspell}].ID})&&(${Me.SpellReady[${daspell}]})) /goto :retryda
         /if ((${trickyda}==1)&&(${Me.Buff[${daspell}].ID})) /call TrickyDA
         :dawait
         /if (${Me.Buff[${daspell}].ID}) {
            /delay 1s !${Me.Buff[${daspell}].ID}
            /varset stophealpoint ${defaultstophealpoint}
            /call CheckEvents
            /goto :dawait
         }
      }            
   }
   /if (${Me.PctHPs}<=${Math.Calc[${selfhealpoint}*0.7]}) {
      /target myself
      /delay 6 ${Target.Name.Equal[${Me}]}
      /if (${Target.Name.Equal[${Me}]}) {
         /if (${announce}==1) /g Casting ${patchheal} on %T
         /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
   }
   /varset stophealpoint ${defaultstophealpoint}
/return


Sub Healgroup
   :healgroup
   /varset worsthurt NULL
   /varset worsthp 100
   /varset worstclass NULL
   /varset minorhurt 0
   /varset majorhurt 0
   /varset ghealhurtcount 0
   /for gmember 0 to ${Group}
      /if (${onlyhealfd}==0) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if (${Group.Member[${gmember}].PctHPs}<=${worsthp}) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
         }
      }
      /if (${onlyhealfd}==1) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if ((${Group.Member[${gmember}].Class.Name.NotEqual[Monk]})&&(${Group.Member[${gmember}].Class.Name.NotEqual[Necromancer]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
            /if ((${Group.Member[${gmember}].Class.Name.Equal[Monk]})||(${Group.Member[${gmember}].Class.Name.Equal[Necromancer]})) {
               /if ((${Group.Member[${gmember}].State.Equal[feign]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
                  /varset worsthurt ${Group.Member[${gmember}].Name}
                  /varset worsthurtid ${Group.Member[${gmember}].ID}
                  /varset worsthp ${Group.Member[${gmember}].PctHPs}
                  /varset worstclass ${Group.Member[${gmember}].Class.Name}
               }
            }
         }
      }
      /if ((${Group.Member[${gmember}].Distance}<=${grouphealrange})&&(${Group.Member[${gmember}].PctHPs}<=85)) /varcalc ghealhurtcount ${ghealhurtcount}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=85)&&(${Group.Member[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=60)&&(${Group.Member[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1
   /next gmember
   /if (${autohealmode}==3) {
      /if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
         /if ((${Target.ID}==${tanknameid})&&(${Target.PctHPs}<=${healpct})&&(${Target.Distance}<=${healspellrange})) /return
      }
      /if (${Me.PctHPs}<=${selfhealpoint}) /return
   }
   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
      }
      /if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) {
         /if ((${healpetmode}>0)&&(${Me.PctMana}>=${manatohealpet})) /call HealPet
|         /if (${mokaddon}==1) /if (${Target.ID}==${tanknameid}) /call AutoMOK
         /if (${Me.PctMana}<=98) /call MedTime
      }
      /call CheckEvents
      /return
   }
   /if ((${usedivarb}==1)&&(${worsthp}<=${divarbpoint})&&(${Me.AltAbilityReady[divine arbitration]})) /call Divarbcast
   /if ((${Math.Calc[${majorhurt}+${minorhurt}]}>=3)&&(${usegroupheal}==1)) { 
      /if (${announce}==1) /g Inc Grp Heal, get close 
      /call Cast "${groupheal}" gem4 1s
      /delay 15 ${Me.SpellReady[${groupheal}]} 
      /call CheckEvents 
      /return 
   }
   /if (${worsthurtid}==${tanknameid}) /return
   /if (${worsthurtid}==${Me.ID}) {
      /call Healself
      /call CheckEvents
      /return
   }
   /if ((${worstclass.Equal[Warrior]})||(${worstclass.Equal[Paladin]})||(${worstclass.Equal[Shadow Knight]})) {
      /if ((${worsthp}<=${tankhealpoint})&&(${worsthp}>=${Math.Calc[0.7*${tankhealpoint}]})&&(${majorhurt}<=1)&&(${minorhurt}<=1)) {
         /target id ${worsthurtid}
	 /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /g Casting ${healspell} on %T
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
      /if (${worsthp}<=${tankhealpoint}) {
         /target id ${worsthurtid}
	 /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /g Casting ${patchheal} on %T
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
   } else /if ((${worstclass.Equal[Magician]})||(${worstclass.Equal[Wizard]})||(${worstclass.Equal[Enchanter]})||(${worstclass.Equal[Druid]})) {
      /if ((${worsthp}<=${casterhotpoint})&&(${worsthp}>${casterpatchpoint})) {
         /if ((${worsthurt.Equal[${nohotforua}]})||(${worsthurt.Equal[${nohotforub}]})||(${worsthurt.Equal[${nohotforuc}]})||(${worsthurt.Equal[${nohotforud}]})) /return
         /if (${nohotforua.Equal[NULL]}) {
            /target id ${worsthurtid}
	    /delay 5 ${Target.ID}==${worsthurtid}
	    /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
            /varset nohotforua ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %T
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforua NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforub.Equal[NULL]}) {
            /target id ${worsthurtid}
	    /delay 5 ${Target.ID}==${worsthurtid}
	    /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
	    /varset nohotforub ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %T
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforub NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforuc.Equal[NULL]}) {
            /target id${worsthurtid}
	    /delay 5 ${Target.ID}==${worsthurtid}
	    /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
	    /varset nohotforuc ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %T
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforuc NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${nohotforud.Equal[NULL]}) {
            /target id ${worsthurtid}
	    /delay 5 ${Target.ID}==${worsthurtid}
	    /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
	    /varset nohotforud ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %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) /g Casting ${patchheal} on %T
         /call Cast "${patchheal}" gem2 1s CheckHP
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /return
      }
      /varset stophealpoint ${defaultstophealpoint}
   } else /if ((${worstclass.Equal[Necromancer]})||(${worstclass.Equal[Shaman]})) {
      /if ((${worsthp}<=${necshmpatchpoint})&&(${worsthp}>=1)) {
         /target id ${worsthurtid}
	 /delay 5 ${Target.ID}==${worsthurtid}
	 /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${necshmpatchpoint}+5]}
         /if (${announce}==1) /g Casting ${patchheal} on %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) /g Casting ${patchheal} on %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
|   /if (${mokaddon}==1) /if (${Target.ID}==${tanknameid}) /call AutoMOK
/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) /g Inc Divine Arbitration
      /call Cast "Divine Arbitration" alt 2s
      /if ((${healafterdivarb}==1)&&(${Me.PctMana}>40)) { 
         /if (${announce}==1) /g Inc Grp Heal, get close 
         /call Cast "${groupheal}" gem4 2s 
         /delay 15 ${Me.SpellReady[${groupheal}]} 
      }
   }
/return 


Sub HealPet
   /varset worsthurt NULL
   /varset worsthp 100
   /for gmember 0 to ${Group}
      /if (${Group.Member[${gmember}].Pet.ID}) {
         /if (${Group.Member[${gmember}].Pet.Distance}<=${pethealspellrange}) {
            /if ((${Group.Member[${gmember}].Pet.PctHPs}<=${worsthp})&&(${Group.Member[${gmember}].Pet.PctHPs}<=${pethealpoint})) {
               /varset worsthurt ${Group.Member[${gmember}].Pet.Name}
               /varset worsthurtid ${Group.Member[${gmember}].Pet.ID}
               /varset worsthp ${Group.Member[${gmember}].Pet.PctHPs}
            }
         }
      }
   /next gmember
   /if (${worsthurt.NotEqual[NULL]}) {
      /target id ${worsthurtid}
      /delay 5 ${Target.ID}==${worsthurtid}
      /if (!${Target.ID}) /return
      /if (${Target.ID}!=${worsthurtid}) /return
      /delay 3
      /if (${Target.PctHPs}<=${pethealpoint}) {
         /if (${announce}==1) /g Casting ${pethealspell} on %T
         /varset stophealpoint ${Math.Calc[${pethealpoint}+5]}
         /call Cast "${pethealspell}" spell 1s CheckHP
         /varset stophealpoint ${defaultstophealpoint}
         /delay 15 ${Me.SpellReady[${pethealspell}]}
      }
   }
/return


Sub CheckEvents
   /delay 1
   /doevents IRCchat
   /doevents Chat
   /doevents tell
/return


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


Sub CheckHP 
|  ${castEndTime} is variable to express time remaining, in deciseconds, from spell_routines.inc
   /if (!${Window[CastingWindow].Open}) /return
   /if ((${interrupt2healself}==1)&&(${Target.ID}==${tanknameid})) /if ((${Me.PctHPs}>=90)&&(${castEndTime}>=12)) /return
   /if ((${interrupt2healself}==0)&&(${Target.ID}==${tanknameid})) /if (${castEndTime}>=12) /return
   /if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})) {
      /if ((${announce}==1)&&(${duckspam}==1)) {
         /g Ducking heal on %T
         /e Ducking heal on ${Target.Name}
         /varset duckspam 0
         /timed 60 /varset duckspam 1
      }
      /call Interrupt
      /return
   }
   /if ((${interrupt2healself}==1)&&(${Target.Name.NotEqual[${Me}]})&&(${Me.PctHPs}<${interrupt2healselfhp})) {
      /if ((${usedivarb}==1)&&(${Me.PctHPs}<=${divarbpoint})&&(${Me.AltAbilityReady[Divine Arbitration]})) {
         /call Interrupt
         /call Divarbcast
         /return
      }
      /if ((${announce}==1)&&(${duckselfspam}==1)) {
         /g Ducking heal on %T so I can heal my (ChickenShit) self
         /e Ducking heal on ${Target} so I can heal myself
         /varset duckselfspam 0
         /timed 60 /varset duckselfspam 1
      }
      /call Interrupt
      /return
   }
   /if (${onlyhealfd}==1) {
      /if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Monk]})) {
         /if (${Target.State.NotEqual[feign]}) {
            /if ((${announce}==1)&&(${duckfdspam}==1)) {
               /g Ducking heal on %T because he isn't staying FD
               /e Ducking heal on ${Target.Name} because he isn't staying FD
               /varset duckfdspam 0
               /timed 40 /varset duckfdspam 1
            }
            /call Interrupt
            /return
         }
      }
   }
   /if ((${usedivarb}==1)&&(${Target.PctHPs}<=${divarbpoint})&&(${Target.Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) { 
      /for gmember 0 to ${Group}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /call Interrupt
            /call Divarbcast
            /return
         }
      /next gmember
   }
/return 


Sub TrickyDA
   /for intcount 1 to 20
      /if ((${Me.PctHPs}<40)&&(${Me.Buff[${trickybuff[${intcount}]}].ID})) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${trickybuff[${intcount}]}].ID}-1].Int} leftmouseup 
   /next intcount
   /if (${Me.Buff[${daspell}].ID}) {
      :waitalittle
      /delay 1s ${Me.Buff[${daspell}].Duration}<2
      /if (${Me.Buff[${daspell}].Duration}>=2) /goto :waitalittle
   }
   /varset buffbeg 1
   /call Buffbeg
/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 (${Spawn[pc guild enchanter].ID}) /if (${NearestSpawn[PC guild enchanter].Distance}<=100) {
         /tell ${NearestSpawn[PC guild enchanter]} need C plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Enchanter available for C5
   }
   /if ((!${Me.Buff[Protection of the Nine].ID})&&(!${Me.Buff[Blessing of the Nine].ID})&&(!${Me.Buff[Steeloak Skin].ID})&&(!${Me.Buff[Blessing of Steeloak].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${Spawn[pc guild druid].ID}) /if (${NearestSpawn[PC guild druid].Distance}<=100) {
         /tell ${NearestSpawn[PC guild druid]} need dru crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Druid available for DRU crack
   }
   /if ((!${Me.Buff[Spiritual Dominion].ID})&&(!${Me.Buff[Spiritual Ascendance].ID})) {
      /if (${Spawn[pc guild beastlord].ID}) /if (${NearestSpawn[PC guild beastlord].Distance}<=100) {
         /tell ${NearestSpawn[PC guild beastlord]} need bst crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Beastlord available for BST crack
   }
   /if ((!${Me.Buff[Kazad`s Mark].ID})&&(!${Me.Buff[Symbol of Kazad].ID})&&(!${Me.Buff[Symbol of Balikor].ID})&&(!${Me.Buff[Balikor's Mark].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${Spawn[pc guild cleric].ID}) /if (${NearestSpawn[PC guild cleric].Distance}<=100) {
         /tell ${NearestSpawn[PC guild cleric]} need sym plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Cleric available for Symbol
   }
   /if ((!${Me.Buff[Brell's Stalwart Shield].ID})&&(!${Me.Buff[Brell's Brawny Bulwark].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Spiritual Vitality].ID})) {
      /if (${Spawn[pc guild paladin].ID}) /if (${NearestSpawn[PC guild paladin].Distance}<=100) {
         /tell ${NearestSpawn[PC guild paladin]} need BSS plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Paladin available for BSS
   }      
   /if ((!${Me.Buff[Shield of Maelin].ID})&&(!${Me.Buff[Focus of the Seventh].ID})&&(!${Me.Buff[Focus of Soul].ID})&&(!${Me.Buff[Wunshi's Focusing].ID})&&(!${Me.Buff[Talisman of Wunshi].ID})) {
      /if (${Spawn[pc guild shaman].ID}) /if (${NearestSpawn[PC guild shaman].Distance}<=100) {
         /tell ${NearestSpawn[PC guild shaman]} need focus plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Shaman available for Focus
   }
   /varset buffbeg 0
/return


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


Sub HealPotUse
|**  Call from a frequent subroutine. Use a variable to trigger it at a specific health
Example of a call for this routine, for use at 15% health as a backup for normal heals:
   /if (!${Defined[healpotpoint]}) /declare healpotpoint int outer 15
   /if (${Me.PctHPs}<=${healpotpoint}) /call HealPotUse
**|
   /if (!${Defined[healpottimer]}) /declare healpottimer int outer 1
   /if (!${Defined[healpotname]}) /declare healpotname string outer NULL
   /if (${healpottimer}==0) /return
   /if (!${FindItem[Healing Potion].ID}) {
      /varset healpotname NULL
      /return
   }
   /if (!${FindItem[=${healpotname}].ID}) /varset healpotname NULL
   /if (${FindItem[=Healing Potion X].ID}) {
      /if (${announce}==1) /g WHEW -----> Healing Potion Used
      /varset healpotname Healing Potion X
      /goto :casthealpot
   }
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion IX].ID}) /varset healpotname Healing Potion IX
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion VIII].ID}) /varset healpotname Healing Potion VIII
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion VII].ID}) /varset healpotname Healing Potion VII
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion VI].ID}) /varset healpotname Healing Potion VI
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion V].ID}) /varset healpotname Healing Potion V
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion IV].ID}) /varset healpotname Healing Potion IV
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion III].ID}) /varset healpotname Healing Potion III
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion II].ID}) /varset healpotname Healing Potion II
   /if (${healpotname.Equal[NULL]}) /if (${FindItem[=Healing Potion I].ID}) /varset healpotname Healing Potion I
   :casthealpot
   /call Cast "${healpotname}" item
   /varset healpottimer 0
   /timed 1200 /varset healpottimer 1
/return


Sub ClarPotUse
|**  Call from the rebuff or buffbeg subroutine if no enc clarity effects are available
Example of a call for this routine:
   /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 ((!${Spawn[PC enchanter].ID})||(${NearestSpawn[PC enchanter].Distance}>200)) {
         /call ClarPotUse
      }
   }
**|
   /if (!${Defined[clarpottimer]}) /declare clarpottimer int outer 1
   /if (!${Defined[clarpotname]}) /declare clarpotname string outer NULL
   /if (${clarpottimer}==0) /return
   /if (!${FindItem[Elixir of Clarity].ID}) {
      /varset clarpotname NULL
      /return
   }
   /if (!${FindItem[=${clarpotname}].ID}) /varset clarpotname NULL
   /if (${FindItem[=Elixir of Clarity X].ID}) /varset clarpotname Elixir of Clarity X
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity IX].ID}) /varset clarpotname Elixir of Clarity IX
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity VIII].ID}) /varset clarpotname Elixir of Clarity VIII
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity VII].ID}) /varset clarpotname Elixir of Clarity VII
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity VI].ID}) /varset clarpotname Elixir of Clarity VI
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity V].ID}) /varset clarpotname Elixir of Clarity V
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity IV].ID}) /varset clarpotname Elixir of Clarity IV
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity III].ID}) /varset clarpotname Elixir of Clarity III
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity II].ID}) /varset clarpotname Elixir of Clarity II
   /if (${clarpotname.Equal[NULL]}) /if (${FindItem[=Elixir of Clarity I].ID}) /varset clarpotname Elixir of Clarity I
   /if ((!${Me.Buff[Elixir of Clarity X].ID})&&(!${Me.Buff[Elixir of Clarity IX].ID})&&(!${Me.Buff[Elixir of Clarity VIII].ID})&&(!${Me.Buff[Elixir of Clarity VII].ID})&&(!${Me.Buff[Elixir of Clarity VI].ID})&&(!${Me.Buff[Elixir of Clarity V].ID})&&(!${Me.Buff[Elixir of Clarity IV].ID})&&(!${Me.Buff[Elixir of Clarity III].ID})&&(!${Me.Buff[Elixir of Clarity II].ID})&&(!${Me.Buff[Elixir of Clarity I].ID})) {
      /call Cast "${clarpotname}" item
      /varset clarpottimer 0
      /timed 26700 /varset clarpottimer 1
   }
/return


Sub Event_Chat(string ChatType,string Sender,string ChatText) 
   /if ((!${ChatType.Equal[${mychannel}]})&&(!${ChatType.Equal[TELL]})&&(!${ChatType.Equal[group]})) /return 
   /if (${usegroupchat}==0) /if (${ChatType.Equal[group]}) /return
   /call ChatParse ${ChatType} ${Sender} "${ChatText}"
/return


Sub Event_IRCchat(string Line,string Sender,string ChatText)
   /call ChatParse IRC ${Sender} "${ChatText}"
/return
Edit 08/24/2005: Fixed my many misuses of the ${String* TLO, added support for the new healing and clarity potions, added optional IRC support. For IRC server daemon I run ignitionServer on my LAN gateway machine at 192.168.0.1, with its essentially default setings. Edit line 158 as needed for your IRC setup.
Last edited by fantum409 on Wed Aug 24, 2005 11:59 pm, edited 43 times in total.

Kore
orc pawn
orc pawn
Posts: 13
Joined: Fri Jun 04, 2004 4:38 am

Post by Kore » Sat Jun 05, 2004 2:03 am

Nice = ) I intend to try this out

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Tue Jun 08, 2004 6:44 am

WOW! I like this macro a lot. I came here looking for a cleric bot macro and I like this a lot better than the older ones!

I had 2 thoughts, first I thought I would mention:
-Have you seen Rusty's Spell_routines.inc? Its basically an adaptation of SpellCast.inc but I like it a lot because it seems to returns control back to your macro a little faster. Ive started using it for my macros instead of SpellCast and thought you might like it as well.

-Have you considered adding an ini files for your toons and people you commonly group with?
What I have in mind is something like:
(AFKCleric.ini)

Code: Select all

[General]
Tank=<Last tank name> (could use it as a default if macro is started without a Tank targeted)
autohealmode=<default value>
defaulthealspell=<default heal spell>
defaulthealth=<default % to heal at>
[JoeChanter]
UnbuffedHP=4923
MaxBuffedHP=7400
Buff1="Symbol of Kazad"
Buff2="Blessing of Revrence"

[UberWarrior]
UnbuffedHP=8000
MaxBuffedHP=10500
Buff1="Symbol of Kazad"
Buff2="Ward of Gallantry"

[GimpPally]
UnbuffedHP=7000
MaxBuffedHP=9500
Buff1="Virtue"
Buff2="Blessing of Revrence"
Buff3="Bulwark of Vie"

...
What Im thinking is that if you know exactly how many hps someone has (and if its an alt or a friend you regularly group with you very well might) you could start using actual hps and plan heals accordingly. If you know someone is down 2200 hps, you might use SR. Down 3800 maybe use SL... 7800 HP chanter down to 700, but no mobs around...maybe CH him between mobs. Dont know if you wanna get quite that fancy, but you could if you wanted.

Anyway, just thought I would mention it and see if it was something you wanted to add. Like the looks of this macro a lot already tho, gonna try and load up and cleric as a 3rd toon and test it out later on tonight when I go farmin.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Tue Jun 08, 2004 7:41 am

You missed some classes..

Code: Select all

/if ((${Target.Class.Name.Equal[Warrior]})||(${Target.Class.Name.Equal[Paladin]})[color=red]||(${Target.Class.Name.Equal[Ranger]})||(${Target.Class.Name.Equal[Beastlord]})||(${Target.Class.Name.Equal[Beserker]})||(${Target.Class.Name.Equal[Rouge]})[/color]||(${Target.Class.Name.Equal[Shadow Knight]})) { 
      /if ((${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})&&(${majorhurt}<=0)&&(${minorhurt}<=2)) { 
         /if ${announce}==1 /g Casting ${healspell} on %T

loadingpleasewait
a snow griffon
a snow griffon
Posts: 332
Joined: Sat Sep 14, 2002 8:46 am

Post by loadingpleasewait » Tue Jun 08, 2004 8:56 am

Goofmester1 wrote:You missed some classes..

Code: Select all

/if ((${Target.Class.Name.Equal[Warrior]})||(${Target.Class.Name.Equal[Paladin]})[color=red]||(${Target.Class.Name.Equal[Ranger]})||(${Target.Class.Name.Equal[Beastlord]})||(${Target.Class.Name.Equal[Beserker]})||(${Target.Class.Name.Equal[[/color][color=violet]Rogue[/color][color=red]]})[/color]||(${Target.Class.Name.Equal[Shadow Knight]})) { 
      /if ((${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})&&(${majorhurt}<=0)&&(${minorhurt}<=2)) { 
         /if ${announce}==1 /g Casting ${healspell} on %T
:wink:
LOADING PLEASE WAIT...

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Tue Jun 08, 2004 5:36 pm

Those classes weren't really missed, they just weren't given a specific set of rules to govern their heals, and will be healed with the ${patchheal}.

What that section of code was meant to express is that if nobody else in the group is significantly hurt, and the MT isn't hurt, its OK to cast ${healspell} on war, shd, or pal. Since ${healspell} is usually 10 second CH, the only classes that qualify for it are plate tanks. Thus a group's backup tank can get CH'd if the MT isn't taking hits. Silk classes and druids also got a specific set of heal rules aimed at mana conservation for the cleric (ie the ${hotspell}). Hybrids and other classes get healed with the ${patchheal} by default.

And BTW I'm looking over Rusty's Spell_routines.inc, but have been kinda holding out for an update on spellcast.inc again, since its been such a reliable work in progress for a while now. However, when I get some time to test it out I might just switch over to it. =)

First on my list though is adding some anti-spamming code so that when target is OOR or cleric LOM it wont make it quite as obvious that cleric is a bot...

Kore
orc pawn
orc pawn
Posts: 13
Joined: Fri Jun 04, 2004 4:38 am

Post by Kore » Thu Jun 10, 2004 5:09 am

for some reason when autosit = 2, the cleric just keeps sitting and standing very rapidly.

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Fri Jun 11, 2004 12:23 am

Thanks Kore, should be fixed now. In autosit=2, it would send a /sit command every time it cycled through checking everyone's health and returned to the medtime sub. Now it will bool if standing before issueing a /sit command. =)
I also made it heal self more aggressively. No time for messing with a hotspell on self when taking hits, safer to just use the patch spell.

Sydney_Perpetrator
decaying skeleton
decaying skeleton
Posts: 7
Joined: Wed May 26, 2004 1:22 pm

Post by Sydney_Perpetrator » Sat Jun 12, 2004 1:15 am

Any chance of adding a call to cast Marks on MT's assist on this ? Would be helpful for me at least =-)

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Sat Jun 12, 2004 2:28 am

At what mob HP percent should MOK be cast? Do it on every mob? Only do it when MT and everyone else are high HP and you have lots of mana?
Or make a manually triggerred routine to chain MOK a single mob until it successfully lands, then announce it?

I'm not sure I want to put this into the main mac, but if you tell me what you want I'll post an add-on for you.

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Sat Jun 12, 2004 9:44 pm

could you add a way to manually sit? in autosit 1 or 2 I CANT sit down after standing and moving until I cast a heal spell.

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Sat Jun 12, 2004 11:00 pm

The standing up is automatic for a reason. If you have >=99% mana, or if your hurt you stand automatically to prevent unnecessarily drawing aggro. IMO your better off automatically standing any time you dont need to sit to med. However, I changed it so that if autosit=0 it never tells the cleric to sit or stand at all.
Also fixed a syntax error that could cause the macro to end if a secondary tank got healed with the ${healspell}

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Sun Jun 13, 2004 4:05 pm

i love this macro ty much .. any way to add a routine in there for chat event for buff .

MSMage
a lesser mummy
a lesser mummy
Posts: 37
Joined: Sun Aug 03, 2003 3:14 am

Post by MSMage » Tue Jun 15, 2004 8:28 am

I think a nice adition to the autosit feature would be a fourth option to cast yaulp instead of sitting to med. There are alot of times i find myself botting clerics where yaulp does more good than sitting because of the amount of time theyre allowed to sit.

EDIT: Posted before i finished, but i just wanted to add that this macro has been a hell of alot of help. I find the hardest part when botting is healing for me, and this took all the insanity out of it.
MSMage

fantum409
a ghoul
a ghoul
Posts: 141
Joined: Fri Nov 14, 2003 10:03 pm

Post by fantum409 » Tue Jun 15, 2004 9:19 pm

Good idea on the Yaulp, its added. If you don't have spirit of tunare, spiritual vigor, or Vallon spells on, are LoM, and are standing it will cast yaulp. But only if you mem Yaulp, no need to config anything - don't wanna yaulp, just dont mem it.

FYI the bot control is coming, I just need some time to write it and work out the bugs. Thinking of adding a follow routine, groupbuff, single buff, etc.
Last edited by fantum409 on Fri Jun 18, 2004 12:23 am, edited 1 time in total.