EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Quest for teleports? (https://www.eqemulator.org/forums/showthread.php?t=23546)

leslamarch 08-27-2007 02:09 AM

Quest for teleports?
 
Hello all,
I have a question, i have been looking for an example quest where you walk by an npc and it ports the player to xyz. I'm sure its here just not sure what to search under, so basically i want to use it to change the zone connections. *example* when a player is headed to blackburrow instead of going to blackburrow they would go Sakrateri new awesome zones. I hope this makes sense as to what i'm asking. any help would be greatly appreciated
Thanks so Much
~LL~

Sakrateri 08-27-2007 02:16 AM

Heres one I was using in Nexus to teleport people to nektropos..

Code:

sub EVENT_SAY{
if($text=~/hail/i){
quest::say("Hello there $name !!! would you like to travel to the enchanting land of [Nektropos] ?.");
}

if($text=~/nektropos/i){
quest::say("And Away You Go");
quest::movepc(28,0,0,0)}
}

that what you mean? if so you can just replace the zone IDs and cords for other zones

leslamarch 08-27-2007 02:40 AM

Quote:

Originally Posted by Sakrateri (Post 137514)
Heres one I was using in Nexus to teleport people to nektropos..

Code:

sub EVENT_SAY{
if($text=~/hail/i){
quest::say("Hello there $name !!! would you like to travel to the enchanting land of [Nektropos] ?.");
}

if($text=~/nektropos/i){
quest::say("And Away You Go");
quest::movepc(28,0,0,0)}
}

that what you mean? if so you can just replace the zone IDs and cords for other zones

Ok this works Great!! one other question is there a way to do this with out any pc to npc interaction?
Thanks again Sakrateri for everything
~LL~

DarkGothic 08-27-2007 03:30 AM

You can also change the zone line in your DB under zone connection, were I set up my zones. you have to get the loc. and zone ID.

leslamarch 08-27-2007 05:09 AM

ok i found i think what i'm trying to do, Its similar to what Angelox did with ships.
But when i copy and paste his proximity quest and name it after an npc there it does nothing? this is the one I used from his quest

Code:

# Zone to Timorous event
# Zone: Oasis
# AngeloX

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

sub EVENT_ENTER
{
        quest::movepc(96,3335.5,7121.4,-5.5);
}

any way i could make this work for my application?
Thanks so Much
~LL~

leslamarch 08-27-2007 09:38 AM

Ok got it to work now, was a typo on my part where the zone id and xyz are i used a period instead of a comma. Now i have connected the new zones, works flawless. Thanks for all the info guys, Great group of people in this community.
Thanks
~LL~

narcberry 01-30-2008 05:06 AM

I have 2 questions.
1) After using the movepc function, will the quest keep executing? IE, can 1 quest port someone to nexus, then later port them to pok?
2) What is the best method to move an npc around. Not make them walk to a point, but have them instantly teleport to a position?

ChaosSlayer 01-30-2008 05:58 AM

Quote:

Originally Posted by narcberry (Post 142596)
I have 2 questions.
1) After using the movepc function, will the quest keep executing? IE, can 1 quest port someone to nexus, then later port them to pok?
2) What is the best method to move an npc around. Not make them walk to a point, but have them instantly teleport to a position?

to 1) - not with a proximity detector - since the npc never asks you what you want to do. It is posible with Hail or item turn in request (unless the proximity detector is also set to recognize your class or race, so all human warriors get ported to Qeynos, while all Wood Elves go to Gfay)

sfisque 01-30-2008 06:58 AM

for 1) i'm not sure the quest framework has a "delay" mechanism. what you could try to do is have an npc at the first destination that triggers (via proximity, hail, flag, etc.) and sends the player to the followup destination. maybe issue an enhancement bug for adding a "quest::delay" method if it such a mechanism doesnt exist. if it does, maybe one of the quest guru's could chime in and give some light on it.

== sfisque

narcberry 01-30-2008 08:49 AM

Tested several things to no success. I'm making a new topic specifically for the delay mechanism.

Striat 02-21-2008 10:30 PM

Quote:

Originally Posted by narcberry (Post 142596)
I have 2 questions.
1) After using the movepc function, will the quest keep executing? IE, can 1 quest port someone to nexus, then later port them to pok?
2) What is the best method to move an npc around. Not make them walk to a point, but have them instantly teleport to a position?

A little later, but here is somethhing I used for teleporting npcs around. This is an old script that can definitely be written much much better now. Nevertheless, it still gets the job done. You'll want to notice the stuns in there. This was used because npcs would move a little as soon as they were moved. So, it gives time to update. Another alternative to use the stuns is to set npc's run speed very very low if possible. Either will do the trick, but of course you may need to keep run speed up.

Code:

my $location = 0;                #startingpoint

sub EVENT_SPAWN {
        $location = 0;
}

sub EVENT_SAY {
if($text=~/Hail/i){
        if ($location == 1) {                #I'm at my new destination
        quest::say("You want me to leave this mansion?  bummer!");
        quest::settimer("moveme",1);
        }
        else {                                #I'm at my starting point
        quest::say("I am not too happy with my hut");
        quest::settimer("moveme",1);
        }
    }
  }

sub EVENT_TIMER {
if ($timer eq "moveme") {                #This timer is used for moving.  It triggers updateguard
        quest::stoptimer("moveme");
        quest::settimer("updateguard",1);
        if ($location == 1) {        #I call this when I need to go back to starting location
        $npc->Gate();
        $npc->Stun(2000);
        $location = 0;
        }
        else {                #I call for this when I'm leaving my original spot
        $npc->SendTo(260, 353, 0);
        $npc->Stun(2000);
        $location = 1;
        }
  }
if ($timer eq "updateguard") {        #I call this to update guard spot
        quest::stoptimer("updateguard");
        $npc->SaveGuardSpot(0);
  }
}



All times are GMT -4. The time now is 09:34 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.