View Single Post
  #10  
Old 10-24-2018, 06:57 PM
prestanneth
Fire Beetle
 
Join Date: Jul 2015
Posts: 25
Default

Ok here's a simpler version were we grab the npc to port to directly via the id from the database, rather than iterating names.
This is the whole file, make sure to not mess up any braces etc when pasting as perl is picky af.

#were using plugins here to get gender etc as default calls will return integers, this turns it into more meaningful text.
#the moveto is just using the entitys current xyz with a slight offset and the 360 so were facing it.
( think of the heading as a directional circle that has 720 points /degrees as opposed to 360, 360 being a half turn. )


Code:
sub EVENT_COMBAT {
   if($combat_state == 1) {
   quest::say("Time to die $name.");
   }
}

sub EVENT_SAY
{
    if($text=~/hail/i)
		{
		plugin::Whisper("Welcome to Elvandar, Do you wish to " . quest::saylink("attend",1) . " the lady of the trees?");
		}
	if($text=~/attend/i)	
	{
		my $n = $entity_list->GetMobByNpcTypeID(54067);
		$gen = plugin::Gender($client->GetGender());			
		$rac = plugin::Race($client->GetRace());			
		quest::shout( "$name a $gen $rac is heading up to the city!");
		quest::movepc($zoneid, $n->GetX() -2, $n->GetY() -2, $n->GetZ() + 1,$n->GetHeading() - 360); 
	}
}


Try playing a non gm char, to see if it effects client in any way. I've heard of weirdness with clients wont close properly.
But i hear ya with the win 10 thing, there's a lot of posts around with it being the blame for issues.
Reply With Quote