rendered paste bodyobjectdef oToon inherits oToonBase
{
variable int LastBuffCast = ${LavishScript.RunningTime}
;Check what buff we are using to help boost mana while fighting :) long fights mana makes a difference
member NeedBuff(string Buff)
{
if ${Spell[Blessing of Kings](exists)} && ${Me.PctMana} > 50
{
return "$Blessing of Kings"
}
if ${Spell[Blessing of Might](exists)} && ${Me.PctMana} > 50
{
return "Blessing of Might"
}
if ${Spell[Blessing of Wisdom](exists) && ${Me.PctMana} <= 20
{
return "Blessing of Wisdom"
}
}
member NeedBuff()
{
if !${Me.Buff[Devotion Aura](exists)} && ${Spell[Devotion Aura](exists)}
{
return TRUE
}
elseif !${Me.Buff[Blessing of Wisdom](exists)} && ${Spell[Blessing of Wisdom](exists)}
{
return TRUE
}
elseif !${Me.Buff[Blessing of Kings](exists)} && ${Spell[Blessing of Kings](exists)}
{
return TRUE
}
elseif !${Me.Buff[Blessing of Might](exists)} && ${Spell[Blessing of Might](exists)}
{
return TRUE
}
return FALSE
}
method BuffPulse()
{
if ${Me.Casting} || ${Math.Calc[${LavishScript.RunningTime} - ${This.LastBuffCast}]} < 100
{
return
}
if !${Me.Buff[Devotion Aura](exists)} && !${Spell[Devotion Aura].Cooldown}
{
This:CastInstantSpell["Devotion Aura"]
This.LastBuffCast:Set[${LavishScript.RunningTime} + 1200]
}
elseif !${Me.Buff[Blessing of Wisdom](exists)} && ${Spell[Blessing of Wisdom](exists)}
{
This:CastInstantSpell["Blessing of Wisdom"]
This.LastBuffCast:Set[${LavishScript.RunningTime} + 1200]
}
elseif !${Me.Buff[Blessing of Kings](exists)} && ${Spell[Blessing of Kings](exists)}
{
This:CastInstantSpell["Blessing of Kings"]
This.LastBuffCast:Set[${LavishScript.RunningTime} + 1200]
}
return
}
;Hard coded values depends on gear really.
member NeedRest()
{
if ${Me.Buff[Drink](exists)} && ${Me.PctMana} < 99
return TRUE
if ${Me.PctHPs} < 60
{
return TRUE
}
if ${Me.PctMana} < 40
{
return TRUE
}
return FALSE
}
method RestPulse()
{
if ${Me.PctMana} > 99 && ${Me.Buff[Drink](exists)}
{
This:Stand
}
if ${Me.PctHPs} < 90 && !${Me.Buff[Drink](exists)}
{
This:Stand
if ${Me.PctHPs} < 90 && ${Me.PctHPs} > 75 && !${Me.Buff[Flash of Light](exists)}
{
This:CastInstantSpell[Flash of Light]
}
if ${Spell[Holy Light](exists)} && ${Me.Action[Holy Light].Usable} && ${Me.PctHPs} < 75
{
CastSpell "Holy Light"
}
}
if !${Me.Buff[Drink](exists)} && ${Me.PctMana} < 50 && ${Me.PctHPs} > 90
{
Consumable:Drink
}
return
}
;Need to add code for purify incase cleanse does not exist and return false if neither exist.
member NeedCure()
{
BuffNum:Inc
if ${BuffNum} > 56
{
buffNum:Set[1]
}
if !${Me.Buff[${BuffNum}](exists)}
{
return FALSE
}
;Temp fix until i can check the details
if ${Me.Buff[${BuffNum}].Harmful} && && ${Spell[Cleanse](exists)}
{
if ${Me.Buff[${BuffNum}].DispelType.Equal[Poison]} || ${Me.Buff[${BuffNum}].DispelType.Equal[Disease]} || ${Me.Buff[${BuffNum}].DispelType.Equal[Magic]}
{
return TRUE
}
}
return FALSE
}
method CurePulse()
{
if ${Me.Action["Cleanse"].Usable}
{
Cast "Cleanse"
}
}
method Routine()
{
if ${Me.Casting} || ${Math.Calc[${LavishScript.RunningTime} - ${This.LastCastTime}]} < 100 || ${Me.GlobalCooldown} > 0
{
return
}
if !${Me.Attacking}
{
WoWScript AttackTarget()
}
if ${This.NeedCure}
{
This:CurePulse
return
}
; NOTE Saving Grace Holy shield, heals, LoH and whatever else i can chuck in (trinkets?)
if ${Me.PctHPs} < 45
{
if ${Me.PctHPs} < 5 && ${Spell[Lay of Hands](exists)} && ${Me.Action[Lay of Hands].Usable}
{
Cast "Lay of Hands"
return
}
;Stun if health getting low
if ${Me.PctMana}>15 && !${Spell[Hammer of Justice].Cooldown}
{
Cast "Hammer of Justice"
return
}
if ${Spell[Divine Shield](exists)} && ${Me.Action[Divine Shield].Usable} && !${Me.Buff[Forbearance](exists)}
{
Cast "Divine Shield"
return
}
elseif ${Spell[Blessing of Protection](exists)} && ${Me.Action[Blessing of Protection].Usable} && !${Me.Buff[Forbearance](exists)}
{
This:CastInstantSpell[Blessing of Protection]
return
}
; does the healing
if ${Spell[Holy Light](exists)} && ${Me.Action[Holy Light].Usable}
{
Cast "Holy Light"
return
}
elseif ${Spell[Heal](exists)} && ${Me.Action[Heal].Usable} && !${Spell[Flash Heal](exists)}
{
Cast "Flash of Light"
return
}
return
}
;Judging Seal
if ${Target.Distance} <= 5 && ${Me.PctMana} > 10 && !${Me.Buff["Seal of Wisdom"](exists)} && !${Target.Buff["Judgement of Wisdom"](exists)} && ${Target(exists)}
{
Cast "Seal of Wisdom"
return
}
;judge
if ${Target.Distance} <= 5 && ${Target(exists)} && (${Me.PctMana} > 25 && ${Me.Buff["Seal of Righteousness"](exists)}) || (${Me.PctMana} > 10 && !${Target.Buff["Judgement of Wisdom"](exists)})
{
Cast "Judgement"
return
}
;Seal of Righteousness
if ${Target.Distance} <= 5 && ${Me.PctMana} > 25 && !${Me.Buff["Seal of Righteousness"](exists)} && ${Target.Buff["Judgement of Wisdom"](exists)} && ${Target(exists)}
{
Cast "Seal of Righteousness"
return
}
elseif ${Target.Distance} <= 5 && ${Me.PctMana} > 10 && !${Me.Buff["Seal of Wisdom"](exists)} && ${Target.Buff["Judgement of Wisdom"](exists)} && ${Target(exists)}
Cast "Seal of Wisdom"
return
}
;Ok the fighting part as we appear to have good health
;Multiple aggro attack routine
Aggros:Search[-units,-nearest,-aggro,-alive,-range 0-8]
if ${Aggros.Count} > 1 && ${Me.PctMana} > 30
{
;Holy Wrath
if ${Spell[Holy Wrath](exists)} && ${Spell[Holy Wrath].Useable)}
{
Cast "Holy Wrath"
return
}
;Consecration
if ${Spell["Consecration"](exists)} && ${Spell["Consecration"].Useable)}
{
Cast "Consecration"
return
}
}
Aggros:Clear
;Exorcism
if ${Me.PctMana}> 20 && ${Target(exists)} && ${Spell[Exorcism](exists)} && !${Spell[Exorcism].Cooldown} && ( ${Target.CreatureType.Equal[Undead]} || ${Target.CreatureType.Equal[Demon]} )
{
Cast "Exorcism"
return
}
; Holy Shock
if ${Me.PctMana} > 20 ${Spell[Holy Shock](exists)} && !${Spell[Holy Shock].Cooldown} && ${Target(exists)}
{
Cast "Holy Shock"
return
}
; Interupt a cast
if ${Me.PctMana} > 20 ${Spell[Hammer of Justice](exists)} && !${Spell[Hammer of Justice].Cooldown} && ${Target(exists)} && ${Target.Casting.ID(exists)}
{
Cast "Hammer of Justice"
return
}
; Interupt a cast arcane torrent
if ${Me.PctMana} > 1 ${Spell[Arcane Torrent](exists)} && !${Spell[Arcane Torrent].Cooldown} && ${Target(exists)} && ${Target.Casting.ID(exists)}
{
Cast "Hammer of JusticeArcane Torrent
}
;Trinket usage
if ${Me.Action[${Me.Equip[trinket1]}].Usable}
{
Item[${Me.Equip[trinket1]}]:Use
}
elseif ${Me.Action[${Me.Equip[trinket2]}].Usable}
{
Item[${Me.Equip[trinket2]}]:Use
}
}
}