View Single Post
  #2  
Old 07-22-2006, 05:53 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

here's a little "fix" to these Pl's;

This eliminates the quest::ChooseRandom numbers that don't really exist, and might be a little more accurate-

Code:
# respawn random mob on a sanctum sentinel death - list favors another sanctum sentinel
# 90% of the time

sub EVENT_DEATH
{
 my $random_result = int(rand(100));
 my $x = $npc->GetX();
 my $y = $npc->GetY();
 my $z = $npc->GetZ(); 
 my $h = $npc->GetHeading();
 my $a = 227097;
 if ($random_result<=10)
  {
  quest::say("Surprise! Time to die, fool!");
  quest::spawn2($a,0,0,$x,$y,$z,$h);
  }
 else
  {
  quest::say("Lord Nadox will avenge me!");
  }
}

# EOF zone: nadox NPC: a_sanctum_sentinel, Captain_Krakskull
Reply With Quote