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

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

Moderator: MacroQuest Developers

Omiime
a ghoul
a ghoul
Posts: 92
Joined: Tue Mar 30, 2004 9:53 pm

Post by Omiime » Wed Jun 16, 2004 9:47 am

hi Fantum. Been using your macro since you posted.

I'm still running first one you posted, haven't updated yet. Don't really like the sit option anyway :)

I've really only had problem with SupernalElixir and I think that has to do with spellcast.inc. As it spams something about timer not up.

if you happen to be bored tho. think you could add feature for group heal?
eg. of all group members health are below 80% (or whatever ) do groupheal(there are different ones, CH group and fast group heal)


I run it in mode3 if wanted to know.

My cleric does die tho. wishh he would stop casting CH, if his health is going down and DA or heal himself :)

Oh, and he shouldn't try to heal anyone, including the tank, unless they are in 'range'

msdss
decaying skeleton
decaying skeleton
Posts: 6
Joined: Fri Apr 30, 2004 8:13 pm

Post by msdss » Wed Jun 16, 2004 12:07 pm

a few problems that i've noticed with this script...

first off, in this high high end game, normal EXP mobs can hit a wizard for 1100 in zones such as Kod'Taz...... if the script is goign to cast fucken supernal elixir, then it might as well pull out the epic at the same time, because he's going to die.... In that situation I would almost always use supernal remedy, or holy light...

another thing is... now with the new expansion, supernal elixir, and supernal light.... those spells are useless to me... the new verions Holy Light and Holy Elixir are much better if you have the gear to support it...


Over all this is a very kick ass script, and two thumbs up to the guy that wrote it, playing a cleric in a exp grind group can be..... less than exciting at times, and this makes it so I can not necessarily go AFK, but glance at the TV for a little longer =p ...

If there is any way to change the two things I mentioned above, please let me know... I know jack shit about how to write macros, but maybe if someone could show me what to change , I can start to learn a little bit....

Oh well... Thanks to whoever doesn't flame me for not knowing how to write scripts... and Thanks again to whoever wrote this... works well....

khozik
orc pawn
orc pawn
Posts: 28
Joined: Fri Oct 10, 2003 1:42 pm

Post by khozik » Wed Jun 16, 2004 1:42 pm

/declare patchheal string outer Supernal Light
/declare hotspell string outer Supernal Elixir

just change those 2 to whatever heal you want..

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Wed Jun 16, 2004 5:04 pm

My cleric does die tho. wishh he would stop casting CH, if his health is going down and DA or heal himself :)
if you replace spellcast.inc with spell_routines.inc you could do this fairly easily. one of the problems with spellcast.inc is it basically doesn't let you do anything while it's casting a spell until the spell is done casting. in the 10 seconds CH takes, lots of things can happen. maybe you get an add and it starts eating the chanter and he needs a fast heal or maybe you're about to die and need to DA like you said.

instead of say

Code: Select all

/call Cast "${healspell}" 
you could do

Code: Select all

/call Cast "${healspell}"  gem1 0 CheckHP
then somewhere in macro have something like this (this is just an example sub)

Code: Select all

Sub CheckHP
   /if ( ${Me.PctHPs}<29 ) /call Cast "${daspell}" gem8 3s
/return
of course this is just a small example. this could be easily implemented if people just wanted to write their own small changes.

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

Post by fantum409 » Wed Jun 16, 2004 5:54 pm

You guys bring up some good points, thank you for the feedback. Cleric is not my main, so I appreciate the pointers.
Omiime you should really upgrade to the newest version, it has some bug fixes and the features can easily be turned off if you don't like them, ie: change the autosit option to 0, only mem yaulp vi if you dont mind using it when standing and LOM... etc. Also, the spam about the hotspell timer not being up yet simply means the cleric cycled through everyone's health and that caster is still the worsthurt, but more then 60% health, and already has the hotspell buff on him - so it waits until that caster gets low enough health to receive the patchheal, or the hot fades and he can receive it again. Thats part of my macro, not spellcast.inc.
The groupheal is coming - my cleric needs 2 more aa then she'll have group aa heal for me to play with. But if you want to add it now, you could put in a line like this:

