It is cobbled together from a few macros found here, so kudos to the contributors, if you happen to have been one, post here I will add you to the credits.
I am at work at present and really don't have a way to test this out yet, so I am posting it here. As always if you find any errors, please let me know so that I may correct them.
As a heads up if cleric runs too low on mana or HP she will gate and exit, so don't try to take down Lady Vox with a lvl 10 warrior while running this script.
Code: Select all
|ClericBot.mac
|v1.0 by ImaNoob
|Used to bot a cleric around without being grouped most useful for Powerleveling
|Usage, target person you wish to follow around and help, then /macro clericbot
|Since there currently appears to be no easy way to determine if a buff has ended, I am leaving buffing out
#turbo
#include spellcast.inc
#include advpath.inc
Sub Main
/zapvars
/call Delarations
/call SetVars
/call FollowAndHEAL
/return
Sub Declarations
/declare HEALSPELL global
/declare EVAC global
/declare MELEE_NAME global
/return
Sub SetVars
/varset MAIN_BUFF "Virtue"
/varset HEALSPELL "Complete Healing"
/varset EVAC "Gate"
/varset MELEE_NAME $target(name)
/return
SUb FollowAndHeal
:MAIN_LOOP
/if n (DistanceFunction($target) >= $spell("@HEALSPELL",range)){
/call FollowFunction ($target)
/delay 2s
}
/if n ($target(hp,pct) <= 50){
/call Cast "@HEALSPELL"
/delay $spell("@HEALSPELL",casttime)
}
/call CheckSelfHP
/call CheckMana
/goto :MAIN_LOOP
/return
Sub CheckSelfHP
| Check our current Hit Points and Port out if below 20%.
/if n $char(hp,pct)<=20 {
/echo HEY!!! I'm DIEING!!! Time to bug out!!! [HP: $char(hp,pct)%]
/call cast "@EVAC"
}
| Check our current Hit Points and if below 60%, Heal until we reach 90%.
/if n $char(hp,pct)<=60 {
/target myself
/call Cast "@HEALSPELL"
/delay $spell("@HEALSPELL",casttime)
/target @MELEE_NAME
}
/return
Sub CheckMana
| Check our current Mana and Port out if below 20%.
/if n $char(mana,pct)<=20 {
/echo HEY!!! I'm almost OOM!!! Time to bug out!!! [MANA: $char(mana,pct)%]
/call cast "@EVAC"
}
| Check our current Mana and if below 40%, Meditate until we reach 90%.
/if n $char(mana,pct)<=40 {
:MedLoop
/echo LOW MANA!!! Medding [MANA: $char(mana,pct)%]
/if ($char(state)!="SIT") && ($char(state)!="MOUNTED"){
/sit on
}
/delay 10s
/if n $char(mana,pct)<=90 /goto :MedLoop
}
/sit off
/return 
