EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Database/World Building (https://www.eqemulator.org/forums/forumdisplay.php?f=596)
-   -   Select or Update Query to Adjust Loot Based on Zone? (https://www.eqemulator.org/forums/showthread.php?t=35028)

Hateborne 03-09-2012 11:53 PM

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

Hateborne 03-10-2012 04:33 PM

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

Hateborne 03-10-2012 05:34 PM

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


All times are GMT -4. The time now is 11:15 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.