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

Archive::General Discussion Archive area for General Discussion's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 11-26-2002, 02:28 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Theres 2 different ones..

This ones checks for multiple drop items (like spider silk)

if (RunQuery(query, MakeAnyLenString(&query, "SELECT loottable_id, lootdrop_id, multiplier, probability FROM loottable_entries WHERE loottable_id=%i", loottable_id), errbuf, &result)) {
safe_delete(query);
while ((row = mysql_fetch_row(result))) {
int multiplier = atoi(row[2]);
for (int i = 1; i <= multiplier; i++) {
if ((rand() % 1)*100 < atoi(row[3])) {
AddLootDropToNPC(atoi(row[1]), itemlist);
}
}
}


This one calculates whether a mob has an item on its item chance list..

if (RunQuery(query, MakeAnyLenString(&query, "SELECT lootdrop_id, item_id, item_charges, equip_item, chance FROM lootdrop_entries WHERE lootdrop_id=%i", lootdrop_id), errbuf, &result))
{
delete[] query;
while ((row = mysql_fetch_row(result)))
{
if( (rand()%100) < (atoi(row[4]) * 10) )
{
int32 itemid = atoi(row[1]);
const Item_Struct* dbitem = database.GetItem(itemid);
if (dbitem == 0)
{



The 2nd one is the one to tweak. You get 10 chances on 10 low chance weapons because thats the way the emulator is currently coded. To do it the way you suggest, we'd need to implement it the way quester suggest, put items in to LOOTITEMGROUPS, say a Rusty Weapon group, then roll once on that table for a random item off it. A much better way to do it, but would require changes to the loot tables in the database and a new table for the groups. Not hard to do, just will take some work, its definately the way to go though
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
 


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 11:56 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