Page 1 of 1

Need Help with Target NPC that moves or walks

Posted: Fri May 04, 2012 6:28 pm
by Tempest
was wondering if someone here could help me i am trying to target a npc that moves the id is 119197

but he moves alot all over the place is there away to search for the npc in between a few way points?

Re: Need Help with Target NPC that moves or walks

Posted: Sat May 05, 2012 1:35 am
by rock5
Sure easy enough. Just creat waypoints at all the locations he might be and check at each spot. Probably best to make some sort of loop. Then at the spot where you should continue, to do the quest, if you don't have the quest then go round again. If you have the quest then continue. I'd probably create a mini function in the onload of the waypoint. Something like.

Code: Select all

function CheckNPCAccept()
    if  getQuestStatus("name of quest") ~= "incomplete" and player:target_NPC(119197) then
        yrest(1000)
        AcceptQuestByName("name of quest")
    end
end
Then just add

Code: Select all

CheckNPCAccept()
at each waypoint you want to check. Then creat a similar function for completing the quest. If you want to use the function for more than one quest you could add arguments to the function.

Re: Need Help with Target NPC that moves or walks

Posted: Sun May 06, 2012 5:11 pm
by Tempest
Thanks Rock for your help and time seems to work just got to tweak stuff around still having abit of issues