EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Adding a lootdrop to NPCs in level range? (https://www.eqemulator.org/forums/showthread.php?t=34481)

Baruuk 11-20-2011 04:25 PM

Adding a lootdrop to NPCs in level range?
 
Hi guys - been banging my head on the wall on this one for the last hour. I tried following some examples I found for the defiant drop thread, but didn't have any luck. Here's what I'm trying to do...

I have created a lootdrop_id (a unique one with 5% chance drop and multiplier of 1) with the PEQ Database Editor that contains 4 items that were already in the database. I simply want to assign my new lootdrop_id to ALL npcs in a specific level range (for example lvls 5-19).

I'm guessing I have to add my lootdrop_id to all NPCs level range 5-19's loottable - but I'd like to use a SQL command to do this instead of an editor. It's probably simple - but not exactly sure how to code it.

Would anyone know how the command to insert my lootdrop_id into all mobs lvl 5-19's loottable, thereby allowing players to randomly receive these items while hunting?

Thanks in advance.

Baruuk 11-20-2011 06:14 PM

Found my own answer. My query that I had adapted from the Defiant Armor drops (originally posted by Werebat) was the correct one. However, since I had originally created the lootdrop_id entry on an orc centurian in West commonlands, that entry already existed in a mob's loottable. Thus, when I ran the query below, it gave me an error that it already existed. I realized this after posting and removed the entry from the orc and then executed it again. It worked perfectly and after manually checking mobs lvl 5-19 in various zones, they all have the lootdrop_id in their loottable. I wanted to share the query just in case someone else wishes to accomplish the same thing. It's a regurgitation from others' scripts, but it may prove useful in certain scenarios. Please note my lootdrop_id number (100019) is from my database and would have to be replaced by your specific one. Again, it adds the lootdrop at 10% drop rate.

insert into loottable_entries select distinct loottable_id, 100019, 1, 10 from npc_types where loottable_id > 0 and level between 5 and 19;


All times are GMT -4. The time now is 08:34 PM.

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