target nearest friendly excluding self
				
Posted: 
Tue Jan 26, 2016 5:55 pmby Colezz
				its possible? atm when i use targetnearestfriendlyplayer it will cycle between me and nearest ally jsut want it to target nearest friend and if theres no other allys about it will stay on that guy no matter if i spam it instead of targeting me .
			 
			
				Re: target nearest friendly excluding self
				
Posted: 
Tue Jan 26, 2016 8:48 pmby Bit
				- Code: Select all
- /run TargetNearestFriend() if UnitName('target') == UnitName('player') then TargetNearestFriend() end
Maybe this. Will still target yourself if there's no nearest friend though.
 
			
				Re: target nearest friendly excluding self
				
Posted: 
Tue Jan 26, 2016 8:50 pmby Dreez
				only in a rather ugly way:
- Code: Select all
- /run TargetNearestFriend()if UnitIsUnit("target", "player") then TargetNearestFriend()end
edit: posted at the same time and essentially the same 

 
			
				Re: target nearest friendly excluding self
				
Posted: 
Sat Jan 30, 2016 4:10 pmby Colezz
				wow thatnks it works great guys, now just wondering is it possible to make it exclude hunter and warlock pets and only target the player
			 
			
				Re: target nearest friendly excluding self
				
Posted: 
Sun Jan 31, 2016 12:18 pmby Roadblock
				Colezz wrote:wow thatnks it works great guys, now just wondering is it possible to make it exclude hunter and warlock pets and only target the player
Maybe this will do the job
- Code: Select all
- /run local t,u,p,e=TargetNearestFriend,UnitIsUnit,UnitIsPlayer,UnitPlayerControlled;t()if u("target","player")or(e("target")and not p("target"))then t() end