Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 12-11-2016, 03:58 PM
Loxo
Fire Beetle
 
Join Date: Jun 2012
Posts: 5
Default

Code:
sub EVENT_SPAWN
{
	$npc->SetAppearance(1);
	my $x = $npc->GetX();
	my $y = $npc->GetY();
	quest::set_proximity($x - 10, $x + 10, $y - 10, $y + 10);
	$x = undef;
	$y = undef;
}

sub EVENT_ENTER 
{
	my $x = $npc->GetX();
	my $y = $npc->GetY();
	$npc->DoAnim(64);
	quest::set_proximity($x - 75, $x + 75, $y - 75, $y + 75);
	quest::follow($userid);
	$x = undef;
	$y = undef;
}

sub EVENT_EXIT 
{
	my $x = $npc->GetX();
	my $y = $npc->GetY();
	quest::set_proximity($x - 10, $x + 10, $y - 10, $y + 10);
	quest::sfollow(); # if we weren't expecting to stop following here we would still use quest::stop(); before sitting.
	quest::doanim(26);
	quest::settimer("sittime", 5);
	$x = undef;
	$y = undef;
}

sub EVENT_TIMER
{
	if ($timer eq "sittime")
	{
		quest::stoptimer("sittime");
		$npc->SetAppearance(1);
	}
}
In Perl this seems to make the npc it's written for sit upon spawning, follow anyone that enters it's proximity, and sit back down and appear to remain seated indefinitely when someone exits. If you've altered the SendAppearance function or any related structs or functions you might need to restore them, I remember trying to alter them also to get this to work, but the stock install seems to work with this script.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:49 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3