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.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2012, 11:53 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Question Select or Update Query to Adjust Loot Based on Zone?

Evening Ladies and Gents,

I am trying to find a way to edit the drops based on zone, instead of individual mob(s). For example: if I wanted to double the coin drops from lakeofillomen, the only way I can find to do it is manually look up all the mobs in the zone and then hop through a variety of table to get to each mob.

Am I missing something here or is there some table relationship that I am missing?

Currently referencing: http://eqemu.psend.com/schema.html

Thank You in Advance!

-Hate
Reply With Quote
  #2  
Old 03-10-2012, 04:33 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Default

The very poorly constructed query I have come across to do this is:
Code:
update loottable set loottable.mincash = 0, loottable.maxcash = 0, loottable.avgcoin = 0 in (select npc_types.loottable_id from npc_types where id in (select spawnentry.npcID from spawnentry inner join spawn2 on spawnentry.spawngroupID = spawn2.spawngroupID where spawn2.zone = 'ruji'));
However, it is a bit large and seems to possibly cause either infinite loop or simply causes too much recursive nonsense to make it a viable command.

Can anyone else suggest something a bit cleaner?

-Hate
Reply With Quote
  #3  
Old 03-10-2012, 05:34 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Thumbs up Solved

Final, working query:
Code:
UPDATE loottable INNER JOIN npc_types ON loottable.id=npc_types.loottable_id INNER JOIN spawnentry ON npc_types.id=spawnentry.npcID INNER JOIN spawn2 ON spawnentry.spawngroupID=spawn2.spawngroupID SET loottable.mincash = 0, loottable.maxcash = 0, loottable.avgcoin = 0 WHERE spawn2.zone = 'ruji';
-Hate
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 04:22 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3