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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 02-19-2015, 04:37 PM
Bohbo
Hill Giant
 
Join Date: Dec 2012
Posts: 116
Default Removing Spawns from a specific zone based on npc_types criteria (Advice - Not crit)

I wanted to do some zone cleanups of certain mobs.

I was trying to come up with an elegant way of dealing with it. My question is about my method and what I need to delete and what should be left behind.

Code:
SELECT * 
FROM spawn2
JOIN spawngroup ON spawngroup.id = spawn2.spawngroupID 
JOIN spawnentry ON spawngroup.id = spawnentry.spawngroupID
JOIN npc_types ON spawnentry.npcID = npc_types.id
WHERE spawn2.zone LIKE 'gfaydark' AND npc_types.name LIKE '%bat%'
Give me all the spawn2 locations I want and i can do the same for spawnentries (not sure how to combine the two).

Code:
SELECT * 
FROM spawnentry
JOIN npc_types ON spawnentry.npcID = npc_types.id
JOIN spawngroup ON spawnentry.spawngroupID = spawngroup.id
JOIN spawn2 ON spawn2.spawngroupID = spawngroup.id
WHERE spawn2.zone LIKE 'gfaydark' AND npc_types.name LIKE '%bat%'
I can do the same for spawngroupid. My quest has to do with what exactly should i delete just the spawn2 and the spawnentry? The spawngroup COULD include other animals or named is there a way to account for that? Like combine the two statements above, change select * to delete and then check to see if the spawngroupid is shared and if not delete it? I am not sure the best way to bulk remove spawns meeting a certain criteria on the npc_types table.
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 03:33 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