All pastes #443919 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-17 02:40 UTC
rendered paste body
;Check to see if ISXWoW has loaded.
#if !${InnerSpace:LoadExtension[isxwow](exists)}
#error ISXWoW is required but could not be loaded
#endif

;Define for waypoint precision
#define WPPRECISION 3

#define Use_Pet
#define FOOD_NAME "Clefthoof Ribs"	/* Name of food to feed pet with */

#include ./WOWCUF/moveto.iss
#include ./WOWCUF/spells.iss
#include ./WOWCUF/uhs.iss

;;;;;;;;;;;;;;;;;
; Configuration ;
;;;;;;;;;;;;;;;;;

#define MoveToTarget 0



function main()
{
	turbo 1000
	declare HomeDir filepath script ${Script.CurrentDirectory}
	declare CombatMaxDist float script 5
	declare CombatMinDist float script 2
	;declare UseFaceFast bool script FALSE
	declare Counter int

	ui -load "WoWSkin/WoWSkin.xml"
	ui -load  -skin WoWSkin "HunterAidUI.xml"

	echo "Pausing."
	Script[HunterAid]:Pause
	
	{
	#ifdef FOOD_NAME
	if  !${Me.InCombat}&&${Me.Pet.PctHappiness}<70&&${Me.Pet.Health}!=0&&${Item[FOOD_NAME](exists)}
	{
		cast "feed pet"
		wait 20 ${WoWScript[SpellIsTargeting()]}
		waitframe
		Item[-exact,FOOD_NAME]:PickUp
		wait 1
		wowscript SpellStopTargeting()
		wait 10
                                target Hawkbane
                                Wait 10
                                cast "Feed Pet"
                                Item[-exact,FOOD_NAME]:Use
                                Wait 10

	}
	#endif

	} 
	while 1
	{
		if ${Target(exists)} && !${Target.Dead} && ${Target.Attackable} && !${Me.Dead} && !${Me.Buff[Feign Death](exists)}
		switch ${Me.Class}
		{
			case Hunter
				call Attack_Hunter ${Target.GUID}
				break
		}
		waitframe
	}	
}

function atexit()
{
	ui -unload "WoWSkin/WoWSkin.xml"
	ui -unload "HunterAidUI.xml"
}

function sanity(string sanitySpell)
{

	if ${Target(exists)} && !${Target.Dead} && ${Target.Distance}<41 && ${Target.Attackable} && !${Me.Dead} && !${Me.Buff[Feign Death](exists)}
	{
		if !${Me.Action[Auto Shot].AutoRepeat} && ${Target.Distance}>8 
		{
			Cast "Auto Shot"
		}
		Cast "${sanitySpell}"
		waitframe
	}
	while (${Me.Casting} || ${Me.GlobalCooldown}) && !${Target.Dead} && !${Me.Dead} && !${Me.Buff[Feign Death](exists)}
	{
		waitframe
	}
	
}


