Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-21-2007, 10:18 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default Day and Night

Before I lost my server , I was working on a day and night Idea I had mainly for the zone line to SK in LakeRathe. I remember in the old days, when night time came, if you killed the gnolls there, the undead would spawn as would the gnolls during the day.
I managed to find most of what I had lost for that, but at the time I lost my server, I was at a stale-mate.
What I wanted, was for the npc spawn tables for certain mobs be replaced as to spawn or not depending on the night or day status. so I made the npc's, made the sqls, and made a script that would run the sqls every 12 hours (everquest time).
the script;
Code:
while (1) {
`mysql -h192.168.2.100 -ueq -peq -Dax_classic < /home/angelox/sqls/
rathenight.sql 2>&1`;
    sleep 2160;
    `mysql -h192.168.2.100 -ueq -peq -Dax_classic < /home/angelox/sqls/
ratheday.sql 2>&1`;
    sleep 2160;
};
The latter script runs at server startup on a static zone, since zones always boot up at 8:00 am, it would start with the daytime gnolls and by 8:00pm the undead would replace the gnolls


ratheday.sql:
Code:
--- Lake Rathe ---
UPDATE spawn2 set _condition=1 where zone="lakerathe" and spawngroupid=51134;
UPDATE spawn2 set _condition=0 where (spawngroupid>=51000 and spawngroupid<=51008);

--- Kithicor ---
UPDATE spawn2 set _condition=1  where (id >=6037 and id <=6044) or (id >=6182 and id <=6196) or (id >=6095 and id <=6099) or (id >=6012 and id <=6018) or (id >=5994 and id <=5998) or (id >=347154 and id <=347155) or (id >=6102 and id <=6103) or (id >=6107 and id <=6108) or id=6199 or id=6121 or id=6202 or id=6200 or id=6112 or id=6092 or id=347709 or spawngroupid=20089;
UPDATE spawn2 set _condition=0 where spawngroupid=20041 or spawngroupid=20169 or spawngroupid=20039;
UPDATE spawn2 set _condition=0 where spawngroupid=20161 or spawngroupid=20069 or spawngroupid=20018 or spawngroupid=20000 or spawngroupid=20006 or spawngroupid=20031 or spawngroupid=20056 or spawngroupid=20075;
rathenight.sql;
Code:
--- Lake Rathe ---
UPDATE spawn2 set _condition=0 where zone="lakerathe" and spawngroupid=51134;
UPDATE spawn2 set _condition=1 where (spawngroupid>=51000 and spawngroupid<=51008);

--- Kithicor ---
UPDATE spawn2 set _condition=0  where (id >=6037 and id <=6044) or (id >=6182 and id <=6196) or (id >=6095 and id <=6099) or (id >=6012 and id <=6018) or (id >=5994 and id <=5998) or (id >=347154 and id <=347155) or (id >=6102 and id <=6103) or (id >=6107 and id <=6108) or id=6199 or id=6121 or id=6202 or id=6200 or id=6112 or id=6092 or id=347709 or spawngroupid=20089;
UPDATE spawn2 set _condition=1 where spawngroupid=20041 or spawngroupid=20169 or spawngroupid=20039;
UPDATE spawn2 set _condition=1 where spawngroupid=20161 or spawngroupid=20069 or spawngroupid=20018 or spawngroupid=20000 or spawngroupid=20006 or spawngroupid=20031 or spawngroupid=20056 or spawngroupid=20075;
I was so exited, I preped Kithicor also and thought I just needed to figure out how to repop this zone every 12 hours (kithcor undead pop up at night).
Well, I came to realize that: 1- the spawngroups I replace will only appear on a "repop" (if I kill a gnoll with a pc, the gnoll spawns, not the replaced undead). 2- there is no way I know of, that a zone can be repoped unless you do it via GM.
Another way would be to use dynamic zone, but whan you zone to a dynamic, it always starts at 8:00 am and will be out of sync.

Anyways, there are the scripts ( I got frustrated)- I posted an update to my database with the NPC changes, so you can see it works: you can actually set the zone up as static, wait tell night and "repop" the zone, undead will appear. the script loops , so it will always happen.
If anyone has any ideas or knows how to get this working, please post!
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 11:23 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