Intelligent Heal Over Time

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

dedpoet
a hill giant
a hill giant
Posts: 247
Joined: Sat Aug 14, 2004 12:22 pm

Intelligent Heal Over Time

Post by dedpoet » Sun Aug 22, 2004 9:48 am

Greetings All-

I have been working extensively on loadingpleasewait's shaman macro. So far I have quite a few changes in to suit my needs. I have modified the healing sub to be a bit more robust and include patch healing and support a big slow heal (Kragg's) and a smaller fast heal (Tnarg's).

What I'd like to have is a way to use Quiescence as the main heal, patching with another heal when necessary. I've been looking at some of the cleric macros and anything else I can find, and so far have not found anything that does this.

Let's say our heal point is 80 percent (high because it's a HoT). The tank takes a few hits, and at 80% Quiescence is cast. The next time the heal check comes around, he's at 75, but he still has Q on him. I don't want to cast Q again, but since his health isn't low enough to patch heal, it's going to try to do just that. This is what I'm trying to work around. Since you can't really check your target to see if Quiescence is still active, what is the best way to do this? Using a timer seems clunky and doesn't allow for extended heals and such. Casting it on yourself to use as a timer is not practical...

Any suggestions for something like this?

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Sun Aug 22, 2004 10:48 am

advbot has HOT timers so it will not recast before it is supposed to, take a look at it.

dedpoet
a hill giant
a hill giant
Posts: 247
Joined: Sat Aug 14, 2004 12:22 pm

Post by dedpoet » Mon Aug 23, 2004 12:19 pm

I looked at ml2517's advbot stuff, and his stuff is pretty far over my head at the moment. It looks like he's using a 2d array to define a list of people who have been healed.

Code: Select all

/if (${Spell[${HealSpellID[${a}]}].Duration}>0 && ${Macro.Return.Equal["CAST_SUCCESS"]}) {
                            /if (${PetHealFlag}==0) /varset HoTList[${Math.Calc[${b}+1]},1] ${Math.Calc[${Spell[${HealSpellID[${a}]}].Duration.Seconds}+${Macro.RunTime}]}
                            /if (${PetHealFlag}==1) /varset HoTList[${Math.Calc[${b}+1]},2] ${Math.Calc[${Spell[${HealSpellID[${a}]}].Duration.Seconds}+${Macro.RunTime}]}
                            /if (${Spell[${HealSpellID[${a}]}].Duration}>0 && ${Macro.Return.Equal["CAST_SUCCESS"]} && (${TempTargetType.Find["Group"]} || ${HealMinGroupCount[${a}]}>0)) {
                                /for c 0 to ${Group}
                                    /varset HoTList[${Math.Calc[${c}+1]},1] ${Math.Calc[${Spell[${HealSpellID[${a}]}].Duration.Seconds}+${Macro.RunTime}]}
                                /next c
                                /varset GroupHPTotal ${Math.Calc[100*${Math.Calc[${Group}+1]}]}
                                /goto :BreakOutHeal
                            }
} 
That's quite a bit much for me at this point, and in the context of his giant macro, I'm pretty lost still.

Would it be possible to have a 2x6 array, like so:

Code: Select all

Me,        MyPet
Grouped1,  Grouped1's pet
Grouped2,  Grouped2's pet
Grouped3,  Grouped3's pet
Grouped4,  Grouped4's pet
Grouped5,  Grouped5's pet
Declare the heal spell's duration, rather than pull it from the spell data, since they can be extended with AA's and foci. Then, when a group member or pet is healed, we set the array member to the duration of the heal (leave it 0 on an instant heal), then call a HealTimer sub. The HealTimer sub would essentially use the /timed command to set the array member back to 0 at the end of the duration. The heal sub would check this array before casting, and if non-zero for that target, would not cast. An instant heal would have a 0 duration, so would always be cast.

Would that even work? Is that what ml2517 is doing already? Can you have multiple /timed events going on (assuming multiple players have been healed) without bothering the running macro? Am I out of my mind and just making this too difficult?

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Tue Aug 24, 2004 7:47 am

It looks to me that he is using a 2d array like what you are looking at using. How he is storing the duration of the the HoT is by using ${Macro.Running} which returns the current number of seconds the macro has been running. He then adds the duration of the heal in seconds to the ${Macro.Running} variable and stores it in his array.

Without seeing his code I bet he will check the current running time to the timestamp you have in the array and if the current ${Macro.Running}>=arrayvalue to see if he can cast another HoT when he wants. Using this there would be no need to reset any values as both would just keep getting bigger the longer the macro runs.

edit ie psuedocode

Code: Select all

/if (i need to heal) {
    /if (${Macro.Running}>=${myarray[1,1]}) {
        /cast HoT
        /varset myarray[1,1] ${Math.Calc[${Macro.Running} + ${HoTDurationValueinSeconds}]}
  } else {
   /cast instantheal
  }
}

dedpoet
a hill giant
a hill giant
Posts: 247
Joined: Sat Aug 14, 2004 12:22 pm

Post by dedpoet » Wed Aug 25, 2004 10:05 am

Excellent. This looks like it is going to do exactly what I want. I've simplified it a bit, as I don't need a multi-dimensional array. I just need 1 element for each group member, which only stores the value for ${Macro.Running} plus the spell's duration, if it has one. I'm doing pets in a separate array, since I think I'm going to make pet healing a toggle.

Pseudo code is done, so hopefully I'll get this into my copy in the next couple of days and get it ironed out.

Thanks, fearless and dman for the pointers.