Thread: Q&A Thread
View Single Post
  #10  
Old 09-07-2018, 09:38 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,333
Default

Quote:
Originally Posted by Almusious View Post
Ive always used an ID of a pc/npc, give it a try:

Code:
sub EVENT_SAY {
	if($text=~/hail/i) 
	{
		quest::say("I'm with you $name and following.");
		quest::follow($userid);
    }
}
Hey Almuscious, thank you, that little sample works like a charm

I'd already tried a few variables with the quest::follow before I even posted the question, including $name and $client, etc.

My intentions for this little task, was just for any player that hails the NPC, it will start to follow.

I've already got scripts running with NPC's following other NPC's with id's but this was my first crack at a random PC follow.

I was going through everything on the wiki with entities, etc., and had no luck, but I sometimes I overlook the obvious, lol

EDIT: This works good with an EVENT_ENTER as well. I set the proximity so all you have to do is run by and it clings to you, lol
Reply With Quote