Thread: NPC Spawn Issue: Slansin (Erudin Palace)
View Single Post
  #2  
Old 08-26-2012, 05:55 PM
nilbog nilbog is offline
Project Manager

nilbog's Avatar

Join Date: Oct 2009
Posts: 14,598
Default

Fixed, pending update.

In case anyone is curious how quests work, here is how I made this one. If you're reading and can write perl at least as well as I can, then you can write eqemu quests :P


Controller handling initial spawns and signal from $real if killed by other means than potion turn-in.


#nilbog


sub EVENT_SPAWN
{

quest::settimer("slansin",5);
}

my $fake = 23001;
my $real = 1798;
my @slansins = ($fake,$real);

sub EVENT_TIMER
{
if ($timer eq "slansin")
{
$spawnchance = int(rand(100));
quest::stoptimer("slansin");
if ($spawnchance<20)
{
quest::spawn2($fake,0,0,575,683,-13,78);
}
elsif (($spawnchance>=20)&&($spawnchance<100))
{
quest::spawn2($real,0,0,575,683,-13,78);
}
}
}

sub EVENT_SIGNAL
{
foreach $slansin (@slansins)
{
if ($entity_list->GetMobByNpcTypeID($slansin))
{
return 1;
}
}
quest::settimer("slansin", 7200);
}

Pasting this screwed up the formatting; oh wells.