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();
}
}