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
  #1  
Old 10-14-2012, 06:10 PM
chrismed0
Sarnak
 
Join Date: Aug 2010
Location: USA
Posts: 75
Default Quest Globals NPCs and Other Zones

Well I don't know how I did it but got off work this morning and played with the qglobals again and could for the life of me get it to work. but I left the server up and went to bed and 6 hours later got up had some coffee and logged on and sure enough it started working....????

I'm happy.

The set up:
Maybe this will help someone out.
I have a boat in OOT and a boat in freporte (I made new grids for each to get rid of the glitches)
When the boat in oot hits a waypoint, the boat in freporte spawns
I have another npc in freporte (Freeport Harbor Authority) that is on a timer of 2 sec that watches for the global that is set by the boat in oot when it hits it's waypoint.

This is the script for the boat in oot (now that it is working will tweak it a little):

Code:
# Waypoint global setting for OOT Sirensbane for freporte
sub EVENT_WAYPOINT_ARRIVE {
    
    if($wp == 3) {
    
        quest::setglobal("shipspawna", 1, 7, "F");
        quest::say("I am here");
    }
}
The quest::say was just for testing/debuging

This is the script for the "Freeport Harbor Authority":
Code:
#freporte global checker/timer for Sirensbane
sub EVENT_SPAWN {

	quest::settimer("spawnship",2);	
}

sub EVENT_TIMER {

	if($timer == "spawnship") {
        if(defined $qglobals{shipspawna} && $qglobals{shipspawna} == 1) {
            quest::shout("it works");
            quest::spawn(10183,30,0,-2213,-80,-67);
            quest::delglobal("shipspawna");
        }
    }
}
Now a few notes. I am using the latest perl x32 and MqSQL 5.5
When, for what ever reason it wasn't working, I had read a few posts relating to some bugs with the delglobal and some other things. There was one where it said in order to reset the global or return it back to " 0 " you had to use this:
Code:
$myglobalname = undef;
That did not work LOL...
I had a continuos stream of boats once the global was set... was very funny

quest::delglobal("myglobalname")

This did work. The global gets set, the boat spawns and the global gets deleted. Watching the boats now to see if it repeats on each round.
OOOO... ok it just did. So it does work and looks like it works well.
Great way to set up NPC spawns triggered in another zone.

I still don't know why it wasn't working this morning but it did this after noon.
Oh and all the related zones I have made them static that way I just don't have boats appearing when the ships aren't in the right spots when people zone into the zone. Something to keep in mind if there is a timing thing involved like these boats.

I think now all I need to do is set up an invis NPC OR add a proximity to the boat at a location in freporte to allow people to be moved to OOT.

Have fun and I hope this helps someone now I finaly figured it out since there wasn't alot of detailed explinations or walk throughs. (don't get me wrong there was alot of information just not a lot of explinations in lamens terms for a noob like me to understand and I'm sure there are a lot of noobs out there that could use the little extra help )

If anyone needs any more details on this and the globals please post I will be more then happy to try to help now I understand it more.
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 04:43 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