Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-12-2020, 03:48 PM
Thalix's Avatar
Thalix
Sarnak
 
Join Date: Sep 2016
Posts: 91
Default

The whole thing is database-driven. There is a table npc_types which defines the NPC, their level, race, strength, etc. And there is a table spawn2 that defines where, with what probability the NPCs from npc_types spawn.

With the following SQL query you can see how the tables are linked and how to query which NPC spawns in a zone.
Code:
SET @myZone = NULL;
SET @myNpcName = NULL;
SET @myNpcID = NULL; 

SET @myZone = 'misty';


SELECT   nt.id as npcID, nt.name, nt.level, nt.hp, s2.respawntime, 
         s2.spawngroupID as spawngorupID, s2.pathgrid, s2.zone, s2.x, s2.y, s2.z
FROM     npc_types nt 
         LEFT JOIN spawnentry se ON se.npcID = nt.id 
         LEFT JOIN spawngroup sg ON se.spawngroupID = sg.id 
         LEFT JOIN spawn2 s2 ON s2.spawngroupID = sg.id 
WHERE    (s2.zone = @myZone OR @myZone IS NULL)
         AND (nt.name LIKE @myNpcName OR @myNpcName IS NULL)
         AND (nt.id = @myNpcID OR @myNpcID IS NULL)        
GROUP BY name, level ,respawntime  
ORDER BY name, level, respawntime ASC
LIMIT    500;
Because of your request: you probably want to shorten the respawn time of the spiders in Misty.

You can find all of the very extensive and complex C++ code at GitHub:
https://github.com/EQEmu/Server

The code which handles spawning can be found here:
https://github.com/EQEmu/Server/blob...one/spawn2.cpp

You can get even more information yourself from the project's GitBook. Everything is well documented there:
https://eqemu.gitbook.io/server/

Have fun in the wonderful (and incredibly complex) world of EQEmu
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 05:55 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