So much better Cleric Macro

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

BadBoy
a hill giant
a hill giant
Posts: 158
Joined: Thu Sep 05, 2002 11:53 am

So much better Cleric Macro

Post by BadBoy » Wed Oct 02, 2002 5:57 pm

Code: Select all

Sub Main
:LoopStart
/press F1
/varset v$target(Name)1 $target(hp,pct)
:F2
/press F2
/Call MemberExist
:F3
/press F3
/Call MemberExist
:F4
/press F4
/Call MemberExist
:F5
/press F5
/Call MemberExist
:F6
/press F6
/Call MemberExist

Sub MemberExist
/If $target()=="TRUE" {
/Call Scan
} Else /If $target()=="FALSE" {
/Call Scan

Sub Scan
/echo Scanning Classes
/If $target(Class)=="Bard"
/If $target(Class)=="Beastlord"
/If $target(Class)=="Cleric"
/If $target(Class)=="Druid"
/If $target(Class)=="Enchanter"
/If $target(Class)=="Magician"
/If $target(Class)=="Necromancer"
/If $target(Class)=="Shaman"
/If $target(Class)=="Wizard"
/varset v$target(Name) 1
/varset v$target(Name)1 $target(hp,pct)
/Call Heal
} Else /If $target(Class)=="Monk"
/If $target(Class)=="Paladin"
/If $target(Class)=="Ranger"
/If $target(Class)=="Rogue"
/If $target(Class)=="Shadow Knight"
/If $target(Class)=="Warrior"
/varset v$target(Name) 0
/varset v$target(Name)1 $target(hp,pct)
/Call Heal

Sub Heal
/If v$target(Name)1<=60 And
/If v$target(Name)==0 {
/Call CompleteHeal
} Else /If v$target(Name)1<=60 And
/If v$target(Name)==1 {
/Call FastHeal
}

/If v$target(Name)1<=40 {
/Call FastHeal
}

Sub FastHeal
/sit off
/cast 2
/delay 50
/sit On
/GoTo :LoopStart

Sub CompleteHeal
/sit off
/cast 4
/delay 120
/sit On
/GoTo :LoopStart

Sub GroupHeal
/sit off
/cast 3
/delay 60
/sit On
/GoTo :LoopStart

Genoius
a lesser mummy
a lesser mummy
Posts: 49
Joined: Sat Jul 13, 2002 8:20 am

Post by Genoius » Wed Oct 02, 2002 6:05 pm

seems like this wont work.
/If $target(Class)=="Bard"
/If $target(Class)=="Beastlord"
/If $target(Class)=="Cleric"
/If $target(Class)=="Druid"
/If $target(Class)=="Enchanter"
/If $target(Class)=="Magician"
/If $target(Class)=="Necromancer"
/If $target(Class)=="Shaman"
/If $target(Class)=="Wizard"
it will only step to "Beastlord" if the class=Bard, and then it will exit because a bard cannot also be a beastlord. same thing with the beginning
Sub Main
:LoopStart
/press F1
/varset v$target(Name)1 $target(hp,pct)
:F2
/press F2
/Call MemberExist
:F3
/press F3
/Call MemberExist
:F4
/press F4
/Call MemberExist
:F5
/press F5
/Call MemberExist
:F6
/press F6
/Call MemberExist

Sub MemberExist
/If $target()=="TRUE" {
/Call Scan
} Else /If $target()=="FALSE" {
/Call Scan
It still calls "Scan" if it has a target or if it does not.

oh well, just some minor changes to the scan sub, and it should work setting the variable correctly, but not sure about the rest. fix it up and ill have another look at it.
(add else /if to them)

---Genoius---

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Wed Oct 02, 2002 6:48 pm

EDIT: Oh sorry also I edited the spellsub.mac and then renamed it spellsub1.mac you might want to change that back to the regular spellsub you use, it should work all the same, i just noticed it messages people pointlessly with the original so i edited it...I havent tested out my new spellsub yet, so until then just configure this code to work with the regular sub.

Draekz
--------------------------

Here's the one i've been editing/working on...maybe it'll help give you ideas for the groups of classes and whatnot.

Code: Select all

| - clericAH.mac - 
| By powerspike 
| Basic group auto heal script
| Altered by Draekz 
#include spellsub1.mac 

Sub Main 
   /press ESC 
   /press F1 
   /if "$target()"=="TRUE" /varset v7 0 
   /press ESC 
   /press F2 
   /if "$target()"=="TRUE" /varset v7 1 
   /press ESC 
   /press F3 
   /if "$target()"=="TRUE" /varset v7 2 
   /press ESC 
   /press F4 
   /if "$target()"=="TRUE" /varset v7 3 
   /press ESC 
   /press F5 
   /if "$target()"=="TRUE" /varset v7 4 
   /press ESC 
   /press F6 
   /if "$target()"=="TRUE" /varset v7 5 
   /press ESC 
   

           :LoopStart 

      /delay 1
 
|/echo $v7 -- 

      /for v40 0 to $v7 
        /delay 5 
        /if n $v40==0 /press F1 
        /if n $v40==1 /press F2 
        /if n $v40==2 /press F3 
        /if n $v40==3 /press F4 
        /if n $v40==4 /press F5 
        /if n $v40==5 /press F6 
        /varset v59 $target(hp,pct) 

|the IF statement checks to see if HP are under 50% on the target if so stand heal and
|sit 

        /if n $v59<=40 {/goto :Heal}
   else /if n $v59>=90 {/delay 0} 
        
        /next v40 
        /goto :LoopStart 
 
/return 
               
         :Heal 
   
               /if $target(class)=="Enchanter" {/goto :Casters}
       else /if $target(class)=="Magician" {/goto :Casters}
       else /if $target(class)=="Wizard" {/goto :Casters} 
       else /if $target(class)=="Druid" {/goto :Casters} 
       else /if $target(class)=="Shaman" {/goto :Casters} 
       else /if $target(class)=="Cleric" {/goto :Casters}
       else /if $target(class)=="Necromancer" {/goto :Casters}
       else /if $target(class)=="Beastlord" {/goto :Casters}
       else {/goto :CHeal}

/return
           
         :Casters

   /delay 5
   /sit off
   /gsay SHealing $target(name)
   /cast "Superior Heal"
   /delay 5s
   /sit on
   
/return
            
              
         :CHeal
 
   /delay 5
   /sit off 
   /gsay Complete Healing $target(name) 
   /cast "Complete Heal"
   /delay 10s 
   /sit on

/return
GL and I hope this helps somewhat

Draekz