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

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

Moderator: MacroQuest Developers

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Wed Aug 04, 2004 5:40 pm

fantum409 wrote:I haven't figured out a fix for that targeting bug.
Try this. I put it together pretty quickly and I haven't tested it very well, couldn't find 2 char's with names like that to test it on. Should work though (famous last words :) ..

Code: Select all

/call FindExactPC joe
/if (${Macro.Return}) /target id ${Macro.Return}

Code: Select all

Sub FindExactPC(string Name)
	/declare CurrentID int local
	/declare FirstID int local
	/declare Counter int local 1
	/varset FirstID ${Spawn[pc ${Name}].ID}
	/varset CurrentID ${FirstID}
	
	:FindNext
		/if (!${CurrentID} || ${Spawn[id ${CurrentID}].CleanName.Equal[${Name}]}) /return ${CurrentID}
		/varset CurrentID ${Spawn[id ${FirstID}].NearestSpawn[${Counter},pc ${Name}].ID}
		/varcalc Counter ${Counter}+1
	/goto :FindNext
	
/return 0

Mixy
a lesser mummy
a lesser mummy
Posts: 46
Joined: Tue Jul 09, 2002 5:00 pm

Post by Mixy » Wed Aug 04, 2004 8:19 pm

Nevermind

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

Post by fantum409 » Thu Aug 05, 2004 3:22 am

Beta posting removed now that the new code is posted to front page. Hopefully bugs worked out for now.
Last edited by fantum409 on Thu Aug 12, 2004 12:38 pm, edited 3 times in total.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Thu Aug 05, 2004 1:39 pm

Searching for a spawn using ${Spawn[name]} is unreliable. Adding an extra check for the spawn's class will make it less unreliable but it's still not certain. What if you have two warriors with almost the same name?

Use ${Spawn[name].Equal[xxx]} to make sure you get an exact match.
And, target using ID, not name since the same problems with names exist in /target as in ${Spawn[]}. /target ${Spawn[id]} will not target by id, it will target by name. Use "/target id ${TankID}" instead.

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

Post by fantum409 » Thu Aug 05, 2004 9:22 pm

Thanks blueninja. That works a hell of a lot better lol.

I changed my check for new entity with number previously assigned to MT, think I have it the way you suggested:

Code: Select all

${String[${Spawn[${tanknameid}]}].NotEqual[${tankname}]}
That what your talking about?
Every time I think I have RTFM I find another thing I missed.

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Fri Aug 06, 2004 11:01 am

Yup, that's what I was talking about :) ..

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

Post by fantum409 » Fri Aug 06, 2004 2:14 pm

Another installment to the beta on this page. Targeting by ID# for chat functions also.

How is this working for any of you pet classes and players with multiple chars with almost identical names?

WiKKiD
orc pawn
orc pawn
Posts: 13
Joined: Tue Dec 09, 2003 3:15 pm

Post by WiKKiD » Sat Aug 07, 2004 6:41 am

Been working with the revised version for about 2 hours now... Still get the ducking after a heal had landed, kinda weird.. But I'll just disbale the duck code anyways.

One weird one, I haven't looked too far into it (I'm alt tabbed out of game atm), I afk'd for a few, came back and my necro was at 39%. Just standing, liching emself down.. So I did a ch me in the channel, cleric began to cast, but then ducked it, saying that I wasn't staying fd.. Strangely, hot me worked fine.. :)

the good news, it didn't have the slightest problem with targetting.. Stayed on the tank, perfectly.. even jumped in and ch'd the necro pet while it offtanked adds. :)

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

Post by fantum409 » Sat Aug 07, 2004 11:03 am

Thanks Wikkid. onlyhealfd is an option, turn it to 0 in the beginning of the macro if you like. The reason its there is cause they sometimes pull, and wouldnt want a bot cleric healing a puller and bringing a train to the group.

I need to find a way to stop the nutty interrupt message, or disable that text altogether. Will be fixed soon.

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Sat Aug 07, 2004 12:16 pm

shouldnt disable the duck code just go in and delete the /g Ducking Heal lines. As he isnt actually ducking other then on classes with FD like monks. no reason to disable it.

WiKKiD
orc pawn
orc pawn
Posts: 13
Joined: Tue Dec 09, 2003 3:15 pm

Post by WiKKiD » Sat Aug 07, 2004 1:08 pm

