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

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

Moderator: MacroQuest Developers

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Fri Jan 07, 2005 2:49 pm

NP, I'll help you out by saying this check will belong in the CheckHP sub. You'll probably also want to add a check to the first line of the code I posted to make sure that you are indeed casting CH before you /call Interrupt.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

gohan4
a ghoul
a ghoul
Posts: 85
Joined: Sat Dec 18, 2004 11:36 am

Post by gohan4 » Fri Jan 07, 2005 2:52 pm

Well..I am sorry but I can't figure out where to input that code and which variables I need to change. I am curious as to why this type of thing hasn't been implemented into the Macro already. BTW this and Druid's raid macro are awesome work.

Thanks

Neolesh
a hill giant
a hill giant
Posts: 231
Joined: Mon Aug 23, 2004 11:15 am

Post by Neolesh » Fri Jan 07, 2005 5:32 pm

At least show us what you've tried to do and maybe we can help. I don't think anyone here is going to rewrite an entire subroutine for you.

gohan4
a ghoul
a ghoul
Posts: 85
Joined: Sat Dec 18, 2004 11:36 am

Post by gohan4 » Fri Jan 07, 2005 6:52 pm

Code: Select all

   /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
   }
   /if (${Spawn[${Target.ID}].PctHPs}<${Math.Calc[0.5]*} && ${castEndTime}>37) { 
      /call Interrupt 
      /if (${Target.ID}==${TankID}) /call CastSpell "${LightMsg}" "${TankHS}" spell CheckHP 
      /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) /g Casting ${patchheal} on %T 
            /call Cast "${patchheal}" gem2 1s CheckHP 
            /delay 15 ${Me.SpellReady[${patchheal}]} 
         } 
      }

Neolesh
a hill giant
a hill giant
Posts: 231
Joined: Mon Aug 23, 2004 11:15 am

Post by Neolesh » Fri Jan 07, 2005 7:01 pm

What sub routine is that?

Edit: Actually you know what. What you want to do is complicated enough that you really should learn more than cut/paste/post/hopeforthebest.

The answer to your question lies in the Manual and in the documentation for Spell_Routines.inc

gohan4
a ghoul
a ghoul
Posts: 85
Joined: Sat Dec 18, 2004 11:36 am

Post by gohan4 » Mon Jan 10, 2005 2:34 pm

Somehow I missed your post Druid. I believe its something like this except I'm not sure how to add to see if its casting a CH.

Code: Select all


Sub CheckHP
   /if (${Spawn[${TankID}].PctHPs}<${Math.Calc[${MTHP}*0.5]} && ${castEndTime}>37) { 
         /call Interrupt 
         /if (${Target.ID}==${TankID}) /call CastSpell "${LightMsg}" "${TankHS}" spell CheckHP 
         /return 
   }
   /if (!${Window[CastingWindow].Open}) /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 

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon Jan 10, 2005 2:41 pm

Use Me.Casting instead of !Window to check if you're casting a spell. Not sure why fantum likes using the presence of the casting window as an indicator so much. Same means to an end though.

If you can't figure out how to use Me.Casting, RTFM some more. Consider it a homework assignment.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Virtuoso65
a hill giant
a hill giant
Posts: 150
Joined: Wed Oct 15, 2003 2:29 pm

Post by Virtuoso65 » Mon Jan 10, 2005 4:50 pm

Me.Casting didnt work properly for a while thats why he used the window check.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon Jan 10, 2005 6:16 pm

That would explain it. Must have been before my time here.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

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

Post by fantum409 » Wed Jan 12, 2005 9:29 pm

Hi all. Sorry for reading and posting so infrequently on this macro, been kinda busy. Some thoughts on the last few posts about interrupting only a CH, to cast a short duration healspell...
A_Druid_00 wrote:I don't think anyone posted that here. Neolesh did post code similar to that in my Raid Druid thread though.

Code: Select all

/if (${Spawn[${TankID}].PctHPs}<${Math.Calc[${MTHP}*0.5]} && ${castEndTime}>37) { 
      /call Interrupt 
      /if (${Target.ID}==${TankID}) /call CastSpell "${LightMsg}" "${TankHS}" spell CheckHP 
      /return 
   }
You'll have to change the name of the variables to match whatever it is AFCleric uses, but it'd fit in here.
Careful with using ${Spawn[whatever]}. If you want to know the HP of any entity that isnt in your group, you have to target it. Otherwise, your client will think it still has same HP as last time it was targeted, default full health. The client just isnt sent that kind of data otherwise. Probably in your example ${Spawn[whatever]} does happen to be targeted, so client would be giving accurate result of ${Spawn[whatever].PctHPs}. Personally, I like to talk about HP in terms of ${Target.PctHPs} or ${Group[${n}].PctHPs} for that reason. That looks like a really good idea though. How about

Code: Select all

