Druid heal (heavily based on AFKCleric)

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

Moderator: MacroQuest Developers

Twister
orc pawn
orc pawn
Posts: 10
Joined: Fri Apr 23, 2004 4:17 am

Druid heal (heavily based on AFKCleric)

Post by Twister » Sat May 29, 2004 12:15 am

Code: Select all

|New AFK Druid Healer Macro 
|druidheal.mac 
|Author: Twister (Totally ripped from Digitalxero, I just took out the divine barrier /ifs and changed the the |spell names for druid heals. |Thanks for the macro Digitalxero
|Usage: /macro druidheal <sit> <heal percent> 
|Example: /macro druidheal 1 60 

#event MeHit " hits YOU for " 
#event OutOfMana "Insufficient Mana to cast this spell!" 
#event OutOfRange "Your target is out of range, get closer!" 
#event Fizzle "Your spell fizzles!" 


Sub Main 
/declare Healpct int outer ${Param1} 
/declare Fastheal string outer Nature's Infusion 
/declare Groupnum int outer 
/declare i int outer 
/declare Sit int outer ${Param0} 
/declare Delay int outer 
/declare Casting string outer 

:chkevent 
   /doevents 
   /varset Groupnum ${Group} 
   | *** AutoHeal *** 
:Healcheck 
   /for i 1 to ${Group} 
      /if (${Group[${i}].PctHPs}<=${Healpct}) { 
              /if (${Group[${i}].PctHPs}<1) /goto :nextmember 
              /if (${Group[${i}].Class.Name.Equal["Warrior"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Paladin"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Shadow Knight"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Monk"]}) /goto :Tankheal 
         /doevents 
         /goto :CasterHeal 

:Tankheal 
          
             /target ${Group[${i}].Name}
             /stand 
             /g CH on %t! 
             /varset Casting Karana's Renewal 
             /cast "Karana's Renewal" 
             /doevents 
             /varset Delay ${Math.Calc[${Spell[Karana's Renewal].MyCastTime}*10+10]} 
             /delay ${Delay} 
             /if (${Sit}==1) /sit 
             /goto :nextmember 
          

:Casterheal 
    
             /target ${Group[${i}].Name} 
             /stand 
             /g Quickheal on %t! 
             /varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10+25]} 
             /varset Casting ${Fastheal} 
             /cast "${Fastheal}" 
             /doevents 
             /delay ${Delay} 
             /if (${Sit}==1) /sit 
         } 
:nextmember 
      } 
   /next i 
   /goto :chkevent 
/return 

Sub Event_MeHit 
    /if (${Me.PctHPs}<=60 AND ${Me.PctHPs}>40) { 
                
                /target myself 
                /stand 
                /g Quickhealing %t! 
                /varset Casting Nature's Infusion 
                /cast "Nature's Infusion" 
                /doevents 
                /varset Delay ${Math.Calc[${Spell[Nature's Infusion].MyCastTime}*10+5]} 
                /delay ${Delay} 
             
         
    } else /if (${Me.PctHPs}<=40 AND ${Me.PctHPs}>25) { 
            /target myself 
            /stand 
            /g Fast Heal on %t! 
            /varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10+25]} 
            /varset Casting ${Fastheal} 
            /cast "${Fastheal}" 
            /doevents 
            /delay ${Delay} 
         
    } else { 
        /stand 
    }    
          
        
     
/return 

Sub Event_Fizzle 
    /goto :Healcheck 
/return 

Sub Event_OutOfMana 
    /g OOM, meding 
    /if (${Sit}==1) /sit 
    /delay 5s 
/return 

Sub Event_OutOfRange 
    /g %t your OOR! 
    /delay 1s 
/return 

Sub Event_Fizzle 
    /cast "${Casting}" 
/return 

graveler2
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon May 31, 2004 12:44 am

Post by graveler2 » Mon May 31, 2004 12:45 am

The heals to myself doesn't seem to be working? Or is it just me.

Twister
orc pawn
orc pawn
Posts: 10
Joined: Fri Apr 23, 2004 4:17 am

hmm...

Post by Twister » Tue Jun 08, 2004 2:15 am

To be honest, ive never gotten low enough for that to test, however once i get macroquest recompiled in a few days (currently dont have eq as im moving) ill check into that and see, thanks for alerting me to it.

compudoc
decaying skeleton
decaying skeleton
Posts: 7
Joined: Mon Sep 20, 2004 1:33 am

Post by compudoc » Mon Sep 20, 2004 1:39 am

to make it heal yourself also change:

Code: Select all

:Healcheck 
   /for i 1 to ${Group} 
to:

Code: Select all

:Healcheck 
   /for i 0 to ${Group} 

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Mon Sep 20, 2004 2:43 am

There is no :Healcheck label within the sub Fizzle...

Code: Select all

Sub Event_Fizzle 
    /goto :Healcheck 
/return 

oneoneone
a lesser mummy
a lesser mummy
Posts: 30
Joined: Mon Jan 26, 2004 5:52 am

Post by oneoneone » Mon Sep 20, 2004 4:22 am

Any way we could add snare functionality to it as well? I've been playing around with the AFCleric mac tryin to figure a good way to get it to snare.

compudoc
decaying skeleton
decaying skeleton
Posts: 7
Joined: Mon Sep 20, 2004 1:33 am

Post by compudoc » Mon Sep 20, 2004 9:55 pm

Edited the macro to make it more effective and fix a few things. Still just learning the language so things probably aren't optimal.

Code: Select all

|New AFK Druid Healer Macro 
|druidheal.mac 
|Orginial Author: Digitalxero (AFK CLeric)
|Modifying Author1: Twister (Totally ripped from Digitalxero, I just took out the divine barrier /ifs and changed the the |spell names for druid heals. |Thanks for the macro Digitalxero 
|Modifying Author2: Compudoc (Macro will now also heal yourself as well as group. Modified Fizzle event to work properly.  Added Beastlord to properly heal the PC no matter which is closer. (9/20/2004)
|Usage: /macro druidheal sit heal percent; 
|Example: /macro druidheal 1 60 

#event OutOfMana "Insufficient Mana to cast this spell!" 
#event OutOfRange "Your target is out of range, get closer!" 
#event Fizzle "Your spell fizzles!" 


Sub Main

/declare Healpct int outer ${Param1} 
/declare Fastheal string outer Nature's Infusion 
/declare Groupnum int outer 
/declare i int outer 
/declare Sit int outer ${Param0} 
/declare Delay int outer 
/declare Casting string outer 

/echo ***********************************************************
/echo **                   Druid Auto-Healer Activated                       **
/echo ** Casting heals when party member is under ${Healpct}%  **
/if (${Sit}==1) /echo ** Autosit is enabled                                                          **
/if (${Sit}==0) /echo ** Autosit is disabled                                                         **
/echo ***********************************************************	

:chkevent 
   /doevents 
   /varset Groupnum ${Group} 
   | *** AutoHeal *** 
:Healcheck 
   /for i 0 to ${Group} 
      /if (${Group[${i}].PctHPs}<=${Healpct}) { 
              /if (${Group[${i}].PctHPs}<1) /goto :nextmember 
              /if (${Group[${i}].Class.Name.Equal["Warrior"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Paladin"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Shadow Knight"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Monk"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Berserker"]}) /goto :Tankheal
              /if (${Group[${i}].Class.Name.Equal["Beastlord"]}) /goto :Bstheal
         /doevents 
         /goto :CasterHeal 

:Tankheal 
  
             /target ${Group[${i}]} 
             /stand 
             /g CH Inc on >> %t << .. 10sec
             /varset Casting Tunare's Renewal 
             /cast "Tunare's Renewal" 
             /doevents 
             /varset Delay ${Math.Calc[${Spell[Tunare's Renewal].MyCastTime}*10]} 
 	     /delay 30
             /doevents
             /delay ${Delay} 
             /if (${Sit}==1) /sit 
             /goto :nextmember 
          

:Casterheal 
    
             /target ${Group[${i}]} 
             /stand 
             /g Quick Heal inc on >> %t <<
             /varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10]} 
             /doevents
             /varset Casting ${Fastheal} 
             /cast "${Fastheal}" 
             /delay 30

             /doevents 
             /delay ${Delay} 
             /if (${Sit}==1) /sit 
             /goto :nextmember
          
:Bstheal 
    
	     /keypress esc
	     /if (${i}==1) /keypress F2
	     /if (${i}==2) /keypress F3
	     /if (${i}==3) /keypress F4
	     /if (${i}==4) /keypress F5
	     /if (${i}==5) /keypress F6
             /stand 
             /g Quick Heal inc on >> %t <<
             /varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10]} 
             /varset Casting ${Fastheal} 
             /cast "${Fastheal}" 
             /doevents 
              /delay 30
             /doevents
             /delay ${Delay} 
             /if (${Sit}==1) /sit 
         } 
:nextmember 
      } 
   /next i 
   /goto :chkevent 
/return 

Sub Event_OutOfMana 
    /g OOM, meding 
    /if (${Sit}==1) /sit 
    /delay 5s 
/return 

Sub Event_OutOfRange 
|    /delay 2s
|    /g %t your OOR! 
|    /delay 2s 
/return 

Sub Event_Fizzle 
    /cast "${Casting}" 
    /varset Delay ${Math.Calc[${Spell[${FizzleSpell}].MyCastTime}*10]} 
    /delay 30
    /doevents
    /delay ${Delay} 
/return 
Last edited by compudoc on Wed Sep 22, 2004 10:48 pm, edited 2 times in total.

compudoc
decaying skeleton
decaying skeleton
Posts: 7
Joined: Mon Sep 20, 2004 1:33 am

Post by compudoc » Tue Sep 21, 2004 12:11 am

To add a snare function you can add an event. To the Event calls at the top add:

Code: Select all

#event Snare "#*#Incoming#*#"
Change Incoming to the text you want it to look for

to the declares add:

Code: Select all

/declare snareasst string outer ${Param2}
and in the Sub Event's at the bottom add:

Code: Select all

Sub Event_Snare
    /assist ${snareasst}
    /cast Ensnare 
    /varset Delay ${Math.Calc[${Spell[Ensnare].MyCastTime}*10+25]} 
    /delay ${Delay} 
/return
That should work for ya...let me know if it doesn't.