View Single Post
  #11  
Old 11-15-2002, 06:57 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Questor,
The table above just assigns the list of items to drop for a specific spawntype.

| 12417 | 1028 | 1 | 0 | 1 |
| 12417 | 5015 | 1 | 0 | 2 |


the items are stored in the item database, and there is a lootdrop_entries table that assigns a list of items for each mob spawntype (not npc_type, you can have 20 of the same npc_types that are in different spawn groups, so each instance of them will have a seperate loot table.

The change I made is a couple of small fix, the code was freeing the mysql object after the first loop, so you never ended up
with a chance for anything except the first item, and a miscalculation of the rand() value. The rand values as it was originally were coming out obscenely small for me (-xxxxxxxxx), so you always ended up with the 1st item on the loot table.

The other change is to increase/decrease loot drop frequencies.
I originally hardcoded a scaling factor, but thought about it and decided that making it scablable by a database variable was a better option. This way you could tweak it. I see a server that on Christmas day sets it's scaling factor to 10 so everyone gets flooded with most of the drops on the mobs loot table, nice time for a plane raid!

killspree: I don't have VC++ installed on my windows machine right now, but I'll see about throwing it on this weekend and compiling a zone.exe for you.
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote