EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Waypoints are hit and miss (https://www.eqemulator.org/forums/showthread.php?t=31088)

mixxit 04-18-2010 09:41 PM

Waypoints are hit and miss
 
I don't understand why this is happening but things I need to rely on are just not happening all the time and it screws up a system of events that rely on a waypoint being triggered.

I echo'd the npc's waypoints to see what was going on and most of the time it's fine but occasionally it will echo a set of waypoints like 1 2 4 completely ignoring point 3!

Now when I need to depop on point 3 this can become a disaster!

Why is this happening?

joligario 04-19-2010 07:16 AM

Check your grid pause time. Might be possible your timing is off. To test waypoints out, in your NPC's script file try this:

Code:

sub EVENT_WAYPOINT_ARRIVE {
  quest::shout("I have arrived at Waypoint $wp.");
}

sub EVENT_WAYPOINT_DEPART {
  quest::shot("I am departing Waypoint $wp.");
}

Also, check that your grid numbers are sequential. It is possible that the entries are not in order.

mixxit 04-19-2010 07:49 AM

That's what I mean when echo'ing - it's saying i've reached 1, 2 then 4!

The pause is set to a variety of values from 0 to 200. 0 is ok isn't it?

joligario 04-19-2010 09:14 AM

Did you check the grid numbers in the database to ensure there is a 3 on that grid? Is the wander type set to patrol? 0 is fine for the timer, was just saying to check just in case you were trying to stop on a waypoint that was set to 0 or something similar.

mixxit 04-19-2010 09:31 AM

I've set them all to 1 but i'm still having the same issue! Yep i'm using patrol with full waits and am on the latest build of eqemu with perl 5.10.

Must.. fix...this!

mixxit 04-19-2010 09:36 AM

Here's one of the bug ones

Gets to wp 3 fine (which is wp4 i believe in the grid but starts at 0 in perl)

Code:

sub EVENT_WAYPOINT_ARRIVE
{
        quest::say("I have reached waypoint $wp");
        # keep moving till i reach the last waypoint
        if($wp eq 4)
        {
                # Set a qglobal to inform the boat in BB to pop
                quest::say("Setting status 2 as we are at waypoint $wp");
                quest::setglobal("ootboatstatus",2,7,F);
        }
       
        if($wp eq 5)
        {
                # Boat in BB should now be popped, depop me
                quest::say("Depopping as we are at waypoint $wp");
                quest::depop();
        }
}


joligario 04-19-2010 10:07 AM

Wait, I'm confused then. Since the $wp starts at 0, and you are looking for 3rd waypoint, then you should be checking if == 2. Maybe show your grids and explain which waypoint you are interested in and I can help better.

EDIT: You should also use == instead of eq. I think I see what you are saying with 3/4. I just compiled 1395 and it doesn't skip any waypoints...

mixxit 04-19-2010 11:08 AM

Ok i swapped to == and it doesn't make a difference. I expect on this script when the spawn reaches waypoint 5 ($wp == 4) it will record the quest global. then when it reaches waypoint 6 ($wp == 5) it will depop.

At the moment I have that zone as static, i'm in another and I am looking at the quest global table and it has never changed from ootboatstatus '1' to '2' like it should when it his waypoint 5 ($wp == 4).

What's happening!!

mixxit 04-19-2010 11:11 AM

Code:

"gridid","zoneid","number","x","y","z","heading","pause"
62,69,1,11124.2,446.575,-43,0,300
62,69,2,7583.69,-1344.21,-43,0,1
62,69,3,7445.1,-2111.7,-43,0,100
62,69,4,6250.45,-4585.98,-43,0,1
62,69,5,-9858.39,-4646.89,-43,0,300 - Should set QuestGlobal to 2 here
62,69,6,-10981.2,-4932.77,-20.0084,0,1 - Should depop here


joligario 04-19-2010 11:19 AM

Couple of last few questions. Is number 1 on your grid list at (or very near) the spawnpoint? Does the boat have qglobals enabled? Try using "F" instead of F? BTW, I wasn't saying that == would fix it, I was just saying that when using that type of condition check, it should be == instead of the string eq.

mixxit 04-19-2010 11:24 AM

Yeah the spawn has qglobals enabled. It's definitely translating the F across because a previous script uses it and I can see it in the table. Number 1 is exactly where the spawn is when it pops.

joligario 04-19-2010 11:39 AM

Does the boat say "setting status 2..." and/or "Depopping..."? Want to post your most up-to-date code you are using?

mixxit 04-19-2010 11:43 AM

It's almost like if I'm not in the static zone with the boat it will not set the qglobal and depop.

Whenever I sit on the 4 hour journey with it across OOT it will happily depop and set the qglobal to 2.

Messed up!

mixxit 04-19-2010 11:48 AM

Eugh!

Quote:

Originally Posted by Angelox (Post 155481)
Keep this in mind: Perl will not activate in any given zone if there are not any PC's there.
I probably started the 'Global Watchers' thing. The best method to have a watcher is via 2 point grid on an NPC (grids need a 3-5 second delay on each), another words, you make an NPC, give him to grid points all on the same spawnpoint (preferably invisible). Now, when you enter the zone, the script will activate and continue executing any changes it spots, with each grid movement (EVENT_WAYPONT).
EVENT_SPAWN works if the zone is not static, and only once , Proximity is nice (EVENT_ENTER), but you have to plant 'watchers' all over the zone ( my old method).
EVENT_WAYPOINT is the way to go. if there's no player in the zone, the scripts need not be active anyway.
I've never tried EVENT_ENTERZONE , but I can tell you without even trying it; EVENT_WAYPOINT is better because the script is checked with each grid movement, so long as there is a player in the zone.
I haven't seen any lag problems with this either.

No wonder it's not working - this is a big problem for me as the boat will never make be able to cycle through butcher or freeport with a player being in all 3 zones.

mixxit 04-19-2010 12:00 PM

Wait a minute.. that can't be right at all because when i'm in OOT and set the qglobal 2 to the boat will spawn fine at the other side. So perl is running in the static zones.

I also can confirm that the static zones can update Qglobals because when OOT first boots up an invisible NPC sets a qglobal to 0 which resets the whole process.

I am seeing qglobal == 1 when i check the table so I know that the loop in OOT is seeing qglobal being 0, spawning the boat which itself sets the qglobal to 1 (i'm on my way to freeport).

What the hell is wrong?!


All times are GMT -4. The time now is 08:36 PM.

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