On the ducking issue... The heals do land.. It will call it's casting, the heal lands, then it says it's ducking it off (Doing a health check after the heal has landed, presumably).

The no heal fd'n class, well that's just my own ignorance.. I have since looked at the code and see how it works.. Makes perfect sense. Tho I think I will modify it slighty, so this doesn't apply to requested heals, just auto-heals.

The ducking on a heal that isn't needed is a great idea, I personally disable it because when I use the cleric, they're the only one that's gonna be casting any heals at all, so there'll never be a need to duck one.. But I suspect in many cases (ie: botted raid cleric, a group with 2 healers in god, etc), this is a very handy feature..

I won't even attempt to say I understand the code enough to know where it's off, but I would guess, for sure, that when it does it's heal check, somehow it's doing one before, and after a ch. From what I can tell, it only happens on the auto-ch, never any of the requested heals.

Hope that helps some. :)

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

Post by fantum409 » Sat Aug 07, 2004 6:05 pm

I believe spell_routines.inc lets it loop into the CheckHP sub routine after the spell has landed. But I'm not 100% sure on that. I'm playing with shortening the checkhp logic in my macro to see if that helps. I may end up taking out the </g ducking heal on soandso> lines as its the easiest fix, but its nice to know when heals get ducked. /sigh

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

Post by DumbStruck » Thu Aug 12, 2004 1:28 am

I had an issue with the macro constantly dismounting from lizard after i cast any kinda heal.Was a bit tuff on my clerics 3800 mana pool. Rusty (spell_routines.inc) suggested i place this code at the tope of his inc.

Code: Select all

/declare noInterrupt int outer 1
Along with taking off interupt etc it now works great thanx for this great macro its 10 X the cleric i could ever be ..

Just wondering has the beta listed within the pages been debugged ? is it ready for use yet ?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Aug 12, 2004 6:52 am

DumbStruck wrote:I had an issue with the macro constantly dismounting from lizard after i cast any kinda heal.Was a bit tuff on my clerics 3800 mana pool. Rusty (spell_routines.inc) suggested i place this code at the tope of his inc.

Code: Select all

/declare noInterrupt int outer 1
Along with taking off interupt etc it now works great thanx for this great macro its 10 X the cleric i could ever be ..
Do you mean something like this...

Code: Select all

/declare noInterrupt int outer 1

#event BeginCast "You begin casting#*#" 
#event Collapse "Your gate is too unstable, and collapses.#*#" 
#event Fizzle "Your spell fizzles#*#" 
#event Immune "Your target is immune to changes in its attack speed#*#" 
#event Immune "Your target is immune to changes in its run speed#*#" 
#event Immune "Your target cannot be mesmerized#*#" 
#event Interrupt "Your casting has been interrupted#*#" 
#event Interrupt "Your spell is interrupted#*#" 
#event NoLOS "You cannot see your target.#*#" 
#event NoTarget "You must first select a target for this spell!#*#" 
#event NotReady "Spell recast time not yet met.#*#" 
#event OutOfMana "Insufficient Mana to cast this spell!#*#" 
#event OutOfRange "Your target is out of range, get closer!#*#" 
#event Recover "You haven't recovered yet...#*#" 
#event Recover "Spell recovery time not yet met#*#" 
#event Resisted "Your target resisted the #*#" 
#event Standing "You must be standing to cast a spell#*#" 
#event Stunned "You have been stunned.#*#" 
#event Stunned "You cannot cast while stunned#*#" 
#event Stunned "You *CANNOT* cast spells, you have been silenced!#*#" 
Copy paste of code is top of actual inc info just below all the commented documenation.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

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

Post by fantum409 » Thu Aug 12, 2004 12:32 pm

The mount bug should be fixed, so don't disable interrupts for that reason. However, if for some other reason you dont want to interrupt at all you could just use

Code: Select all

/declare noInterrupt int outer 0
in the beginning of AFCleric where the other declares are, then make a hotkey in game

Code: Select all

/varset noInterrupt 1
If you just disable interrupts by default and forget about it, your probably wasting a lot more mana than you save by being mounted.


BTW: I posted an updated version of the above "beta" to front page along with a couple new chat commands. The duck heal message bug should also be fixed now, which is the same bug that is causing your mounts to get cancelled out after every heal.