/if ((${autointerrupt}==1)&&(${String[${Me.Casting}].Equal[Complete Healing]})) /if (${Target.PctHPs}<=${Math.Calc[${tankhealpoint}*0.5]})&&(${castEndTime}>${Math.Calc[${Math.Calc[${Spell[${patchheal}].MyCastTime}*10]}+5]})) { 
   /call Interupt 
   /return 
}
That snippet should be put in after the last section of the CheckHP sub, cause by then if it could have used div arb (ie tank is grouped with you and the ability is ready) it would have done so. This should interrupt a CH only if there is enough time remaining for the patchheal to go off, plus 0.5 secs .. got to account for some amount of lag. Might need more in there depending on your play conditions. And no need to call a spell cast right from checkhp suc.. this will happen automatically just by returning if the tank is that low on hp
Incidentally, the line about !${Window[blahblah being open or else /return is a solution to a problem where checkhp was getting called by spell_routines.inc even after the spell had already landed, causing cleric to kill a horse when no need for it. Might have been from a problem with ${Me.Casting}, never tested/read spell_routines enough to know...
I havent tested this, but should be ok =) /cringes
Hope I'm not posting crap for you to beta test. Raiding atm or I would test it.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Thu Jan 13, 2005 6:51 am

fantum409 wrote:Careful with using ${Spawn[whatever]}. If you want to know the HP of any entity that isnt in your group, you have to target it. Otherwise, your client will think it still has same HP as last time it was targeted, default full health. The client just isnt sent that kind of data otherwise. Probably in your example ${Spawn[whatever]} does happen to be targeted, so client would be giving accurate result of ${Spawn[whatever].PctHPs}.
In most macs, I fully agree with you. But, since your mac has the tank targetted at ALL times, it's sort of a non issue. It's also in the CheckHP Sub, which implies that the target is your heal target. But yeah, I wouldn't use that type of logic in most subs.
Incidentally, the line about !${Window[blahblah being open or else /return is a solution to a problem where checkhp was getting called by spell_routines.inc even after the spell had already landed, causing cleric to kill a horse when no need for it. Might have been from a problem with ${Me.Casting}, never tested/read spell_routines enough to know...
I havent tested this, but should be ok =) /cringes
I had the same issue with spell routines wanting to dismount me after successful heals. I ended up using

Code: Select all

!${Me.Casting.ID}
Like I said in my other post, it's the same means to an end. I had just never seen anyone else use the casting window to identify whether or not an interrupt was needed.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

jiggaman
a lesser mummy
a lesser mummy
Posts: 45
Joined: Mon Jan 10, 2005 4:40 am

Post by jiggaman » Sun Jan 16, 2005 4:50 am

This is such an awesome mac. It helps to much when boxing melee classes in a group. I was wondering, is there anyone to add the cleric epic 1.5 and 2.0 into it so that it uses epic first before attempting DArb? Just thought it would be a good addition to an already great mac.

Mystic_Blue
a lesser mummy
a lesser mummy
Posts: 69
Joined: Sat Jan 22, 2005 3:31 am

A little newbie help please

Post by Mystic_Blue » Sat Jan 22, 2005 5:06 pm

Yes, I have read the manual, several times.

Yes, I have read EVERY POST in this thread, twice.

Yes, I have searched numerous times looking for the answer to this question, and I just cant find it.

Here is the problem. I can compile mq2 just fine, but when I try to add and compile AFKCLERIC or just comile AFKCLERIC by itself, I get errors that it cant find the /INCLUDE file (spell_routines.inc) .

I have placed that file in the /afkcleric folder, no joy.

I suspect the problem is how I am creatiing the .inc file. I have tried using Notepad, and saving as a text file with extension .inc

I have tried using VS.net to cut and past the code into a blank template.

I am fairly sure I am doing some silly little thing wrong, and will have a major DOH moment when I get the answer, but for now I am totally stuck.

Ok, I have read enough posts here to realize that I am likely to be deeply abused. I dont really care, as long as SOMEONE actually offers some valid help.

Albert Einstein once said that one only truly understands a thing if they can teach it to a child.

The sad thing here in these forums are that there are so many who will spend more time flaming someone trying to learn, than it would take to help a bit.

Scythen60
orc pawn
orc pawn
Posts: 16
Joined: Thu Apr 22, 2004 1:30 am

Post by Scythen60 » Sat Jan 22, 2005 5:09 pm

you dont compile macros. save it as afkcleric.mac into the dir\release\macros folder and run it in game as /mac afkcleric

User avatar
LrdDread
a snow griffon
a snow griffon
Posts: 343
Joined: Sun Sep 12, 2004 7:55 am
Contact:

Re: A little newbie help please

Post by LrdDread » Sat Jan 22, 2005 5:27 pm

Mystic_Blue wrote:I have placed that file in the /afkcleric folder, no joy.
Try putting both the AFCleric.mac and Spell_Routines.inc in the "MQ2"/Release/Macros Folder