EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   Assigning loot by level (https://www.eqemulator.org/forums/showthread.php?t=37705)

Havok2all 01-06-2014 04:33 AM

Assigning loot by level
 
I am wondering if there is a command similar to this:

update npc_types set loottable_id = X where id >= 202000 and id <= 202999;

That will add a specific loot table id to NPCs in a certain level range like lvl 1 - 5. I would like for it to add to the existing loot tables and not replace them.

Thanks for any help. Still new to working with dbs.

jsr 01-08-2014 08:58 AM

You can use 'loottable_id between x and y' but I don't think that's what you're after, as it will replace the existing loot table ID's.

There are 3 tables involved:
[NPC_Types] has the NPC info and a key (loottable_id) for the loottable_entries table
[Loottable_entries] holds "list ID's" for one or more items you want an NPC to be able to drop, along with some extra info (e.g. number of items to drop from each list). The list ID is a key (lootdrop_id) for the lootdrop_entries table..
[Lootdrop_entries] holds the item_id's and some extra info

So the process is more like:
1. Create a list of item ID's in [Lootdrop_entries] which you want NPC's to be able to drop, assigning the same lootdrop_id for each item in the list.
2. Add the newly created lootdrop_id to the lootdrop_entries table for each loot table you want to contain these items (in your case, all loot tables for mobs between level 1 and 5)

Once you do step 1, you can complete step 2 by writing a query to update loottable_entries with your new lootdrop_id's.

The query would look something like this (UNTESTED):
Code:

insert into loottable_entries
(loottable_entries.loottable_id,
loottable_entries.lootdrop_id,
loottable_entries.multiplier,
loottable_entries.probability)

select distinct npc_types.loottable_id,[your new loot drop id], 1, 100 from npc_types where npc_types.`level` between 1 and 5

...But it would be much easier to use one of the existing tools to do loot, that way the queries are pre-written and you don't need to worry about making a mistake :) Pretty sure george's npc_loot_editor app has this functionality if the emu operations center doesn't.

Nydosa 01-09-2014 06:28 PM

This isn't what you asked for, but there are some very easy ways to add loot via perl. This link should help, you just need to add the new functions into your server's quest files.

You can easily specify a level range, multiple loot tables with different chances, loot by race #, and also have it be zone or world loot depending on where you put the file.

https://eqemulator.org/forums/showthread.php?p=222009

Havok2all 01-10-2014 04:08 PM

Thanks Nydosa, but all of that info just flew over my head. I am beginner :P

I am trying to get GeorgeS Tools to work, but nothing I have tried has worked. I have my db.ini set up as so:

host=localhost
user=xxxxx
password=xxxxxxxx
database=peq
everquest_folder=C:\EQ

Does the everquest folder need to point to just /EQ or does it need to point to EQEmuServer? Everything is held under /EQ as the walkthrough instructed me.

I ran the OBDC drivers. Does it matter where I run them? Or do they need to be done in a certain folder?

I did the %i command and it stated everything succeeded. Did that register all the OCX files? Or once I get that message I still need to do them seperately afterwards?

Thank you for any assistance.

P.S. I have EoC set up but I understand GeorgeS Tools have a bit more functionality with distributing loot.

jsr 01-15-2014 08:29 AM

What's the error you get?


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

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