NOTES---
loot.inc is useless right now as OLDUI is disabled.
note that in the "Mana" command, he dismounts before calling mana, and then "presses 0" 0 is where I keep my bridle hotkey, and he dismounts because calling virtually any $char info while on a horse will crash MQ. Something about the changes in character structure that were meant to be innate from character birth. (i.e.- Dwarves take falling damage, but not while on a horse)
Comment out as nessecary. Enjoy.
cleric.mac
Code: Select all
| cleric.mac
| cleric petbot
|
| Courtesy of Dirtface
| Special thanks: Wes (for the idea of the FOR loop)
| Fippy (for figuring out "What went wrong.)
| Valerian (for completely writing the Autoheal script
| and the auto loot script.
| Seriously, Val figured this whole thing out.)
| Sparr (For helping me with the Set camp feature)
| Usage: /macro cleric.mac <character in control>
#define GroupMember v93
#define GroupMax v90
#define ChatCommand p2
#define XLOC v52
#define YLOC v53
#define $GroupClass $spawn($group($GroupMember),class)
#include SpellSub.mac
#include loot.inc
#include routines.mac
#chat tell
#Event Invited "To join the group, click on the 'FOLLOW' option, or 'DISBAND' to cancel"
#Event ClarityGone "Your mind returns to normal."
#Event InvisGone "You feel yourself starting to appear"
#Event RootGone "Your Immobilize spell has worn off."
#Event FollowOff "You are no longer auto-following "
Sub Main
/varset v69 $p0
:chkevent
/doevents
| *** AutoHeal ***
/varcalc GroupMax $group(count)-1
/for GroupMember 0 to $GroupMax
/if n $spawn($group($GroupMember),hp,pct)<41 {
/if n $spawn($group($GroupMember),hp,pct)<1 /goto :nextmember
/if "$GroupClass"=="Warrior" /goto :Tankheal
/if "$GroupClass"=="Paladin" /goto :Tankheal
/if "$GroupClass"=="Shadow Knight" /goto :Tankheal
/if "$GroupClass"=="Monk" /goto :Tankheal
/if "$GroupClass"=="Ranger" /goto :Tankheal
/goto :CasterHeal
:Tankheal
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/stand
/g COMPLETE HEAL on %T in 10seconds
/call SpellSub 1 105
/sit
/press esc
/goto :nextmember
:Casterheal
/if n $group($GroupMember)==$char(id) /press F1
/if n $group($GroupMember)!=$char(id) /target id $group($GroupMember)
/stand
/g Healing %T
/call SpellSub 2 50
/sit
/press esc
:nextmember
}
/next GroupMember
/goto :chkevent
/return
Sub Event_Chat
:Commands
| *** Complete Heal ***
/if "$ChatCommand"=="ch" {
/target $p1
/stand
/g COMPLETE HEAL on %T in 10seconds
/call SpellSub 1 105
/sit
/press esc
| *** HEAL OVER TIME ***
} else /if "$ChatCommand"=="ce" {
/target $p1
/stand
/g Celestial Healing on %T
/call SpellSub 4 45
/sit
/press esc
| *** GATE ***
} else /if "$ChatCommand"=="gate" {
/stand
/g Gating
/call SpellSub 8 55
| *** HP BUFF ***
} else /if "$ChatCommand"=="HP" {
/target $p1
/stand
/g HP Buff on %T
/call SpellSub 6 65
/sit
/press esc
| *** Superior Heal ***
} else /if "$ChatCommand"=="Heal" {
/target $p1
/stand
/g Healing %T
/call SpellSub 2 50
/sit
/press esc
| *** Pet Complete Heal ***
} else /if "$ChatCommand"=="pet" {
/press esc
/press f2
/press f2
/stand
/g CH on %T
/call SpellSub 1 105
/sit
/press esc
| *** Symbol ***
} else /if "$ChatCommand"=="Symbol" {
/target $p1
/stand
/g Symbol on %T
/call SpellSub 7 55
/sit
/press esc
| *** AC BUFF ***
} else /if "$ChatCommand"=="AC" {
/target $p1
/stand
/g AC BUFF on %T
/call SpellSub 5 85
/sit
/press esc
| *** Root ***
} else /if "$ChatCommand"=="root" {
/target $p1
/assist
/stand
/delay 7
/g Rooting %T
/call SpellSub 3 40
/sit
/press esc
| *** Report Mana ***
} else /if "$ChatCommand"=="mana" {
/stand
/dismount
/press F1
/g Mana is at $char(mana,pct)
/press esc
/sendkey down shift
/press 2
/press shift
/press 0
/press esc
| *** Auto Loot ***
} else /if "$ChatCommand"=="loot" {
/stand
/call AutoLoot
/goto :return
| *** AUTOFOLLOW ***
} else /if "$ChatCommand"=="follow" {
/target $p1
/face
/sit off
/follow
/g Lead on %T
/varset v10 0
| *** Define Camp Spot ***
} else /if "$ChatCommand"=="setcamp" {
/press F1
/delay 5
/varset XLOC $char(x)
/varset YLOC $char(y)
/g Ok. Here I sit.
| *** AUTORETURN (to camp)***
} else /if "$ChatCommand"=="return" {
:return
/stand
/face loc $YLOC,$XLOC
/call GotoLoc $YLOC,$XLOC
/sit
| *** AUTOSTOP ***
} else /if "$ChatCommand"=="stop" {
/press down
/varset v10 1
/say Stopping here.
| *** SIT/STAND ***
} else /if "$ChatCommand"=="sit" {
/sit
| *** MOUNT HORSE ***
} else /if "$ChatCommand"=="mount" {
/sendkey down shift
/press 2
/press shift
/press 0
| *** DISMOUNT HORSE ***
} else /if "$ChatCommand"=="dismount" {
/dismount
| *** LFG ON ***
} else /if "$ChatCommand"=="LFG" {
/delay 10
/press f1
/delay 10
/disband
/delay 10
/lfg on
/r LFG now.
| *** CAMP ***
} else /if "$ChatCommand"=="camp" {
/sit off
/sit
/camp
/delay 10
/unload
| *** COMMAND HELP ***
} else /if "$ChatCommand"=="command help" {
/reply "[CE] - Celestial Heal, [CH] - Complete Heal, [AC] - HP Buff, [HP] - HP Buff, [Heal] - Superior Heal, [Root] - Root Mob, [Gate] - Gate out, [Mana] - Report Mana, [Follow] - Follow, [Stop] - Stop Follow, [Loot] - Autoloot, [Setcamp] = Set camp spot, [Return] - Return to camp, [Sit] - Sit/Stand, [MOUNT/DISMOUNT] - (dis)mount Horse[LFG] - LFG ON, [Camp] - Camp
}
/return
Sub Event_Invited
/delay 20
/invite
/return
Sub Event_ClarityGone
/g Clarity just faded...
/return
Sub Event_InvisGone
/g Invis is wearing off.
/return
Sub Event_RootGone
/g Root Wore off.
/press f2
/assist
/delay 11
/stand
/g Rooting %T
/call SpellSub 3 40
/sit
/press esc
/return
Sub Event_FollowOff
/if n $v10==1 {
/r Parked.
} else {
/g Lost ya.
/sendkey down up
:KeepRunning
/face
/if n $target(distance)<50 {
/sendkey up up
/follow
/varset v10 0
/g Back on Auto-Follow. go ahead.
} else {
/goto :KeepRunning
}
}
/returnloot.inc
Code: Select all
#Event CorpseTime "This corpse will decay in 0"
#Event Looted "--You have looted a "
Sub AutoLoot
/target npc corpse radius 160
/delay 5
/con
/delay 5
/doevents
/if n $v4==1 /goto :Continue
/if n $target(distance)<15 /goto :LootCorpse
/sendkey down up
:FaceCorpse
/delay 0
/face
/if n $target(distance)>14 /goto :FaceCorpse
:LootCorpse
/sendkey up up
/loot
/delay 10
/varset v3 0
:Looting
/delay 0
/varset v5 $v3
/click right corpse $v3
/delay 5
/doevents
/if n $v3>$v5 /goto :Looting
/press esc
:Continue
/varset v4 0
/return
Sub Event_CorpseTime
/varset v4 1
/return
Sub Event_Looted
/varadd v3 1
/return 