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

Quote:
Originally Posted by Almusious View Post
Code:
sub EVENT_SAY {
	if ($text=~/hail/i and !$entity->GetEntityVariable("master"))
	{
		$entity->SetEntityVariable("master", $charid);
		quest::say("I'm with you $name and following.");
		quest::follow($userid);		
    }
	elsif ($text=~/leave/i and $entity->GetEntityVariable("master") == $charid)
	{
		quest::say("Fine $name!  Be all alone in your travels...");
		$entity->SetEntityVariable("master", 0); # just in case it doesnt poof i guess
		quest::depop();
	}
}
Hey Almusious, I just got around to testing this out, this morning. I couldn't get any response out of the NPC with it.

The initial hail>follow script will serve it's purpose, but thinking ahead, would open up an exploit with conflicting players.

Could end up with 2 players (or more) spamming the npc with "Hail's" to steal it away. Would be funny to watch, lol
Reply With Quote