Page 9 of 29

Posted: Wed Aug 04, 2004 5:40 pm
by blueninja
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

Posted: Wed Aug 04, 2004 8:19 pm
by Mixy
Nevermind

Posted: Thu Aug 05, 2004 3:22 am
by fantum409
Beta posting removed now that the new code is posted to front page. Hopefully bugs worked out for now.

Posted: Thu Aug 05, 2004 1:39 pm
by blueninja
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.

Posted: Thu Aug 05, 2004 9:22 pm
by fantum409
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.

Posted: Fri Aug 06, 2004 11:01 am
by blueninja
Yup, that's what I was talking about :) ..

Posted: Fri Aug 06, 2004 2:14 pm
by fantum409
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?

Posted: Sat Aug 07, 2004 6:41 am
by WiKKiD
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. :)

Posted: Sat Aug 07, 2004 11:03 am
by fantum409
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.

Posted: Sat Aug 07, 2004 12:16 pm
by JimJohnson
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.

Posted: Sat Aug 07, 2004 1:08 pm
by WiKKiD
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. :)

Posted: Sat Aug 07, 2004 6:05 pm
by fantum409
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

Posted: Thu Aug 12, 2004 1:28 am
by DumbStruck
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 ?

Posted: Thu Aug 12, 2004 6:52 am
by aChallenged1
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.

Posted: Thu Aug 12, 2004 12:32 pm
by fantum409
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.