Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 01-23-2013, 04:53 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Here's what I'd do.

First, you'd need some way to identify if a player has the quest. If it's a normal quest, you'd use a qglobal. If it's a task, you can just check the task step on the player. Create an invisible NPC, make sure to mark it to check qglobals, and spawn it right in the middle of the trigger area. This NPC will handle the bulk of the work. The script would look similar to this:

Code:
sub EVENT_SPAWN
{
     $x = $npc->GetX();
     $y = $npc->GetY();
     quest::set_proximity($x - 40, $x + 40, $y - 40, $y + 40);
}

sub EVENT_ENTER
{
     if(defined $qglobals{hasquest} && $qglobals{hasquestl} == 1)
     {
          quest::spawn_condition($zonesn,1,1);
     }   
}
Next, Create the NPC-A and 3 guards. Create spawnpoints for each of the 3 guards (but NOT NPC-A), and add them to the same spawngroup. Set their _condition to 1. You'll also need to add an entry to spawn_conditions for the current zone and condition id (which in this case is just 1.) The NPC above will already spawn the guards when a player with the appropriate progress comes near. (You can change the qglobal check for a level check, item check, task step check, etc.) On each of the guards, add the following script:

Code:
sub EVENT_DEATH
{
     my $random_result = int(rand(100));
     if($random_result <= 1)
     {
          quest::unique_spawn(NPC-A_ID,0,0,$x,$y,$z)
     }
}
That will give NPC-A a 1% chance to spawn on the death of one of the guards. You can fiddle with the number if you want, or you can add a $entity_list->GetMobByNpcTypeID($id); if you need all 3 guards to be down before you even roll for NPC-A. Since the spawn_condition has not been toggled off, those guards will continue to spawn over and over, based on their timer set in spawn2.

Last, for the NPC-A create the following script:

Code:
sub EVENT_DEATH
{
     quest::spawn_condition($zonesn,1,0);
}
That will turn the spawn_condition off when he is killed. These are just quick examples, but will do the basic job.

Last edited by cavedude; 01-23-2013 at 05:11 PM..
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 05:58 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