Raid Healer v1.3 - Heal your raid (Updated: 11-8-04)

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

Moderator: MacroQuest Developers

Neolesh
a hill giant
a hill giant
Posts: 231
Joined: Mon Aug 23, 2004 11:15 am

Raid Healer v1.3 - Heal your raid (Updated: 11-8-04)

Post by Neolesh » Fri Nov 05, 2004 2:29 am

This is a total revamp of my AEHeal macro and I thought it to have changed so much that it definately didn't fit in the old thread. This new version does a much better job in my opinion. Some will still think it targets too fast.. if so you can always slow it down. I'm pretty sure I have the spam totally cut out now. No more calculating target's per minute, no more attempting to target people who aren't there. If you come across any problems, please post them, as always.

Fair warning before using this macro - It will target very very rapidly, and anyone with HoTT will be able to see it. You have been warned.

You will need to have Spell_Routines.inc installed.

Code: Select all

|**------------------------------------------------------
Version 1.3
Raid Healer
Usage /macro raidheal 

This macro will target each individual who is in your 
raid and in the same zone as you. After targeting them 
it will check their hps and heal them appropriately. It is
also designed to double check your group.

If you're attacked by an NPC the macro will try to self 
heal if self HPs are less than 75%. If self HPs drop 
below 30% the macro will attempt to cast DA / DB.

Currently the macro will heal everyone including monks
who are FD.

Check the final subroutine for custom message when you
are attacked.

WARNING: This macro rapidly changes your target. Anyone
with HoTT will be able to see this. You have been warned.
------------------------------------------------------**|

#include spell_routines.inc

#event ImHit "#*#YOU for#*#"

Sub Main 

  /echo Raid Heal Macro Activated!


   /declare CasterList    string   outer 
   /declare TankList      string   outer
   /declare ChatSpam      timer    outer
   /declare LomTimer      timer    outer 0
   /declare HitTimer      timer    outer
   /declare r             int      outer
   /declare ii            int      outer

   /varset TankList |Warrior|Shadow Knight|Paladin| 
   /varset CasterList |Necromancer|Wizard|Enchanter|Magician|Rogue|Druid|Cleric|Bard|Shaman|Beastlord|Berserker|Ranger| 

  :Start

  /doevents
  /doevents flush


   /if (${Me.PctMana}<12) {
      /call LowMana
      /goto :start
   }  

/call CheckGroup
   
/for r ${Raid.Members} downto 0 

  /if (${Raid.Member[${r}].Spawn.ID} != NULL && ${Raid.Member[${r}].Spawn.Type.NotEqual[Corpse]}) { 
     /target ID ${Raid.Member[${r}].ID} 
     /call ClassCheck 
  } 
  
/next r

/goto :Start

/return 

Sub ClassCheck 

    /if (${CasterList.Find[|${Target.Class}|]}) {
       /call HealcheckCaster 
       /return
    }
    
    /if (${TankList.Find[|${Target.Class}|]}) {
       /call HealcheckTank 
       /return
    }
    
    /if (${String[${Target.Class}].Equal["Monk"]} && ${String[${Target.State}].Equal["feign"]} && ${Target.Distance}<215 && ${Target.PctHPs}<70) /call Cast "Pious Remedy" spell 2s CheckFD
 
/return 

Sub HealcheckCaster 
   /if (${String[${Target.Class}].Equal["Shaman"]} && ${Target.PctHPs}>67) /return
    /if (${Target.PctHPs}<79 && ${Target.Distance}<210 && ${Me.SpellReady["Pious Remedy"]}) {
      /if (${ChatSpam}<1) {
       /g Pious Remedy [ %t ]
       /varset ChatSpam 70
      }
     /call Cast "Pious Remedy" spell 2s CheckHP
    }

/return 

Sub HealcheckTank 

    /if (${Target.PctHPs}<65 && ${Target.Distance}<120 && ${Me.SpellReady["Pious Light"]}) {
      /if (${ChatSpam}<1) {
       /g Pious Light [ %t ]
       /varset ChatSpam 70
      }
     /call Cast "Pious Light" spell 2s CheckHP
    } 

/return

Sub CheckGroup

/for ii ${Group} downto 1
  /if (${String[${Group[${ii}].Class}].Equal["Shaman"]} && ${Group[${ii}].PctHPs}>67) /next ii
    /if (${CasterList.Find[|${Group[${ii}].Class}|]} && ${Group[${ii}].PctHPs}<79 && ${Group[${ii}].Distance}<220) {
      /target ${Group[ii]}
      /call Cast "Pious Rememdy" spell 2s CheckHP
    }
      
    /if (${TankList.Find[|${Group[${ii}].Class}|]} && ${Group[${ii}].PctHPs}<80 && ${Group[${ii}].Distance}<110) {
      /target ${Group[${ii}]}
      /call Cast "Pious Light" spell 2s CheckHP
    }
    
/next ii

/return
  
Sub CheckHP 

   /if (${Target.PctHPs}>=83) /call Interrupt

/return

Sub CheckFD

   /if (${String[${Target.State}].NotEqual["feign"]}) /call Interrupt
   
/return

Sub LowMana
  /if (${LomTimer}<1) {
    /varset LomTimer 300
    /g LoM ${Me.PctMana}m
    /rs LOM ${Me.PctMana}m
  }

/return

Sub Event_ImHit

/varset HitTimer 200

|** Format message below to suit your needs **|
|** /rs I've been hit by ${NearestSpawn[NPC].CleanName} **|
 
 :ImHitLoop
 
  /if (${HitTimer}>1) {
    /target ${Me}
    /if (${Me.PctHPs}<30) {
       /if (${Me.SpellReady["Divine Aura"]}) {
          /call Cast "Divine Aura" spell 2s
       } else {
       /if (${Me.SpellReady["Divine Barrier"]}) /call Cast "Divine Barrier" spell 2s
    }
    /if (${Me.PctHPs}<75 && !${Me.Buff["Divine Barrier"].ID} && !${Me.Buff["Divine Aura"].ID}) /call Cast "Pious Remedy" spell 2s
    }
 /goto :ImHitLoop
 }
  
/return
Last edited by Neolesh on Mon Nov 08, 2004 8:22 pm, edited 7 times in total.

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 Nov 05, 2004 6:47 am

I thought about adding something similar to your ImHit sub to my druid version. But, I have no DA, and if I heal myself I'm basically committing suicide anyway. :cry: The most I could do is pause 5s and hope someone pulls aggro back off me or do some kiting.

I thought about using Raid Members too, but on some occasions like backflagging with some of our backflag partners, we have more than a raid worth of people.
[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]

User avatar
fice
a hill giant
a hill giant
Posts: 187
Joined: Thu Jul 17, 2003 3:28 pm

Post by fice » Fri Nov 05, 2004 1:02 pm

use Oaken Guard =p

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Fri Nov 05, 2004 1:24 pm

he's lame and doesn't have it.

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 Nov 05, 2004 2:02 pm

I lack like everything from OoW :( But, I do have epic 1.5! Hell, I only have 1 spell from GoD; I R gimp.
[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]

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Fri Nov 05, 2004 2:40 pm

gimpest mofo to ever spam-click his shawl <nods sagely>

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 Nov 05, 2004 2:55 pm

A man's gotta have priorities.
[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]

User avatar
fice
a hill giant
a hill giant
Posts: 187
Joined: Thu Jul 17, 2003 3:28 pm

Post by fice » Fri Nov 05, 2004 3:17 pm

haha

Clueless_Coder
a hill giant
a hill giant
Posts: 192
Joined: Wed Aug 25, 2004 3:18 pm

Post by Clueless_Coder » Fri Nov 05, 2004 9:10 pm

I love it. It works great!!

Just one question: Any way I can tell the macro NOT to make me dismount?

Neolesh
a hill giant
a hill giant
Posts: 231
Joined: Mon Aug 23, 2004 11:15 am

Post by Neolesh » Fri Nov 05, 2004 9:42 pm

I think the dismounting is happening when your heals are interupted.. which is in spell_routines.inc .. only way I think to get rid of that is to remove the HP check. Which means that you would continue casting your heals even if the person you're healing is already healed before your heal lands.

So to do that go through the macro and remove "CheckHP" from the end of the "/call Cast" commands.

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 Nov 05, 2004 10:30 pm

Code: Select all

Sub CheckHP 
   /if ( ${Target.PctHPs}>=90 && !${Me.Mount.ID} ) /call Interrupt 
/return 
That will stop you from dismounting for interrupts
[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]

Gimpleezard
a lesser mummy
a lesser mummy
Posts: 31
Joined: Thu Jul 22, 2004 11:55 pm

Post by Gimpleezard » Sat Nov 06, 2004 6:23 am

Cr4zyb4rd wrote:gimpest mofo to ever spam-click his shawl <nods sagely>
Oh god don't get him started with his shawl..... unless of course you enjoyed getting spammed with 80 links to it at a time.....

Neolesh
a hill giant
a hill giant
Posts: 231
Joined: Mon Aug 23, 2004 11:15 am

Post by Neolesh » Sat Nov 06, 2004 12:11 pm

Well I was testing it again last night and it's trying to target people who die.. Not sure why. If the person is in the raid but not in the zone it doesn't try to target you but it was trying to target 'null' after a player died.. trying to think of a fix now.

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 » Sat Nov 06, 2004 12:48 pm

Untested, but I had that problem last night on raids too and woke up with an idea to fix it. I'm guessing the problem is that the PC in question died in between the time that the array was defined and the index counts down to it. So, as a workaround:

Code: Select all

Sub CheckHP 

   /if (${Target.PctHPs}>=83 || ${Target.PctHPs}==0) /call Interrupt 

/return 
It might skip people who happen to be on the brink of dying; but if that's the case chances are that even remedy won't land in time to save them anyway.
[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]

Rusty~
a hill giant
a hill giant
Posts: 244
Joined: Wed Apr 14, 2004 2:55 pm

Post by Rusty~ » Sat Nov 06, 2004 1:44 pm

| - Will interrupt spell if target dies while casting. If on a mount, it will dismount and duck if the time left
| is greater than 7 seconds, else it will move forward a bit to interrupt, then move you back
| ** IMPORTANT: if you don't want to interrupt a spell while mounted, put this at the top of your macro: **
| ** /declare noInterrupt int outer 1 **
That being said.. I would never use it.. it's best to just put in code to resummon mount imo. It only dismounts if there's > 7 secs left on spell anyways... this way you can interrupt and not wait 7 seconds and cast another heal right after.
I use something like this in my macros:

Code: Select all

   /if ( !${Me.Mount.ID} && ${useMount} ) /call Cast "${InvSlot[ammo].Item.Name}" item
For the checking if target is dead, you could do something like

Code: Select all

Sub CheckHP 
   /if (${Target.PctHPs}>=83 || !${Target.Type.Equal[pc]}) /call Interrupt 
/return