Page 1 of 1

Attacking Only ## Npc

Posted: Sat Aug 08, 2020 3:14 pm
by Uniden65
Is there a way to make a way point to attack on a Npc based on there ID number? and exnore the other npc's around them ..?

Re: Attacking Only ## Npc

Posted: Sun Aug 09, 2020 1:37 am
by ThulsaDoom
CDWriter wrote: Sat Aug 08, 2020 3:14 pm Is there a way to make a way point to attack on a Npc based on there ID number? and exnore the other npc's around them ..?
You can try to find and target the NPC.

Code: Select all

mytarget = player:findNearestNameOrId(108173) -- Guargo the Furious Bull
			
			if mytarget then 
				player:target_NPC(108173)
			end
Today there is no function that allows you to only target an NPC (as far as I know).
Now player:target_NPC() select the NPC and attack it, the problem with this function is that it always starts with a white hit, then continues with the attacks specified in the profile.

Before to do the same we did:

Code: Select all

player:target_NPC(108173) 
	player:fight()