function Attack_Hunter(string AttackGUID)
{	
	
	declare SavX float local ${Me.X}
	declare SavY float local ${Me.Y}
	declare SavZ float local ${Me.Z}
	declare BailOut int local ${Math.Calc[${LavishScript.RunningTime}+(1000*${CombatBailout})]}
	declare HavePulled bool local FALSE
	declare StuckCheck bool local FALSE
	declare StuckCheckCount int local 0
	declare StuckCheckTime int local
	declare Aggros guidlist local
	declare MovedBackMulti bool local FALSE

	
	{
		AttackGUID:Set[${Target.GUID}]

		; Ensure we are still facing our target loc
		;call SmartFace ${Target.X} ${Target.Y}
		;waitframe
		
		; Check we still have a valid target
		if !${Target(exists)}
		{
			echo "Target no longer valid."
			TargetGUID:Set[NOTARGET]
			Return
		}
		
		if !${WoWScript[HasPetUI()]} 
		{
			call UpdateHudStatus "Summoning a new pet" 
			call CastSpell "Call Pet"  ${Me.GUID}
			wait ${Me.Casting}
		}

		if !${Me.Buff[Aspect of the Hawk](exists)}
		{
			call CastSpell "Aspect of the Hawk" ${Me.GUID}
			wait ${Me.Casting}
		}
		if !${Me.Buff[Trueshot Aura](exists)} 
		{
			call CastSpell "Trueshot Aura" ${Me.GUID}
			wait ${Me.Casting}
		}

		if !${Target.Buff[Hunter's Mark](exists)} && ${Spell[Hunter's Mark](exists)} && ${Me.Action[Hunter's Mark].Usable}        
		{
			call CastSpell "Hunter's Mark"
		}		
		
		; Once our target is in melee range turn on attack
		if !${Me.Attacking} && ${Target(exists)} && ${Target.Distance}<8
		{
			WoWScript AttackTarget()
		}
		
		;Pet
		
		if ${Target.Attackable} && ${Target.Distance}<55
		{
			wowscript PetAttack()
		}
			
		; Kill Command.
		if ${Spell[Kill Command](exists)} && ${Me.Action[Kill Command].Usable}
		{
			call sanity "Kill Command"
		}
		
		; Rapid Fire
		if ${Spell[Rapid Fire](exists)} && ${Me.Action[Rapid Fire].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Rapid Fire"
		}
		
		; Viper Sting
		call IsTargetCaster ${AttackGUID}
		if ${Return} && !${Target.CreatureType.Equal[Elemental]} && ${Spell[Viper Sting](exists)} && ${Me.Action[Viper Sting].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Viper Sting"
		}
		
		; Aimed Shot
		if ${Spell[Aimed Shot](exists)} && ${Me.Action[Aimed Shot].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Aimed Shot" 
			
		}
		
		; Multishot.
		if ${Spell[Multi-Shot](exists)} && ${Me.Action[Multi-Shot].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Multi-Shot"
		}

		; Arcane Shot.
		if ${Spell[Arcane Shot](exists)} && ${Me.Action[Arcane Shot].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Arcane Shot"
		}
		
		; Steady Shot.
		if ${Spell[Steady Shot](exists)} && ${Me.Action[Steady Shot].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Steady Shot"
		}

		; Enemy casting?  Silence him!  
		if ${Target.Casting.ID(exists)} && ${Spell[Silencing Shot](exists)} && ${Me.Action[Silencing Shot].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Silencing Shot"
		}

		; Concussive Shot.
		if ${Spell[Concussive Shot](exists)} && ${Me.Action[Concussive Shot].Usable} && ${Target.Distance}>8 && ${Target.Distance}<43
		{
			call sanity "Concussive Shot" 
		}

		; Scatter Shot.
		if ${Spell[Scatter Shot](exists)} && ${Me.Action[Scatter Shot].Usable} && ${Target.Distance}<21
		{
			call sanity "Scatter Shot" 
		}
		
		; Wing Clip.
		if ${Spell[Wing Clip](exists)} && ${Me.Action[Wing Clip].Usable} && ${Target.Distance}<6
		{
			call sanity "Wing Clip" 
			wait ${Me.Casting}
			call sanity "Raptor Strike" 
		}
		
		; Mongoose Bite.
		if ${Spell[Mongoose Bite](exists)} && ${Me.Action[Mongoose Bite].Usable} && ${Target.Distance}<6
		{
			call sanity "Mongoose Bite" 
			
		}
		
	}
	

}

function IsTargetCaster( string AttackGUID )
{
  ;echo "Checking Target for Caster"
  ;echo "${Select[${Unit[${AttackGUID}].Class},Mage,Warlock,Paladin,Shaman,Druid,Priest]}"
  return ${Select[${Unit[${AttackGUID}].Class},Mage,Warlock,Paladin,Shaman,Druid,Priest]}
}