Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Completed

Quests::Completed This is where Completed quests are.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2006, 04:13 PM
JrFaust
Sarnak
 
Join Date: Aug 2005
Location: Overthere
Posts: 82
Post Mini Inny spawn

This is my first attempt at perl let alone a quest but I worked out the bugs, I believe this is the way the spawn should work. Please let me know if there was a better way and/or if I made any mistakes.

This is the apprentice code.

Code:
# nadox
# a_Luggald_High_Priest.pl
# a_luggald_apprentice.pl
# respawn named mob on a #Garodizan_Razorfin (227113) death
# Enestox, Angelox
# The High Priest (227081) will spawn Innoruuk (186107) 30 seconds after
# all four luggald apprentices (227089) are dead if the ceremony doesn't end.
# The timer kills the ceremony at 10 minutes from the first kill.
# The 10 minute timer also is the repop time of the apprentices.
# JrFaust

sub EVENT_ATTACK {
 quest::signalwith(227081,1,0);
}
   
sub EVENT_DEATH{
 quest::signalwith(227081,2,30);
 my $random_result = int(rand(100));
 my $a = 227113;#Garodizan_Razorfin
 my $x = $npc->GetX();
 my $y = $npc->GetY();
 my $z = $npc->GetZ(); 
 my $h = $npc->GetHeading();
 if (($random_result<=5) && ($grums==2)){
  quest::spawn2($a,1,0,$x,$y,$z,$h);
  quest::delglobal("razo");
  quest::setglobal("razo","3","3","F");
  $razo=undef;
  }else{
  #do nothing 
 }
}

# EOF zone: nadox NPCs:#Garodizan_Razorfin (227113)
And this is the High Priest code.

Code:
# nadox
# a_luggald_apprentice.pl
# a_Luggald_High_Priest.pl
# respawn named mob on a #Garodizan_Razorfin (227113) death
# Enestox, Angelox
# The High Priest (227081) will spawn Innoruuk (186107) 30 seconds after
# all four luggald apprentices (227089) are dead if the ceremony doesn't end.
# The timer kills the ceremony at 10 minutes from the first kill.
# The 10 minute timer also is the repop time of the apprentices.
# JrFaust

my $counter;

sub EVENT_SPAWN {
  $counter = 0;
}

sub EVENT_SIGNAL {
  $counter += 1;
  if ($signal == 1){
    if ($counter == 1){
      quest::say("And the ceremony begins.");
    }
  }
  if ($signal == 2){
    quest::settimer("ceremony",600);
    if ($counter == 8){
      quest::say("Innoruuk protect us!");
      quest::settimer("inny",30);
      quest::stoptimer("ceremony");
      $counter = 0;
    }
   }
}

sub EVENT_TIMER{
  if ($timername == "ceremony"){
    quest::stoptimer("ceremony");
    $counter = 0;
  }
  if ($timername == "inny"){
    quest::stoptimer("inny");
    quest::unique_spawn(186107,0,0,1714.00,669.00,-87.00);
  }
}
   
sub EVENT_DEATH{
 my $random_result = int(rand(100));
 my $a = 227113;#Garodizan_Razorfin
 my $x = $npc->GetX();
 my $y = $npc->GetY();
 my $z = $npc->GetZ(); 
 my $h = $npc->GetHeading();
 if (($random_result<=5) && ($grums==2)){
  quest::spawn2($a,1,0,$x,$y,$z,$h);
  quest::delglobal("razo");
  quest::setglobal("razo","3","3","F");
  $razo=undef;
  }else{
  #do nothing 
 }
 quest::stoptimer("ceremony");
}

# EOF zone: nadox NPCs:#Garodizan_Razorfin (227113)
Reply With Quote
  #2  
Old 10-19-2006, 01:17 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

This is very nice, have you tested it yet?
Reply With Quote
  #3  
Old 10-19-2006, 03:23 AM
JrFaust
Sarnak
 
Join Date: Aug 2005
Location: Overthere
Posts: 82
Default

Yeah might have been why it took me a week to get it running, I like to know that every part is working the way I expect. That and it took a bit to verify how the different parts of the spawn worked. But I do have it running on my server so far every thing I could think of works.

There are two parts I couldn't verify one ceremony end part, I don't know if there's a time out on live or not, I just put that in there so that it would end if you didn't kill all four apprentice before they repop and so others couldn't walk into a partal quest. The other is if Inny despawns.
Reply With Quote
  #4  
Old 10-21-2006, 05:12 PM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

what is the "$grums == 2" stuff about? I dont see any way for that variable to be set...
Reply With Quote
  #5  
Old 10-22-2006, 01:44 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by fathernitwit
what is the "$grums == 2" stuff about? I dont see any way for that variable to be set...
this is to insure we don't get two Garodizan_Razorfin's spawned at the same time. The PL will still work, but it's not not right; should be;
Code:
if (($random_result<=5) && ($razo==2)){
That way if both conditions are met, Garodizan_Razorfin will spawn.

and $razo should go to three untill he dies;

Code:
sub EVENT_DEATH{
 quest::delglobal("razo");
 quest::setglobal("razo","2","3","F");
 $razo=undef;
  };
# EOF zone: nadox NPCs:#Garodizan_Razorfin (227113)
Probably my mistake, as he used part of my script for his.
And it IS my mistake, as I see where i did this many times ( I was copy-pasting to hurry and didn't make the changes).
I have to go back and fix them all

EDIT:
I fixed all the PL's for Nadox and posted - remember one thing though, you should have a system for checking and or reseting the globals, in case you reboot your server and the some of these mobs are still up. If you haven't read this yet, here's what I do;
http://blackwater/~angelox/#link2

Last edited by Angelox; 10-22-2006 at 10:22 AM..
Reply With Quote
  #6  
Old 10-22-2006, 08:38 AM
JrFaust
Sarnak
 
Join Date: Aug 2005
Location: Overthere
Posts: 82
Default

Oops I didn't catch that, but to tell the truth I just made sure that it was there since it was in all the other Nadox .PL files.

Nice catch.
I'll remember to look closer at all the code next time.
Reply With Quote
Reply


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 02:34 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3