View Single Post
  #5  
Old 01-13-2015, 11:40 AM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default

Try this I wrote this today for an encounter.

Code:
sub EVENT_SPAWN{
        $x = $npc->GetX();
        $y = $npc->GetY();
		$z = $npc->GetZ();
		#$h = $npc->GetH();
		
	quest::set_proximity($x - 70, $x + 70, $y - 70, $y + 70);
	$zoneid = $npc->GetZoneID();
	quest::setnexthpevent(90);
}


sub EVENT_ENTER {
        my $n = $client->GetName();
        quest::emote("you dare challenge me $n?");
		quest::attack($n);
		quest::movepc($zoneid, $x, $y, $z); #summons player to him on agro

}
Reply With Quote