All pastes #745374 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-22 11:00 UTC
rendered paste body
objectdef oClass inherits oBase
{
	;----------------------
	;--- Rest Variables ---
	;----------------------
	variable int RestHP = 60
	variable int RestMana = 30
	variable int StandupHP = 100
	variable int StandupMana = 100
	variable int HealthForPotion = 20
	variable int HealthForBandage = 35
	variable int ManaForPotion = 15
		
	;----------------------
	;--- Range Settings ---
	;----------------------
	variable int PullRange = 30
	variable int MaxRanged = 30
	variable int MinRanged = 15
	variable int MaxMelee = 5
	variable int MinMelee = 2

	;----------------------
	;-- Hunter Settings ---
	;----------------------
	variable int MeAspect = 2 /* Which aspect would you like your hunter to use? 0-None # 1-Monkey # 2-Hawk # 3-Cheetah # 4-Viper */
	variable int PullShot = 3 /* Do you want to pull with concussive shot, arcane shot, serpent sting or auto shot? 0-Auto Shot # 1- Concussive Shot # 2-Arcane Shot # 3-Serpent Sting */
	variable int SaveIntimidation = 1 /* Do you want to save Intimidation for when you pull adds? 0-No # 1-Yes */
	variable int SaveBestialWrath = 0 /* Do you want to save Bestial Wrath for when you pull adds? 0-No # 1-Yes */
	variable bool UseScrolls = TRUE /* Use Scrolls? */
	variable bool ConserveMana = TRUE /* Do you want to conserve as much mana as possible? */

	;---------------------
	;--- Pet Settings ----
	;---------------------
	variable int MendPetPct = 60 /* What percentage pet HP should you cast Mend Pet? */
	variable int FeedPetPct = 75 /* What percentage pet happiness should you feed your pet? */
	variable int UsePetAttack = 0 /* Do you want your pet to use extra attack Claw, Gore or Screech? 0-No # 1-Yes */
	variable string PetAttack = "Gore" /* Claw, Gore or Screech? */
	variable string PetFood = "Cured Ham Steak" /* Whats the name of the food you want your pet to eat? */

	variable string RVersion = 0.7.1
	variable int LastCallPetTime = ${LavishScript.RunningTime}
	variable int LastFeedPetTime = ${LavishScript.RunningTime}
	variable int LastFeignDeathTime = ${LavishScript.RunningTime}
	variable string AmmoName = ""
	variable string FoundAmmo = ""

	method PetCastSpell(string PetSpell)
	{
		variable int Idx = 1
		do
		{
			if ${WoWScript[GetPetActionInfo(${Idx})].Equal[${PetSpell}]}
			{
				WoWScript CastPetAction(${Idx})
				Bot.RandomPause:Set[14]
			}
		}
		while ${WoWScript[GetPetActionInfo(${Idx:Inc})](exists)}
	}

;#################################################################################################################################
	method LoadAmmo()
	{
		FoundAmmo:Set[${WoWScript[GetItemInfo(GetInventoryItemLink("player"\,GetInventorySlotInfo("AmmoSlot"))),1]}]
		if !${FoundAmmo.Equal[${AmmoName}]}
		{
			Item[${AmmoName}]:Use
		}
	}
	method FindAmmo()
	{
		AmmoName:Set[${Item[-inventory,Arrow]}]
		This:Output["Using ${AmmoName}"]
		return
	}
;#################################################################################################################################
	member PetPoisoned()
	{
		variable int Index = 1
		do
		{
			if ${Me.Pet.Buff[${Index}].DispelType.Equal[Poison]}
			{
				return TRUE
			}
			Index:Inc
		}
		while ${Me.Pet.Buff[${Index}](exists)}
		return FALSE
	}

	method Initialize()
	{
		This:FindAmmo
		This:LoadAmmo
	}


	member NeedRest()
	{
		if ${Me.InCombat}
		{
			return FALSE
		}
		if ${Me.Buff[Food](exists)}
		{
			if ${Me.PctHPs} < ${StandupHP}
			{
				return TRUE
			}
		}
		if ${Me.Buff[Drink](exists)}
		{
			if ${Me.PctMana} < ${StandupMana}
			{
				return TRUE
			}
		}
		if ${Me.PctHPs} < ${RestHP}
		{
			return TRUE
		}
		if ${Me.PctMana} < ${RestMana}
		{
			return TRUE
		}
		if ${Me.Level} < 10
		{
			return FALSE
		}
		if !${Me.Pet(exists)}
		{
			return TRUE
		}
		if ${Me.Pet.PctHappiness} <= ${FeedPetPct}
		{
			return TRUE
		}
		if ${Me.Pet.PctHPs} <= ${MendPetPct}
		{
			return TRUE
		}
		return FALSE
	}

	method RestPulse()
	{
		if !${Me.InCombat} && !${Me.Casting}
		{
			if ${Me.GlobalCooldown} > 0
			{
				return
			}
			; If I am sitting and full stand up
			if ${Me.Sitting} && ${Me.PctHPs} == ${StandupHP} && ${Me.PctMana} == ${StandupMana}
			{
				wowpress jump
			}
			
			if ${Movement.Speed}
			{
				Move -stop
			}

			if ${Me.Target(exists)}
			{
				WoWScript ClearTarget()
			}
			
			/* bandage if you got em */
			if ${Me.PctHPs} < ${This.HealthForBandage} && ${Item[-inventory,Bandage](exists)} && !${Me.Buff[Recently Bandaged](exists)}
			{
				if ${WoWScript[SpellIsTargeting()]}
				{
					Target ${Me.GUID}
					This:Output["Bandaging"]
					return
				}	
				Target ${Me.GUID}				
				Item[-inventory,Bandage]:Use
				Bot.RandomPause:Set[24]
				return
			}
			
			if !${Me.Pet(exists)} && !${Me.Sitting}
			{
				if ${LavishScript.RunningTime} - ${LastCallPetTime} > 5000
				{
					Toon:CastSpell["Call Pet"]
					LastCallPetTime:Set[${LavishScript.RunningTime}]
					Bot.RandomPause:Set[24]
					return
				}

				if ${LavishScript.RunningTime} - ${LastCallPetTime} < 5000
				{
					Toon:CastSpell[Revive Pet]
					Bot.RandomPause:Set[24]
				}
			}

			if ${Me.Pet(exists)}
			{
				if ${Me.Pet.PctHPs} < ${MendPetPct} && !${Me.Pet.Buff[Mend Pet](exists)}
				{
					Toon:CastSpell[Mend Pet]
					Bot.RandomPause:Set[14]
				}

				if ${Me.Pet.Distance} < 9 && !${This.PetPoisoned} && ${Me.Pet.PctHappiness} <= ${FeedPetPct} && ${LavishScript.RunningTime} - ${LastFeedPetTime} > 15000
				{
					Toon:CastSpell[Feed Pet]
					Item[${PetFood}]:Use
					LastFeedPetTime:Set[${LavishScript.RunningTime}]
					Bot.RandomPause:Set[14]
				}
			}

			if ${Me.PctHPs} < ${RestHP} && ${Consumable.HasFood} && !${Me.Buff[Food](exists)}
			{
				Consumable:useFood
				Bot.RandomPause:Set[24]
				return
			}
			if ${Me.PctMana} < ${RestMana} && ${Consumable.HasDrink} && !${Me.Buff[Drink](exists)}
			{
				Consumable:useDrink
				Bot.RandomPause:Set[24]
				return
			}
		}
	}

	;------------------
	;--- Buff SetUp ---
	;------------------

	member NeedBuff()
	{
		switch ${MeAspect}
		{
			case 1
				if !${Me.Buff[Aspect of the Monkey](exists)} && ${Spell[Aspect of the Monkey](exists)}
				{
					return TRUE
				}
				break
			case 2
				if !${Me.Buff[Aspect of the Hawk](exists)} && ${Spell[Aspect of the Hawk](exists)}
				{
					return TRUE
				}
				break
			case 3
				if !${Me.Buff[Aspect of the Cheetah](exists)} && ${Spell[Aspect of the Cheetah](exists)}
				{
					return TRUE
				}
				break
			case 4
				if !${Me.Buff[Aspect of the Viper](exists)} && ${Spell[Aspect of the Viper](exists)}
				{
					return TRUE
				}
				break
		}
		if ${UseScrolls}
		{
			if ${Consumable.HasScroll[Protection]} && !${Me.Buff[Protection](exists)}
			{
				return TRUE
			}
			if ${Consumable.HasScroll[Stamina]} && !${Me.Buff[Stamina](exists)}
			{
				return TRUE
			}
			if ${Consumable.HasScroll[Spirit]} && !${Me.Buff[Spirit](exists)}
			{
				return TRUE
			}
			if ${Consumable.HasScroll[Intellect]} && !${Me.Buff[Intellect](exists)}
			{
				return TRUE
			}
			if ${Consumable.HasScroll[Agility]} && !${Me.Buff[Agility](exists)}
			{
				return TRUE
			}
			if ${Consumable.HasScroll[Strength]} && !${Me.Buff[Strength](exists)}
			{
				return TRUE
			}
		}		
		return FALSE
	}

	method BuffPulse()
	{
		if ${Me.GlobalCooldown} > 0
		{
			return
		}
		
		This:FindAmmo
		This:LoadAmmo
		
		if ${Me.Sitting}
		{
			Toon:Standup
		}
		
		switch ${MeAspect}
		{
			case 1
				if !${Me.Buff[Aspect of the Monkey](exists)} && ${Spell[Aspect of the Monkey](exists)}
				{
					Toon:CastSpell[Aspect of the Monkey]
					Bot.RandomPause:Set[24]
				}
				break
			case 2
				if !${Me.Buff[Aspect of the Hawk](exists)} && ${Spell[Aspect of the Hawk](exists)}
				{
					Toon:CastSpell[Aspect of the Hawk]
					Bot.RandomPause:Set[24]
				}
				break
			case 3
				if !${Me.Buff[Aspect of the Cheetah](exists)} && ${Spell[Aspect of the Cheetah](exists)}
				{
					Toon:CastSpell[Aspect of the Cheetah]
					Bot.RandomPause:Set[24]
				}
				break
			case 4
				if !${Me.Buff[Aspect of the Viper](exists)} && ${Spell[Aspect of the Viper](exists)}
				{
					Toon:CastSpell[Aspect of the Viper]
					Bot.RandomPause:Set[24]
				}
				break
		}
		if ${UseScrolls}
		{
			if ${Consumable.HasScroll[Protection]} && !${Me.Buff[Protection](exists)}
			{
				Consumable:UseScroll[Protection, First]
				return
			}
			if ${Consumable.HasScroll[Stamina]} && !${Me.Buff[Stamina](exists)}
			{
				Consumable:UseScroll[Stamina, First]
				return
			}
			if ${Consumable.HasScroll[Spirit]} && !${Me.Buff[Spirit](exists)}
			{
				Consumable:UseScroll[Spirit, First]
				return
			}
			if ${Consumable.HasScroll[Intellect]} && !${Me.Buff[Intellect](exists)}
			{
				Consumable:UseScroll[Intellect, First]
				return
			}
			if ${Consumable.HasScroll[Agility]} && !${Me.Buff[Agility](exists)}
			{
				Consumable:UseScroll[Agility, First]
				return
			}
			if ${Consumable.HasScroll[Strength]} && !${Me.Buff[Strength](exists)}
			{
				Consumable:UseScroll[Strength, First]
				return
			}
		}
	}

	;------------------
	;--- Pull SetUp ---
	;------------------

	member NeedPullBuff()
	{
		return FALSE
	}

	method PullBuffPulse()
	{
	}

	;------------------------
	;--- CombatBuff SetUp ---
	;------------------------

	member NeedCombatBuff()
	{
		return FALSE
	}

	method CombatBuffPulse()
	{
	}

	;------------------
	;--- Pull SetUp ---
	;------------------
	member InRange()
	{
		if ${Target.Distance} < 25
		{
			return TRUE
		}
		
		return FALSE
	}

	method PullPulse()
	{
		variable int RandPull = 0
		if !${Me.Target(exists)}
		{
			return
		}
		if ${Me.Target.Dead}
		{
			WoWScript ClearTarget()
			return
		}
		if !${Me.Target.Attackable}
		{
			WoWScript ClearTarget()
			return
		}

		echo ${Me.Buff[Feign Death](exists)} && ${LavishScript.RunningTime} - ${LastFeignDeathTime} > 5000
		if ${Me.Buff[Feign Death](exists)} && ${LavishScript.RunningTime} - ${LastFeignDeathTime} > 5000
		{
			This:Output["Feigned Death long enough!"]
			Toon:Standup
			return
		}

		if ${Me.Sitting}
		{
			Toon:Standup
			return
		}

		if ${Target.Distance} == 0
		{
			return
		}
		
		;This:Output["Facing ${Target.GUID} ${Target.Location}"]
		Navigator:FaceXYZ[${Target.X},${Target.Y},${Target.Z}]

		; Make sure we are in distance for attacking
		if ${Target.Distance} > ${MaxRanged}
		{
			wowpress -hold moveforward
			return
		}
		if ${Target.Distance} < ${MinRanged} && ${Target.Target.GUID.NotEqual[${Me.GUID}]}
		{
			This:Output["MOVE2"]
			;Move Backward 1000
			;move backward ${Math.Calc[((30-${Target.Distance})/4.5)*1000]}
			wowpress -release moveforward
			wowpress -hold movebackward
			if ${Math.Rand[100]} => 96 && !${Me.Buff[Feign Death](exists)}
			{
				echo "rand1"
				wowpress jump
			}
			return
		}

		; Stop if we are
		if ${Target.Distance} > ${MinRanged} && ${Target.Distance} < ${MaxRanged} && ${Movement.Speed}
		{
			Move -stop
		}
		
		if ${Me.GlobalCooldown} > 0
		{
			return
		}
		
		if !${Me.Pet.InCombat}
		{
			WoWScript PetAttack()
			Bot.RandomPause:Set[14]
		}

		if ${Spell[Bestial Wrath](exists)} && !${Spell[Bestial Wrath].Cooldown} && ${Me.Target.PctHPs} > 90
		{
			Toon:CastSpell[Bestial Wrath]
			Bot.RandomPause:Set[24]
		}
		
		if ${Spell["Hunter's Mark"](exists)} && !${Me.Target.Buff["Hunter's Mark"](exists)}
		{
			move -stop
			Toon:CastSpell["Hunter's Mark"]
			Bot.RandomPause:Set[24]
			return
		}
		
		if ${Math.Calc[${Math.Rand[50]:Inc[1]}%2]} != 0
		{
			if ${Spell[Rapid Fire](exists)} && !${Spell[Rapid Fire].Cooldown} && ${Me.Target.PctHPs} > 90
			{
				Toon:CastSpell[Rapid Fire]
				Bot.RandomPause:Set[24]
				return
			}
		}

		if ${Math.Calc[${Math.Rand[50]:Inc[1]}%2]} == 0
		{
			if ${Spell[Freezing Trap](exists)} && !${Spell[Freezing Trap].Cooldown}
			{
				Toon:CastSpell[Freezing Trap]
				Bot.RandomPause:Set[24]
				return
			}
		}
		
		do
		{
			RandPull:Set[${Math.Rand[3]:Inc[1]}]
		}
		while ${RandPull} < 1 || ${RandPull} > 4
		
		switch ${RandPull}
		{
			case 1
				if ${Spell[Concussive Shot](exists)} && ${Unit[${Target.GUID}].CreatureType.Equal[Humanoid]} && !${Spell[Concussive Shot].Cooldown}
				{
					This:Output[Pulling with Concussive Shot]
					Toon:CastSpell[Concussive Shot]
					Bot.RandomPause:Set[24]
					return
				}
				else
				{
					if ${Spell[Arcane Shot].Cooldown} || !${Spell[Arcane Shot](exists)}
					{
						return
					}
					This:Output[Pulling with Arcane Shot]
					Toon:CastSpell[Arcane Shot]
					Bot.RandomPause:Set[24]
					return					
				}
				break
			case 2
				if ${Spell[Arcane Shot](exists)}
				{
					if ${Spell[Arcane Shot].Cooldown}
					{
						return
					}
					This:Output[Pulling with Arcane Shot]
					Toon:CastSpell[Arcane Shot]
					Bot.RandomPause:Set[24]
					return
				}
				break
			case 3
				if ${Spell[Serpent Sting](exists)} && ${Target.MaxMana} <= 0
				{
					if ${Spell[Serpent Sting].Cooldown}
					{
						return
					}
					This:Output[Pulling with Serpent Sting]
					Toon:CastSpell[Serpent Sting]
					Bot.RandomPause:Set[24]
					return
				}
				elseif ${Target.MaxMana} > 0
				{
					if ${Spell[Viper Sting].Cooldown}
					{
						return
					}
					This:Output[Pulling with Viper Sting, ${Target.Name} got Mana!]
					Toon:CastSpell[Viper Sting]
					Bot.RandomPause:Set[24]
					return					
				}
				break
		}

		; Default Pull
		WoWScript AttackTarget()
	}

	;--------------------
	;--- Combat SetUp ---
	;--------------------

	method AttackPulse()
	{
		variable string PotionName
		POI.IInteracting:Set[FALSE]

		if ${Me.GlobalCooldown} > 0
		{
			return
		}

		if !${Target(exists)} || ${Target.GUID.Equal[${Me.GUID}]} || ${Target.Dead}
		{
			This:Output["I need a target"]
			Toon:NeedTarget[1]
		}

		if !${Me.Target(exists)}
		{
			move -stop
			return
		}
		
		if ${Me.Target.Dead}
		{
			WoWScript ClearTarget()
			move -stop
			return
		}
		
		if !${Me.Target.Attackable}
		{
			WoWScript ClearTarget()
			move -stop
			return
		}
		
		if ${Me.Buff[Feign Death](exists)} && ${LavishScript.RunningTime} - ${LastFeignDeathTime} > 5000
		{
			This:Output["Feigned Death long enough!"]
			Toon:Standup
			return
		}
		
		if ${Me.Sitting} && !${Me.Buff[Feign Death](exists)}
		{
			WoWpress jump
			return
		}
		
		if ${Me.Target(exists)} && !${Me.InCombat}
		{
			; Why do I have a target in attack pulse and am not in combat?
			WoWScript ClearTarget()
			Bot.RandomPause:Set[11]
			return
		}
				
		if ${Toon.canCast[Berserking]} && ${Me.PctHPs} < 30
		{
			Toon:CastSpell[Berserking]
			Bot.RandomPause:Set[24]
			return
		}
		;This:Output["Facing ${Target.GUID} ${Target.Location}"]
		if !${ISXWoW.Facing}
		{
			Navigator:FaceXYZ[${Target.X},${Target.Y},${Target.Z}]
		}
		
		if ${Me.PctHPs} < ${This.HealthForPotion}
		{
			if !${Item[-inventory,"Healing Potion"](exists)}
			{
				return
			}
			PotionName:Set[${Item[-inventory,"Healing Potion"].Name}]	
			if ${Item[${PotionName}].Usable}&&!${WoWScript["GetContainerItemCooldown(${Item[${PotionName}].Bag.Number}, ${Item[${PotionName}].Slot})", 2]}
			{
				Item[${PotionName}]:Use
				Bot.RandomPause:Set[24]
				return
			}
		}
		
		if ${Me.PctMana} < ${This.ManaForPotion}
		{
			if !${Item[-inventory,"Mana Potion"](exists)}
			{
				return
			}
			PotionName:Set[${Item[-inventory,"Mana Potion"].Name}]	
			if ${Item[${PotionName}].Usable}&&!${WoWScript["GetContainerItemCooldown(${Item[${PotionName}].Bag.Number}, ${Item[${PotionName}].Slot})", 2]}
			{
				Item[${PotionName}]:Use
				Bot.RandomPause:Set[24]
				return
			}
		}
		
		if !${Me.Pet.InCombat} || !${Me.Pet.Target(exists)}
		{
			WoWScript PetAttack()
		}
		
		; Make sure we are in distance for attacking
		if ${Target.Distance} > ${MaxRanged} && ${Target.PctHPs} > 20 && !${Me.Casting}
		{
			wowpress -hold moveforward
			return
		}
		
		if ${Target.Distance} < ${MinRanged} && ${Target.Target.GUID.NotEqual[${Me.GUID}]} && ${Target.PctHPs} > 20
		{
			This:Output["MOVE2"]
			;Move Backward 1000
			;move backward ${Math.Calc[((30-${Target.Distance})/4.5)*1000]}
			wowpress -release moveforward
			wowpress -hold movebackward
			if ${Math.Rand[100]} > 96 && !${Me.Buff[Feign Death](exists)}
			{
				wowpress JUMP
			}
			return
		}

		if ${Target.Distance} > ${MinRanged} && ${Target.Distance} < ${MaxRanged} && ${Movement.Speed}
		{
			Move -stop
		}
		
		if !${Me.Pet.InCombat} || !${Me.Pet.Target(exists)}
		{
			WoWScript PetAttack()
		}
		
		if ${Me.InCombat} && !${Me.Attacking} && !${Me.Action[Auto Shot].AutoRepeat}
		{
			WoWScript AttackTarget()
		}

		if ${Toon.canCast[Mend Pet]} && ${Me.Pet.PctHPs} < ${MendPetPct} && !${Me.Pet.Buff[Mend Pet](exists)}
		{
			Toon:CastSpell[Mend Pet]
			Bot.RandomPause:Set[17]
			return
		}

		if ${Toon.canCast[Mend Pet]} && ${This.PetPoisoned}
		{
			Toon:CastSpell[Mend Pet]
			Bot.RandomPause:Set[17]
			return
		}
		
		if ${Target.Buff[Freezing Trap Effect](exists)}
		{
			if ${Me.Action[Auto Shot].AutoRepeat}
			{
				Toon:CastSpell[Auto Shot]
				Bot.RandomPause:Set[14]
			}
			if ${Me.PctHPs} < ${This.HealthForBandage} && ${Item[-inventory,Bandage](exists)} && !${Me.Buff[Recently Bandaged](exists)}
			{
				if ${WoWScript[SpellIsTargeting()]}
				{
					Target ${Me.GUID}
					This:Output["Bandaging"]
					return
				}	
				Target ${Me.GUID}				
				Item[-inventory,Bandage]:Use
				Bot.RandomPause:Set[14]
				return
			}
		}
		
		if ${Target.PctHPs} < 20 && ${Target.Distance} > ${Math.Calc[${MaxRanged} + ${Target.BoundingRadius}]}
		{
			if ${Toon.canCast[Concussive Shot]} && ${Unit[${Target.GUID}].CreatureType.NotEqual[Mechanical]}
			{
				Toon:CastSpell[Concussive Shot]
				Bot.RandomPause:Set[24]
				return				
			}
		}
		
		if ${Target.Target.GUID.Equal[${Me.GUID}]} && ${Target.PctHPs} > 20
		{
			This:Output["Pet lost aggro"]
			if ${Toon.canCast[Intimidation]}
			{
				This:Output["Countermeasure: Intimidation"]
				Toon:CastSpell[Intimidation]
				Bot.RandomPause:Set[24]
				return
			}
			if ${Toon.canCast[Feign Death]}
			{
				This:Output["Countermeasure: Feign Death"]
				Toon:CastSpell[Feign Death]
				LastFeignDeathTime:Set[${LavishScript.RunningTime}]
				Bot.RandomPause:Set[24]
				return
			}
			if ${Toon.canCast[Spell[Freezing Trap]}
			{
				This:Output["Countermeasure: Freezing Trap"]
				Toon:CastSpell[Freezing Trap]
				Bot.RandomPause:Set[24]
				return
			}
		}

		if ${Target.Distance} <= 5 && ${Target.Target.GUID.Equal[${Me.GUID}]}
		{
			if ${Me.Action[Raptor Strike].Usable}
			{
				Toon:CastSpell[Raptor Strike]
				Bot.RandomPause:Set[24]
				return
			}
		}
		
		if !${ConserveMana} && ${Target.Distance} <= ${MaxRanged}
		{
			if ${Toon.canCast[Arcane Shot]}
			{
				Bot.RandomPause:Set[14]
				Toon:CastSpell[Arcane Shot]
				Bot.RandomPause:Set[24]
				return
			}
		}
		elseif ${ConserveMana} && ${Math.Calc[${Math.Rand[50]:Inc[1]}%2]} != 0 && ${Target.Distance} <= ${MaxRanged}
		{
			if ${Toon.canCast[Arcane Shot]}
			{
				Bot.RandomPause:Set[14]
				Toon:CastSpell[Arcane Shot]
				Bot.RandomPause:Set[24]
				return
			}
		}
		
		if ${UsePetAttack} == 1
		{
			if ${Me.Pet.CurrentPower} >= 45 && ${Me.Pet.Target(exists)} && ${LavishScript.RunningTime} - ${LastPetAttackTime} > 1800
			{
				This:PetCastSpell[${PetAttack}]
				LastPetAttackTime:Set[${LavishScript.RunningTime}]
				return
			}
		}

		if ${SaveIntimidation} == 0
		{
			if ${Toon.canCast[Intimidation]} && ${Me.Target.PctHPs} > 40 && ${Target.Target.GUID.Equal[${Me.GUID}]}
			{
				Toon:CastSpell[Intimidation]
				Bot.RandomPause:Set[24]
				return
			}
		}

		if ${SaveBestialWrath} == 0
		{
			if ${Toon.canCast[Bestial Wrath]} && ${Me.Target.PctHPs} > 90
			{
				Toon:CastSpell[Bestial Wrath]
				Bot.RandomPause:Set[24]
				return
			}
		}

		if ${Target.Distance} > ${MinRanged} && ${Target.Distance} < ${MaxRanged}
		{
			if !${Me.Action[Auto Shot].AutoRepeat}
			{
				Toon:CastSpell[Auto Shot]
				Bot.RandomPause:Set[24]
			}

			if ${Target.MaxMana} > 0 && !${Me.Target.Buff[Viper Sting](exists)} && ${Me.Target.PctHPs} > 30 && ${Me.Target.CreatureType.NotEqual[Mechanical]} && ${Me.Target.CreatureType.NotEqual[Elemental]}
			{
				Toon:CastSpell[Viper Sting]
				Bot.RandomPause:Set[24]
				return
			}
			elseif ${Spell[Serpent Sting](exists)} && ${Target.MaxMana} <= 0 && !${Me.Target.Buff[Serpent Sting](exists)} && ${Me.Target.PctHPs} > 30 && ${Me.Target.CreatureType.NotEqual[Mechanical]} && ${Me.Target.CreatureType.NotEqual[Elemental]}
			{
				Toon:CastSpell[Serpent Sting]
				Bot.RandomPause:Set[24]
				return
			}

			if ${Target.Distance} <= ${MaxMelee}
			{
				if !${Me.Attacking}
				{
					WoWScript AttackTarget()
				}

				if ${Toon.canCast[Immolation Trap]}
				{
					Toon:CastSpell[Immolation Trap]
					Bot.RandomPause:Set[24]
					return
				}

				if ${Toon.canCast[Disengage]} && ${Target.Target.GUID.Equal[${Me.GUID}]}
				{
					Toon:CastSpell[Disengage]
					Bot.RandomPause:Set[24]
					return
				}

				if ${Toon.canCast[Mongoose Bite]} && ${Me.Action[Mongoose Bite].Usable}
				{
					Toon:CastSpell[Mongoose Bite]
					Bot.RandomPause:Set[24]
					return
				}
				if ${Toon.canCast[Intimidation]} && ${Me.Action[Intimidation].Usable}
				{
					Toon:CastSpell[Intimidation]
					Bot.RandomPause:Set[24]
					return
				}
			}
		}
	}
}