Anyway I wanted people to either look at it and mention any "tweaks/bugs" i need to fix or to even test it out and let me know if it works or not!
I have a feeling my spell memorization thing isnt going to work but here's to hoping!
Code: Select all
| - clericAH.mac -
| Original powerspike
| Basic group auto heal script
| Extremely Altered by Draekz
#include spellsub.mac
#include spellbook.mac
#chat say
#chat tell
#Event NotMem " You do not seem to have that spell memorized."
Sub Main
|This makes sure all spells are properly Memorized, if not it
|memorizes it for the player.
:next1
/if "$char(gem,1)"=="NULL" {
/goto :Gem1
|This is the name of the spell in Gem slot 1 *hence (gem,#) *
|Note there is a bug in 1001a (on my comp) that names Superior
|Heal "PLAYER_1", hence the reason its named so
}else /if "$char(gem,1)"!="PLAYER_1" {
/call Gem1
}else {
/goto :next2
{
/return
:next2
/if "$char(gem, 2)"=="NULL" {
/call Gem2
}else /if "$char(gem,2)"!="Complete Healing" {
/call Gem2
}else {
|If it doesnt see anything wrong, it goes to the next Gem
/goto :next3
{
/return
:next3
/if "$char(gem,3)"=="NULL" {
/call Gem3
}else /if "$char(gem,3)"!="Greater Healing" {
/call Gem3
}else {
/goto :next4
{
/return
:next4
/if "$char(gem,4)"=="NULL" {
/call Gem4
}else /if "$char(gem,4)"!="Valor" {
/call Gem4
}else {
/goto :next5
{
/return
:next5
/if "$char(gem,5)"=="NULL" {
/call Gem5
}else /if "$char(gem,5)"!="Armor of Faith" {
/call Gem5
}else {
/goto :next6
{
/return
:next6
/if "$char(gem,6)"=="NULL" {
/call Gem6
}else /if "$char(gem,6)"!="Root" {
/call Gem6
}else {
/goto :next7
{
/return
:next7
/if "$char(gem,7)"=="NULL" {
/call Gem7
}else /if "$char(gem,7)"!="Divine Aura" {
/call Gem7
}else {
/goto :next8
{
/return
:next8
/if "$char(gem,8)"=="NULL" {
/call Gem8
}else /if "$char(gem,8)"!="Divine Barrier" {
/call Gem8
}else {
/goto :restofcode
{
/return
:restofcode
/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
/delay 1
|/echo $v7 --
:start
/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<=85 {
/goto :Heal
}else /if n $v59>=90
{
/delay 1
}
/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 1
/sit off
/gsay SHealing $target(name)
/cast "PLAYER_1"
/if n $v23==0 {
/call MemorizeSpell "PLAYER_1" 1
/delay 10
}else {
/goto :Casters
}
/delay 5s
/sit on
/return
:CHeal
/delay 1
/sit off
/gsay Completely Healing $target(name)
/cast "Complete Healing"
/if n $v23==0{
/call MemorizeSpell "Complete Healing" 2
/delay 10
}else {
/goto :CHeal
{
/delay 10s
/sit on
/return
Sub Event_NotMem
/varset v23 0
/return
Sub Gem1
/call MemorizeSpell "PLAYER_1" 1
/delay 10
/goto :next2
/return
Sub Gem2
/call MemorizeSpell "Complete Healing" 2
/delay 10
/goto :next3
/return
Sub Gem3
/call MemorizeSpell "Greater Healing" 3
/delay 10
/goto :next4
/return
Sub Gem4
/call MemorizeSpell "Valor" 4
/delay 10
/goto :next5
/return
Sub Gem5
/call MemorizeSpell "Armor of Faith" 5
/delay 10
/goto :next6
/return
Sub Gem6
/call MemorizeSpell "Root" 6
/delay 10
/goto :next7
/return
Sub Gem7
/call MemorizeSpell "Divine Aura" 7
/delay 10
/goto :next8
/return
Sub Gem8
/call MemorizeSpell "Divine Barrier" 8
/delay 10
/goto :restofcode
/return
Thanks
Draekz
PS (this is my first real attempt at a decent macro

