It only casts virt and temperance, and does not make use of a cleric epic.
Shouldnt be hard to modify, or I can if you dont want to, anyways, enjoy.
--Its only lightly tested at the moment -- so please give bug reports/suggestions --
I plan to improve it later if I use it often. we'll see.
Made to setup in center area.
Several fixes since original post, thanks to people below and a few bug fixes done by myself.
Code: Select all
//==clerbot.mac==\\
//== Xantan's Cleric Rez/Buffbot -- Do with it what you want ==\\
#turbo
#Event CantRez "This player cannot be resurrected. The corpse is too old."
#Event Hail "#1# says, 'Hail, |${Me.Name}|'"
#Event Hold "Your spell would not have taken hold on your target."
#Event Old "That corpse is too old#*#"
#Event Oor "Your target is out of range, get closer!"
#Event Rez "#1# auctions, '#*#rez#*#"
#Event Rez "#1# says out of character, '#*#rez#*#"
#Event Rez "#1# shouts, '#*#rez#*#"
#Event Spam "You can't use that command while casting..."
#Event Stuck "You can't use that command right now..."
#Event Temp "#1# auctions, '#*#temp#*#"
#Event Temp "#1# says out of character, '#*#temp#*#"
#Event Temp "#1# shouts, '#*#temp#*#"
#event Virt "#1# auctions, '#*#virt#*#"
#event Virt "#1# says out of character, '#*#virt#*#"
#event Virt "#1# shouts, '#*#virt#*#"
#include Spell_Routines.inc
Sub Main
/declare Rez int outer 0
/declare TargetName string outer
/if (!${Defined[AFKMessage]}) /declare AFKMessage string outer 96% Rez, Temp, and Virt @ Center of Guild Lobby. Please Hail me for attention.
/if (!${Defined[MedMessage]}) /declare MedMessage string outer ...Meditating... - please hold till I have mana, then hail me if you need a rez or buffs.
/afk ${AFKMessage}
/ooc 96% Rez, Temperance, and Virtue @ Center of Guild Lobby. Hail me for attention.
/echo Started Cleric Buff/Rez bot
:MainLoop
/if (!${Me.AFK}) /call AFK
/if (${Me.PctMana} < 45) /call Med
/if (${Window[TradeWnd].Open}) /call Money
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
/doevents
/goto :MainLoop
Sub AFK
/afk ${AFKMessage}
/return
Sub Buff
/if (${Window[TradeWnd].Open}) /call Money
/if (${Spawn[pc ${TargetName}].Pet.ID}) {
/if (${Spawn[PC ${TargetName}].Level} < 46) /tell ${TargetName} Inc Temp on pet.
/if (${Spawn[PC ${TargetName}].Level} > 45) /tell ${TargetName} Inc Virt on pet.
/call BuffPet
}
/target id ${Spawn[PC ${TargetName}].ID}
/if (${Spawn[PC ${TargetName}].Level} < 46) /call Temp
/if (${Spawn[PC ${TargetName}].Level} > 45) /call Virt
/return
Sub BuffPet
/if (${Window[TradeWnd].Open}) /call Money
/target ${Spawn[PC ${TargetName}].Pet}
/if (${Spawn[PC ${TargetName}].Level} < 46) /call cast "Temperance" gem1 15s
/if (${Spawn[PC ${TargetName}].Level} > 45) /call cast "Virtue" gem2 15s
/return
Sub FaceSouth
/if (${Window[TradeWnd].Open}) /call Money
/face loc 201.46, -1.46
/delay 1s
/return
Sub Med
/afk ${MedMessage}
/if (!${Me.Sitting} && !${Me.Mount.ID}) /sit on
/delay 5m ${Me.PctMana} > 60
/afk ${AFKMessage}
/return
Sub Money
/delay 3s ${Window[TradeWnd].Open}
/delay 3s ${Window[TradeWnd].HisTradeReady}
/if (${Window[TradeWnd].HisTradeReady}) {
/echo Received a donation from ${Target.CleanName}.
/notify TradeWnd TRDW_Trade_Button leftmouseup
/say Thank you for your donation, ${Target.CleanName}. Hail me if you need buffs or a rez still.
}
/delay 1s
/return
Sub Oor
/t ${TargetName} ${Target.CleanName} is out of range, please come closer if you need buffs or a rez.
/return
Sub Temp
/if (${Window[TradeWnd].Open}) /call Money
/face
/tell ${TargetName} INC Temp - click off oldies
/call cast "Temperance" gem1 15s
/return
Sub Rez
/if (${Window[TradeWnd].Open}) /call Money
/delay 3
/tell ${TargetName} Inc Rez. If you need multiple rezzes or you need buffs afterwards, please hail me again after looting your corpse..
/delay 6
/tar ${TargetName}'s corpse
/delay 4
/if (${Target.Distance}>82) {
/call Oor
/return
}
/call cast "Reviviscence" gem3 15s
/varset Rez 0
/return
Sub RezCheck
/if (${Window[TradeWnd].Open}) /call Money
/delay 1
/if (${Spawn[corpse ${TargetName}].ID}) /varset Rez 1
/return
Sub Virt
/if (${Window[TradeWnd].Open}) /call Money
/face
/tell ${TargetName} INC Virt - click off oldies
/call cast "Virtue" gem2 15ss
/return
Sub Event_CantRez
/t ${TargetName} Cannot rez your corpse, its too old! Loot it and hail me again if wanted.
/return
Sub Event_Hail(Line,Sender)
/varset TargetName ${Sender}
/if (${Me.Sitting}) /stand up
/if (${Window[TradeWnd].Open}) /call Money
/delay 2
/target id ${Spawn[PC ${TargetName}].ID}
/call RezCheck
/if (${Rez}) {
/call Rez
/return
}
/call Buff
/call FaceSouth
/return
Sub Event_Hold
/t ${TargetName} The spell I casted wouldn't take hold, please click off old buffs and hail me again if you'd like to be buffed.
/return
Sub Event_Old
/t ${TargetName} ${Target.CleanName} is too old to be rezzed! loot it up - I cant rez it. Hail me afterwards if you need buffs.
/return
Sub Event_Oor
/t ${TargetName} ${Target.CleanName} is out of range, please come closer if you need buffs or a rez.
/return
Sub Event_Spam
/delay 4s
/return
Sub Event_Stuck
/say sec
/notify TradeWnd TRDW_Cancel_Button leftmouseup
/return
Sub Event_Temp(Line,Sender)
/if (${Window[TradeWnd].Open}) /call Money
/delay 2s
/if (${Spawn[PC ${Sender}].Class.ShortName.Equal[CLR]}) /return
/delay 1s
/tell ${Sender} Temp @ Center - hail me.
/return
Sub Event_Rez(Line,Sender)
/if (${Window[TradeWnd].Open}) /call Money
/delay 2s
/if (${Spawn[PC ${Sender}].Class.ShortName.Equal[CLR]}) /return
/delay 1s
/tell ${Sender} 96% Rez @ Center - bring corpse(s) and hail me.
/return
Sub Event_Virt(Line,Sender)
/if (${Window[TradeWnd].Open}) /call Money
/delay 2s
/if (${Spawn[PC ${Sender}].Class.ShortName.Equal[CLR]}) /return
/delay 1s
/tell ${Sender} Virt @ Center - hail me
/return



