All pastes #389856 Raw Edit

Untitled

public text v1 · immutable
·published 2007-03-11 00:36 UTC
rendered paste body
objectdef oToon inherits oToonBase
{
	variable int MinCombatRange = 1
	variable int MaxCombatRange = 34
	variable int MinMana = 50
	variable int MinHealth = 60
	
	variable string ManaStone = ${This.GetManaStone}
	
	variable bool DampenMagic = FALSE
	variable bool UseFireWard = FALSE
	variable bool UseFrostWard = FALSE
	variable bool ImmuneFrost = FALSE
	variable bool ImmuneFire = FALSE

	member NeedBuff()
	{	
		if !${Me.Buff[Arcane Intellect](exists)} && ${Spell[Arcane Intellect](exists)}
			{ 
				return TRUE
			}
		if !${Me.Buff[Ice Armor](exists)} && !${Me.Buff[Frost Armor](exists)}
			{
				return TRUE
			}
		if !${Item[${This.ManaStone}](exists)} && ${Me.Action["Conjure ${This.ManaStone}"].Usable}
			{
				return TRUE
			}
		return FALSE 
	}

	method BuffPulse()
	{
		if !${Me.Buff[Arcane Intellect](exists)} && ${Me.Action[Arcane Intellect].Usable}
			{ 
				SpellTarget ${Me.GUID}
				Cast "Arcane Intellect"
			}  
		elseif !${Me.Buff[Ice Armor](exists)} && ${Me.Action[Ice Armor].Usable}
			{
				Cast "Ice Armor"
			}
		elseif !${Me.Buff[Frost Armor](exists)} && ${Me.Action[Frost Armor].Usable} && !${Me.Buff[Ice Armor](exists)}
			{
				Cast "Frost Armor"
			}
		elseif !${Item[${This.ManaStone}](exists)} && ${Me.Action["Conjure ${This.ManaStone}"].Usable}
			{
				Cast "Conjure ${This.ManaStone}"
			}
	}
	
	member NeedCombatBuff()
	{
		if !${Me.Buff[Dampen Magic](exists)} && ${Me.Action[Dampen Magic].Usable} && ${This.DampenMagic}
			{
				return TRUE
			}
		if ${This.TrinketUsable} && ${Target.PctHPs} > 50
			{
				return TRUE
			}
		if !${Me.Buff[Combustion](exists)} && ${Me.Action[Combustion].Usable}
			{
				return TRUE
			}
		return FALSE 
	}

	method CombatBuffPulse()
	{
		if !${Me.Buff[Dampen Magic](exists)} && ${Me.Action[Dampen Magic].Usable} && ${This.DampenMagic}
			{
				SpellTarget ${Me.GUID}
				Cast "Dampen Magic"
			}
		elseif !${Me.Buff[Fire Ward](exists)} && ${Me.Action[Fire Ward].Usable} && ${This.UseFireWard} && !${This.UseFrostWard}
			{ 
				Cast "Fire Ward"
			}
		elseif !${Me.Buff[Frost Ward](exists)} && ${Me.Action[Frost Ward].Usable} && !${This.UseFireWard} && ${This.UseFrostWard}
			{ 
				Cast "Frost Ward"
			} 
		elseif ${This.TrinketUsable} && ${Target.PctHPs} > 50
			{
				This:UseTrinket
			}
		elseif !${Me.Buff[Combustion](exists)} && ${Me.Action[Combustion].Usable}
			{	
				Cast "Combustion"	
			}
	}