Code: Select all

/if ((${Math.Calc[${majorhurt}+${minorhurt}]}==${Math.Calc[${Group}+1]})&&(${Me.AltAbilityReady[38]})) /call Cast "38" activate
in the Sub Healgroup. I would suggest putting it in like this:

Code: Select all

   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /Target pc ${tankname}
      /delay 6 ${Target.Name.Equal[${tankname}]}
      /delay 1
      /if ((${Target.Name.Equal[${tankname}]})&&(${Target.PctHPs}>${healpct})&&(${Me.PctMana}<=98)) /call MedTime
      /return
   }
   [color=red]/if ((${Math.Calc[${majorhurt}+${minorhurt}]}==${Math.Calc[${Group}+1]})&&(${Me.AltAbilityReady[38]})) /call Cast "38" activate[/color]
   /target pc ${worsthurt}
Using the groupheal spells will take a little more thought on my part because of the cast times. Will get there though.
The OOR problem is another thing on my todo list, been debating about a spam timer to announce OOR vs simply ignoring targets that are OOR.

NOTE: if you don't want to use a HoT type spell at all, then set the hotspell variable to supernal remedy, or holy light, or anything you would rather cast. Its OK if you set the hotspell variable to the same spell as the patchheal. I can see your point about mobs hitting fast and hard, and now that some of the pure casters are getting geared up to 8k+ hp it might be better without any hotspell at all, just depends where/how you play EQ. Maybe setting both the hotspell and patchheal variables to Holy Light would work better on uber casters in KT.


Also, observing the patch message today, a new command is added that begs for a major revision of this macro and the spellcast routine inc files... /stopcast
The idea of interrupting spells early based on whatever conditions is an area that could be improved greatly, but will mean rewriting a lot of stuff. Especially with spellcast inc, which doesn't turn control back over to the main macro until the spell has been completely casted.

blaham
decaying skeleton
decaying skeleton
Posts: 4
Joined: Wed Jun 16, 2004 8:05 pm

Post by blaham » Wed Jun 16, 2004 8:09 pm

very nice macro, works well.

got a question for ya if you don't mind...

Will you be adding buff support? Armor of the Zealot, Lunar Whispers (Clickie item), HoV, etc. would be great if the cleric could automatically buff himself / the group.

Also, how would I change it to use target DA instead of the Divine Barrier?

Thanks

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

Post by MSMage » Thu Jun 17, 2004 3:29 am

I also noticed that it has trouble using pets as MTs, i believe this can be fixed by changing all instances of ${Target.Name} to ${Target.CleanName}. Thanks again for this macro :)
MSMage

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

Post by fantum409 » Fri Jun 18, 2004 12:29 am

OK, spell_routines.inc owns. Out with spellcast.inc.
Also wrote in the Yaulp feature... it'll only cast it if your mana is low, your standing, and you don't have sotp, SV, vallon haste on. If you don't want to use yaulp, just don't mem it at all, it wont try to cast unless you have it memmed and ready.

Very soon to come is watching target health during spell casting, with ability to interrupt and also watch own health during casting.

The spell_routines.inc file along with the new /stopcast command will make this mac smarter... just need a little more time to play with it then I will post

Omiime
a ghoul
a ghoul
Posts: 92
Joined: Tue Mar 30, 2004 9:53 pm

Post by Omiime » Fri Jun 18, 2004 2:37 am

Hi, I took your advice and trying the new one you posted.

it's missing this

