Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 01-06-2014, 04:33 AM
Havok2all
Sarnak
 
Join Date: May 2011
Posts: 35
Default 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.
Reply With Quote
  #2  
Old 01-08-2014, 08:58 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 187
Default

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.

Last edited by jsr; 01-08-2014 at 09:10 AM.. Reason: edited for clarity
Reply With Quote
  #3  
Old 01-09-2014, 06:28 PM
Nydosa's Avatar
Nydosa
Sarnak
 
Join Date: Jan 2013
Posts: 61
Default

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
Reply With Quote
  #4  
Old 01-10-2014, 04:08 PM
Havok2all
Sarnak
 
Join Date: May 2011
Posts: 35
Default

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.
Reply With Quote
  #5  
Old 01-15-2014, 08:29 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 187
Default

What's the error you get?
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 09:43 AM.


 

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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3