/* * Shaman Heal Bot Script * Written By: Zeek * * Version: 0.5 -- 02/07/2007 * -- Initial Public Release * * Special Thanks To: Amadeus & Lax withtout which * this script would Not be possible. * Dontdoit: Assistance with code/testing. * * Description: A very basic heal bot for Shaman, * the script could be modified for use with other * healing classes. * It will currently buff the entire group when * the shamans buffs are down or less than 60 * seconds left. Or will buff himself and the * character set as the Tank if Not grouped. * * Usage: Have the character you want to heal set * as your defensive target then run the script. * * Syntax: runscript vghealer 0/1 * * Parameters: Slows = if set to 1 the bot will * assist the tank and continue to try and slow * the mob until it is slowed. */ ;------------------------------------------------ function main(int eSlow) { call Setup_Variables call Set_Abilities Tank:Set[${Me.DTarget.Name}] TankID:Set[${Me.DTarget.ID}] doSlow:Set[${eSlow}] wait 10 vgecho Tank set to ${Tank} do { call Check_Health call SelfBuff call Fight call Cannibalize wait 5 } while 1 } ;================================================ function Set_Abilities() { EmgHeal:Set["Panacea II"] FastHeal:Set["Remedy IV"] Heal:Set["Restoration III"] Reactive:Set["Life Ward I"] GroupHeal:Set["Ancestor's Gift II"] DefaultForm:Set["Spirit Bond: Krigus"] Slow:Set["Lethargy II"] Oracle:Set["Oracle's Sight III"] Canni:Set["Ritual of Sacrifice I"] Infusion:Set["Infusion III"] RunSpeed:Set["Spirit of Rakurr I"] Rakurr1:Set["Rakurr's Grace I"] } ;================================================ function Check_Health() { if "${Me.DTarget.ID}!=${TankID}" { Pawn[id,${TankID}]:Target } if "${Me.HealthPct}<40" { Pawn[me]:Target Me.Ability[${FastHeal}]:Use Pawn[id,${TankID}]:Target call MeCasting } if "${Me.DTargetHealth}==0 && !${Pawn[id,${TankID}].IsDead}" { Pawn[me]:Target wait 5 Pawn[id,${TankID}]:Target } if "${Me.DTargetHealth}<20 && !${Me.IsCasting} && ${Me.Ability[${EmgHeal}].IsReady}" { Me.Ability[${EmgHeal}]:Use call MeCasting return } if "${Me.DTargetHealth}<40 && !${Me.IsCasting} && ${Me.Ability[${FastHeal}].IsReady}" { Me.Ability[${FastHeal}]:Use call MeCasting return } if "${Me.DTargetHealth}<65 && !${Me.IsCasting} && ${Me.Ability[${Heal}].IsReady}" { Me.Ability[${Heal}]:Use call MeCasting return } if "${Me.DTargetHealth}<80 && !${Me.IsCasting} && ${Me.Ability[${Reactive}].IsReady} && !${reactiveInUse}" { reactiveInUse:Set[1] Execute TimedCommand 450 reactiveInUse:Set[0] Me.Ability[${Reactive}]:Use call MeCasting return } } ;================================================ function MeCasting() { do { wait 1 } while "${Me.IsCasting}" do { wait 1 } while "${VG.InGlobalRecovery}" waitframe } ;================================================ function Fight() { PriorMob:Set[${Me.Target.ID}] VGExecute /assist ${Tank} if "!${Me.Target(exists)} || ${Me.Target.Type.Equal[Corpse]} || ${Me.TargetHealth}==0" { return } if "${PriorMob}!=${Me.Target.ID}" { echo Different Mob if "${Me.HavePet} && ${Me.Pet.CombatState}==1 && ${Me.Target.Type.Equal[NPC]} && ${Me.TargetHealth}<99 && ${Me.DTarget.CombatState}==1" { VGExecute /pet attack } } if "(${Me.Target.Type.Equal[NPC]} || ${Me.Target.Type.Equal[AggroNPC]}) && ${Me.TargetHealth}<95 && ${Me.DTarget.CombatState}==1" { if "${Me.HavePet} && ${Me.Pet.CombatState}==0" { VGExecute /pet attack } if "${doSlow} && !${Me.TargetEffect[${Slow}](exists)} && ${Me.TargetHealth}>=20" { Me.Ability[${Slow}]:Use call MeCasting } } } ;================================================ function Cannibalize() { if "${Me.DTargetHealth}>70" { if "${Me.EnergyPct}<=85 && ${Me.HealthPct}>=60 && ${Me.InCombat} && ${Me.Ability[${Canni}].IsReady}" { Me.Ability["${Canni}"]:Use call MeCasting } } } ;================================================ function SelfBuff() { if "${Me.CurrentForm.Name.Equal[Unbound]}" { Me.Form[${DefaultForm}]:ChangeTo return } call buffcast "${Oracle}" call buffcast "${Infusion}" call buffcast "${RunSpeed}" call buffcast "${Rakurr1}" } ;================================================ function buffcast(string buff2cast) { if "!${Me.Effect[${buff2cast}](exists)} || ${Me.Effect[${buff2cast}].TimeRemaining}<=60" { Pawn[me]:Target Me.Ability[${buff2cast}]:Use call MeCasting if "${Me.IsGrouped}" { call Check_Health GMember:Set[1] do { if "${Group[${GMember}].Distance}<=20 && ${Group[${GMember}].ID(exists)}" { Pawn[id,${Group[${GMember}].ID}]:Target Me.Ability[${buff2cast}]:Use call MeCasting Pawn[id,${TankID}]:Target call Check_Health } } while "${GMember:Inc}<=5" } else { call Check_Health Pawn[id,${TankID}]:Target Me.Ability[${buff2cast}]:Use call MeCasting } return } } ;================================================ function atexit() { ; If ISXEVG isn't loaded, then no reason to run this script. if (!${ISXVG(exists)}) { return } VGEcho Ending VGHealer.iss } ;================================================ function Setup_Variables() { echo Initializing Variables... declare GroupHeal string script declare FastHeal string script declare Heal string script declare Reactive string script declare EmgHeal string script declare Tank string script declare TankID int64 script declare PriorMob int64 script declare NewMob int64 script declare DefaultForm string script declare HealAmt int script declare doSlow bool script 0 declare Slow string script declare Canni string script declare Oracle string script declare Infusion string script declare Rakurr1 string script declare RunSpeed string script declare reactiveInUse int global 0 declare GMember int script echo Done Initializing. }