Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-22-2011, 05:59 PM
Tabasco's Avatar
Tabasco
Discordant
 
Join Date: Sep 2009
Posts: 269
Default

I think the easiest way to randomly drop from the entire table would be to grab a random id from 0 - item max out of the shared item struct and add it at spawn time.

That might even work on a private server, but in practice the table is full of GM and test items that you don't want dropping on a public server.
In fact, the last time I checked I think it was only around 7500 wearable items that naturally drop. (Based on loottable/lootdrop) Everything else is quested, crafted, or not intended for player consumption.
Reply With Quote
  #2  
Old 12-23-2011, 03:57 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

I think the best way to do this would be to add the loot via quest after the mobs spawning using a default.pl file for each zone using

quest::addloot(item_id, charges = 0, equipitem = true)

Lets say you have 6000 items for npc lv 50-60 with ID 1-6000

In default.pl in

Code:
sub EVEN_SPAWN
{
 
my $DropChance = int(rand(99)) + 1;

if ($DropChance == 1)
{
my $Select_Itemid = int(rand(6000))+1;

quest::addloot($Select_Itemid);
}
}

Thats about it chooses a random itemid from 1-6000 and sticks in on there, its much easier to actually add and organize loot via quests then it is tables now a day.

Kayen
GM Storm Haven
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:08 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