Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #16  
Old 06-27-2008, 02:56 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

what about gottime? should I leave as original, Knightly, or your change?
Reply With Quote
  #17  
Old 06-27-2008, 03:04 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Angelox View Post
what about gottime? should I leave as original, Knightly, or your change?
I don't understand why you get different results with Knightly's change or mine, on the face of it they should have the same effect.

I was more interested in why the statics had a different time than dynamics. My 'gottime fix' seems the more 'correct' one to me, but you can try with either.
Reply With Quote
  #18  
Old 06-27-2008, 03:17 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by Derision View Post
I don't understand why you get different results with Knightly's change or mine, on the face of it they should have the same effect.

I was more interested in why the statics had a different time than dynamics. My 'gottime fix' seems the more 'correct' one to me, but you can try with either.
O well, I already compiled with your "zone->GetTimeSync();" fix and knightlys - I was just wanting to have it the way you wanted it.
BtW, it's working fine, all zones Sync together, static and dynamic. I'll watch it for a while and see i f it stays.
If so, what is "gottime" needed for? seems your insert will render gottime useless?
Reply With Quote
  #19  
Old 06-27-2008, 03:24 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Angelox View Post
If so, what is "gottime" needed for? seems your insert will render gottime useless?
It appears that whoever wrote the code meant the 'gottime' flag to mean that the zone had already synced it's time and didn't need to go to the trouble of sending another TimeSync request packet to world to sync again.

Since GetTimeSync is only called once during zone bootup, it doesn't seem to serve any purpose at present.
Reply With Quote
  #20  
Old 06-27-2008, 03:50 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Well, this fix you made is working - best fix I've seen yet, MUCH better now.
I was just looking at a few old things I did - believe it or not, I hadn't looked at this time thing since I first came out with my "day and night" logic (from a dummies' point of view), sort of got burnt out on it. And now I'm out of work again and at home, so I'm back to learning all this.
Maybe you can find time to make a diff (probably quote out, the "gottime" entries ), see if the Devs can put it in.
Reply With Quote
  #21  
Old 06-30-2008, 03:02 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Here's what I was able to come up with using Knightly's '$zonetime' and Derision's 'zone->GetTimeSync();' fix.
This is the most effective and less intrusive way to spawn the day/night NPCs. This originally was Qadar's idea (use EVENT_WAYPOINT), while we were working on the boat system, I just ported it over to the day/night spawns.
You need one npc, preferably invisible , untrackable, etc. and you need to assign him two waypoints at the same spawnpoint. Example: Lets say I spawned my LakeRathe NPC at 0,0,0 (X,Y,Z); I then make two more grid/waypoints at the same 0,0,0 ( no need to make it move around, it will still move from WP to WP), and give each WP a pausetime of 45. Then comes the script, which I see is different from Knightlys, but probably arrives at the same conclusion , if you just change EVENT_ENTER or EXIT to EVENT_WAYPOINT.
Code:
#lakerathe night and day spawns
#Angelox

sub EVENT_WAYPOINT{
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::spawn_condition(lakerathe, 2,0);      #live are 2
	quest::spawn_condition(lakerathe, 1,1);}     #undead are 1
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::spawn_condition(lakerathe, 2,0);      #live are 2
	quest::spawn_condition(lakerathe, 1,1);}     #undead are 1
else{		#daytime
	quest::spawn_condition(lakerathe,2,1);
	quest::spawn_condition(lakerathe,1,0);}}
## End spawn Script
Now, the only way this truly works is if you follow Derisions simple instructions for the 'zone->GetTimeSync();' fix, and add the insert - once the insert is in, there will be no need for time syncs, timers, or anything else. All zones will have the same time exactly: static or dynamic. The only thing I saw was, my server will start up at 4:00am instead of the original 8:00am (EQ Time), which is no big deal because it continues on to cycle the 24 hours in all zones.
Here's a pointer on using EVENT_WAYPOINT (Something we figured out while doing the boat work); Although the zone may be static, Perl scripts will not work, unless a PC is there (in the zone) too - This was a big problem with the boats, but solved.
Now that I think of it, I see where I can throw in an EVENT_SPAWN to the above script and that will easily fix any waypoint delays when you first zone in.
This will be the next script to try out;
Code:
#lakerathe night and day spawns
#Angelox
sub EVENT_SPAWN{
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::spawn_condition(lakerathe, 2,0);      #live are 2
	quest::spawn_condition(lakerathe, 1,1);}     #undead are 1
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::spawn_condition(lakerathe, 2,0);      #live are 2
	quest::spawn_condition(lakerathe, 1,1);}     #undead are 1
else{		#daytime
	quest::spawn_condition(lakerathe,2,1);
	quest::spawn_condition(lakerathe,1,0);}}

sub EVENT_WAYPOINT{
if (($zonetime >= 0)&&($zonetime <= 800)){           #nighttime
	quest::spawn_condition(lakerathe, 2,0);      #live are 2
	quest::spawn_condition(lakerathe, 1,1);}     #undead are 1
elsif (($zonetime >= 2000)&&($zonetime <= 2359)){    #nighttime
	quest::spawn_condition(lakerathe, 2,0);      #live are 2
	quest::spawn_condition(lakerathe, 1,1);}     #undead are 1
else{		#daytime
	quest::spawn_condition(lakerathe,2,1);
	quest::spawn_condition(lakerathe,1,0);}}
## End spawn Script
EVENT_SPAWN will instantly set the right spawn when you Zone in, and EVENT_WAYPOINT will keep checks on what mob should be up.

If you use the same NPC i placed for day/night, you only need but one of these spawns attached to the above PL per zone, so you can delete all the other ones, where I used proximity - this should be easy, as I always 'hand spawn' my NPCs under the same spawngroup. In places like Kithicor and Commons, I had put in numerous spawns.
Reply With Quote
Reply


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 06:31 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3