Page 19 of 29
Posted: Fri Jan 07, 2005 2:49 pm
by A_Druid_00
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.
Posted: Fri Jan 07, 2005 2:52 pm
by gohan4
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
Posted: Fri Jan 07, 2005 5:32 pm
by Neolesh
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.
Posted: Fri Jan 07, 2005 6:52 pm
by gohan4
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}]}
}
}
Posted: Fri Jan 07, 2005 7:01 pm
by Neolesh
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
Posted: Mon Jan 10, 2005 2:34 pm
by gohan4
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
Posted: Mon Jan 10, 2005 2:41 pm
by A_Druid_00
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.
Posted: Mon Jan 10, 2005 4:50 pm
by Virtuoso65
Me.Casting didnt work properly for a while thats why he used the window check.
Posted: Mon Jan 10, 2005 6:16 pm
by A_Druid_00
That would explain it. Must have been before my time here.
Posted: Wed Jan 12, 2005 9:29 pm
by fantum409
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.
Posted: Thu Jan 13, 2005 6:51 am
by A_Druid_00
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
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.
Posted: Sun Jan 16, 2005 4:50 am
by jiggaman
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.
A little newbie help please
Posted: Sat Jan 22, 2005 5:06 pm
by Mystic_Blue
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.
Posted: Sat Jan 22, 2005 5:09 pm
by Scythen60
you dont compile macros. save it as afkcleric.mac into the dir\release\macros folder and run it in game as /mac afkcleric
Re: A little newbie help please
Posted: Sat Jan 22, 2005 5:27 pm
by LrdDread
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