Healing Charmed/DA people

Need help with a macro you are writing? Ask here!

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

Healing Charmed/DA people

Post by A_Druid_00 » Thu Dec 23, 2004 9:44 am

One issue I've run into a couple times that I'm thinking of working around is healing people who are DA, Charmed, or otherwise in a state that doesn't allow me to heal them.

So what I'm thinking of doing is setting an int that gets set to Target.PctHPs before I fire the heal, and then compares my Target.PctHPs after the heal lands to see if it managed to heal them at all. If my Target. PctHPs is >= the HPs when I started the heal, I guess I'll call it good. I thought about just making it == to the target's Starting HPs, but those pesky clerics and their heal over time spells are going to screw it up.

Has anyone else made a decent workaround for this? I'm not seeing anything in the popular healing macs out there.

The only issue I can see coming up with the way I've currently envisioned it is if someone manages to take enough damage that my heal doesn't put them over the PctHPs I set when the heal started. It would be a rare occurance to be sure, but one I'm worried about. I suppose I could periodically evaluate their HPs agains the original value and if they start decreasing set the Timer to 0 or something.
[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]

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Thu Dec 23, 2004 10:56 am

The only way I've solved it is to either not use DA, or to have my tanks call out when they are invuln. I don't really play much outside of my own bots or other macroers though, obviously it can't be done this way in a normal setting.

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 Dec 24, 2004 11:47 am

Here's what I've come up with so far. It's probably more complicated than it needs to be, but it's just crazy enough that it might work. Take a look at the logic and let me know if it looks sound to you guys.

Basically what it does is sets StartHPs before the heal is cast, then evaluates the target's HPs after the cast against the StartHPs. If their HPs are equal to or less than 5% higher than when I started to heal, it will set their DA flag in the array to 1, and record their StartHPs value. The heal logic will evaluate this DA flag before it casts the next heal.

The next time it goes through the loop, it evaluate's that person's HPs against StartHPs again, and if it's 5% higher or less than the stored StartHPs value, it sets their flag to 0.

Code: Select all

/declare i            int local
/declare DAArray[6,2] int outer
/declare StartHPs     int local
/for i 0 to ${Group}
/if (${DAArray[${i},2]}==1 && (${GroupMember[${i}].PctHPs}>=${Math.Calc[${DAArray[${i},1]}+5]} || ${GroupMember[${i}].PctHPs}<${DAArray[${i},1]}) {
  /varset DAArray[${i},1] 0
  /varset DAArray[${i},2] 0
}
Decision to heal goes here, checking the DA Flag set in DAArray[${i},2].  If the flag returns true, it goes to the next member. If false it then sets the StartHPs to that groupmember's HPs.
|Heal Junk Goes Here
/if (${GroupMember[${i}].PctHPs}<${Math.Calc[${StartHPs}+5]} && ${GroupMember[${i}].PctHPs}>=${StartHPs}) {
  /varset DAArray[${i},1] ${StartHPs}
  /varset DAArray[${i},2] 1
}
/next i
[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]

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 2:36 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 2:37 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:14 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:16 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:17 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:54 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:55 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:56 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:57 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 3:58 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 4:00 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Healing Charmed/DA people

Post by xyilla » Wed Mar 12, 2025 4:01 pm