Code: Select all

   /declare yaulpspell string outer Yaulp VI 
    
   /if (!${Target.ID}) { 
should be

Code: Select all

   /declare yaulpspell string outer Yaulp VI 
    

/varset tankname ${Target}

   /if (!${Target.ID}) { 

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

Post by fantum409 » Fri Jun 18, 2004 4:41 pm

Thanks Omiime! It wouldn't have worked well without that line... guess I better stop posting so late at night. Fixed now though.
=)

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

Post by bzt » Fri Jun 18, 2004 6:55 pm

How do you start this macro WITHOUT targeting a MT? or is that impossible? Each time I try and start it without having someone targeted, it juts doesnt start.

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

Post by fantum409 » Fri Jun 18, 2004 9:12 pm

The logic in this macro is specifically set up to watch a MT. It won't work without setting the MT. If you need to stop auto-targeting the MT (to cast buffs or do other things) then pause the macro with your hotkey.

Code: Select all

/mqpause
then accomplish whatever it is you need to do, hit hotkey again to resume.

Seariz
a lesser mummy
a lesser mummy
Posts: 52
Joined: Thu Feb 06, 2003 1:22 pm
Location: The Computer
Contact:

Post by Seariz » Sun Jun 20, 2004 2:15 am

Hello, I would like to say this is the first cleric macro I have ever fell in love with. Hands down my favorite macro for two boxing my cleric I have ever used. That being said, I use this in my own four box group while the warrior has nice taunt weapons and does not loose agro at all, so when someone gets hit, they get hit for a round or so then the warrior has agro again. I’m quite a ‘newbie’ at writing macros or looking at code but I can usually get by but I am unable to figure out where the heal percent is determined for everyone minus the Main Tank, so I could be a little more mana efficient and heal at maybe 50% health on everyone in the group instead of the 75% or whatever it heals at now. Thank you for your help in advance!
Flame on~
Every work group has one sadistic nut who makes the job unbearable for everyone else. That's why they hired me!

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

Post by fantum409 » Sun Jun 20, 2004 8:19 am

Rebalancing the heals of groupmembers is a little bit of a project, as its kinda "hard coded" into the macro. But in general your looking for: /if (${Target.PctHPs}<=____) /call whatever healspell. I'll break down the healgroup sub for you a little, I think you'll be able to make it do what you want.


This section checks the health of all groupmembers and records how many are minorhurt, how many majorhurt, who is worsthurt, what is worsthp. This is the core of the macro in a lot of ways.

Code: Select all

Sub Healgroup
   :healgroup
   /varset worsthurt NULL
   /varset worsthp 100
   /varset minorhurt 0
   /varset majorhurt 0
   /for gmember 0 to ${Group}
      /if (${Group[${gmember}].PctHPs}<=${worsthp}) {
         /varset worsthurt ${Group[${gmember}].Name}
         /varset worsthp ${Group[${gmember}].PctHPs}
      }
      /if ((${Group[${gmember}].PctHPs}<=85)&&(${Group[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1
      /if ((${Group[${gmember}].PctHPs}<=60)&&(${Group[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1
   /next gmember

This part says if I'm in autohealmode 3, check MT health and self health before healing anyone else. Threshold for calling healself routine is 85%, but the percents to heal self at are coded into the healself routine.

Code: Select all

   /if (${autohealmode}==3) {
      /if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) {
         /Target pc ${tankname}
         /delay 6 ${Target.Name.Equal[${tankname}]}
         /delay 1
         /if ((${Target.Name.Equal[${tankname}]})&&(${Target.PctHPs}<=${healpct})) /return
      }
[color=red]      /if (${Me.PctHPs}<=85) /return [/color]
   }

Med if nobody, including MT, is hurt. If someone is hurt then target worsthurt - if worsthurt happens to be self or MT, refer to the appropriate sub routine.

Code: Select all

   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /Target pc ${tankname}
      /delay 6 ${Target.Name.Equal[${tankname}]}
      /delay 1
      /if ((${Target.Name.Equal[${tankname}]})&&(${Target.PctHPs}>${healpct})&&(${Me.PctMana}<=98)) /call MedTime
      /return
   }
   /target pc ${worsthurt}
   /delay 5 ${Target.Name.Equal[${worsthurt}]}
   /if (!${Target.ID}) /goto :healgroup
   /if (${Target.Name.Equal[${tankname}]}) /return
   /if (${Target.Name.Equal[${Me}]}) {
      /call Healself
      /return
   }

This section effectively handles Pal, SK, War heals exactly as if they were the MT.

Code: Select all

   /if (${Target.Class.Name.Equal[Warrior]})||(${Target.Class.Name.Equal[Paladin]})||(${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
         /call Cast "${healspell}"
         /delay 15 ${Me.SpellReady[${healspell}]}
         /return
      }
      /if ((${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
         /if (${announce}==1) /g Casting ${patchheal} on %T
         /call Cast "${patchheal}"
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /return
      }

This section addresses caster heals (nec, wiz, mag, enc and also dru). If minor injury, cast a hotspell then set a variable to their name. After the hotspell wears off or is about to wear off, change the variable back to NULL again and make that caster eligeable for another hotspell. If caster's health drops too low, cast the patchspell on them.

Code: Select all

   } else /if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Magician]})||(${Target.Class.Name.Equal[Wizard]})||(${Target.Class.Name.Equal[Enchanter]})||(${Target.Class.Name.Equal[Druid]})) {
[color=red]      /if ((${Target.PctHPs}<=86)&&(${Target.PctHPs}>=60)) { [/color]
         /if ((${Target.Name.Equal[${nohotforua}]})||(${Target.Name.Equal[${nohotforub}]})||(${Target.Name.Equal[${nohotforuc}]})||(${Target.Name.Equal[${nohotforud}]})) {
            /echo No ${hotspell} for ${Target.Name} (Timer not up yet)
            /return
         }
         /if (${String[${nohotforua}].Equal[NULL]}) {
            /varset nohotforua ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %T
            /call Cast "${hotspell}"
            /timed 200 /varset nohotforua NULL
         } else /if (${String[${nohotforub}].Equal[NULL]}) {
	    /varset nohotforub ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %T
            /call Cast "${hotspell}"
            /timed 200 /varset nohotforub NULL
         } else /if (${String[${nohotforuc}].Equal[NULL]}) {
	    /varset nohotforuc ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %T
            /call Cast "${hotspell}"
            /timed 200 /varset nohotforuc NULL
         } else /if (${String[${nohotforud}].Equal[NULL]}) {
	    /varset nohotforud ${Target.Name}
            /if (${announce}==1) /g Casting ${hotspell} on %T
            /call Cast "${hotspell}"
            /timed 200 /varset nohotforud NULL
         }
         /return
      }
[color=red]      /if ((${Target.PctHPs}<=59)&&(${Target.PctHPs}>=1)) { [/color]
         /if (${announce}==1) /g Casting ${patchheal} on %T
         /call Cast "${patchheal}"
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /return
      }

This last part casts the patchheal spell on anyone who didn't get addressed above, ie: not a wiz,mag,enc,nec,dru or a War,Pal,SK.

Code: Select all

[color=red]   } else /if ((${Target.PctHPs}<=85)&&(${Target.PctHPs}>=1)) { [/color]
      /if (${announce}==1) /g Casting ${patchheal} on %T
      /call Cast "${patchheal}"
      /delay 15 ${Me.SpellReady[${patchheal}]}
      /return
   }
/return 

MT heals are handled in the main sub, and self heals are handled in the healself sub. If you made it this far, you can probably see how those subs work without breaking it down.

msdss
decaying skeleton
decaying skeleton
Posts: 6
Joined: Fri Apr 30, 2004 8:13 pm

Post by msdss » Sun Jun 20, 2004 11:43 am

I was using this macro when I was 2 running 2 characters in a Sewers Trial yesterday, and it kept erroring out whenever it had to heal the Shadowknight in the group... I didn't think about getting a log at the time, but is anyone else having this problem?