EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Mass assigning loot by name or zone, not by level. (https://www.eqemulator.org/forums/showthread.php?t=34626)

Burningsoul 12-15-2011 02:08 AM

Mass assigning loot by name or zone, not by level.
 
I'd like to mass-assign loot to npcs, based on the zone they reside in, or by a crafty name wildcard, like "name NOT like 'a_%'".

Problem is, I rely on GeorgeS' d2loot tool for any lootdrop modifications, but I can only assign lootdrops based on level range with that tool, I need a bit more customization in the search and assigning.

I can comfortably mass-edit the items table by hand to change stats/reqlevels/augslots and the like, so I know this should just be a simple query that can then be adapted to fit my needs, I'm just not sure the best way to go about this.

Anyone have any insight? I've been banging my head against the keyboard for a few days now looking for a correlation in any field from spawn2. npc_types, spawngroup, and spawnentry. I (roughly) see how they're linked, but I can't figure out the proper syntax for a query that uses more than one table. Any help as always, is greatly appreciated.

blackdragonsdg 12-15-2011 02:37 AM

You can mass assign loottables by zone using the following as long as the npc's follow the default numbering scheme.

This will set all npc's loottable_id in Plane of Knowledge(202) equal to X. The default starting point for npcid numbers is zoneidnumber * 1000. Generally the last npcid for any zone is ((zoneidnumber * 1000) +999).

Code:

update npc_types set loottable_id = X where id >= 202000 and id <= 202999;
There are probably other ways or even better ways to do this but I can't think of any atm.

Burningsoul 12-15-2011 08:05 PM

Thank you so much, that's exactly what I needed! Shame I didn't notice the npcid and zoneid correlation :\


All times are GMT -4. The time now is 03:05 PM.

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