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
  #6  
Old 08-01-2009, 09:50 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,498
Default My Example

Create an NPC (we'll say Wanderer) with whatever stats you want, but enable qglobals.
In spawn2 table, set a spawn at 100% at the zone-in location from the previous zones (each of which, we'll call 1, 2, and 3). For example, zone2 spawn point would be where Wanderer would have zoned in from zone1. Zone3 spawn would be from the zone line of zone2, and zone1 would be from the zone line of zone3.
Create waypoints (we'll say id of 100) in our zones. Use full pause and ensure that the last waypoint has a decent pause time for the x/y check.

All 3 script files will look almost identical. Items in red will be the difference between the files. The first one is the starting zone.

quests\1\Wanderer.pl
Code:
my $ZoneOutX = 1111;
my $ZoneOutY = 1111;

sub EVENT_SPAWN {
  if (!defined($qglobals{Wanderer}) {
    quest::setglobal("Wanderer",1,7,"F");
  }
  if (defined($qglobals{Wanderer}) && ($qglobals{Wanderer} == 1)) {
    quest::start(100);
  }
  else {
    depop();
  }
}

sub EVENT_DEATH {
  quest::delglobal("Wanderer");
}

sub EVENT_WAYPOINT {
  if (($x == $ZoneOutX) && ($y == $ZoneOutY)) {
    quest::stop();
    quest::setglobal("Wanderer",2,7,"F");
    quest::depop();
  }
}
quests\2\Wanderer.pl
Code:
my $ZoneOutX = 2222;
my $ZoneOutY = 2222;

sub EVENT_SPAWN {
  if (defined($qglobals{Wanderer}) && ($qglobals{Wanderer} == 2)) {
    quest::start(100);
  }
  else {
    depop();
  }
}

sub EVENT_DEATH {
  quest::delglobal("Wanderer");
}

sub EVENT_WAYPOINT {
  if (($x == $ZoneOutX) && ($y == $ZoneOutY)) {
    quest::stop();
    quest::setglobal("Wanderer",3,7,"F");
    quest::depop();
  }
}
quests\3\Wanderer.pl
Code:
my $ZoneOutX = 3333;
my $ZoneOutY = 3333;

sub EVENT_SPAWN {
  if (defined($qglobals{Wanderer}) && ($qglobals{Wanderer} == 3)) {
    quest::start(100);
  }
  else {
    depop();
  }
}

sub EVENT_DEATH {
  quest::delglobal("Wanderer");
}

sub EVENT_WAYPOINT {
  if (($x == $ZoneOutX) && ($y == $ZoneOutY)) {
    quest::stop();
    quest::setglobal("Wanderer",1,7,"F");
    quest::depop();
  }
}
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 02:18 AM.


 

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