Well first we go to Entities.cs,
when your done with that search for this
Code:
if (Name == "Guard")
Code:
{ if (Other.ChanceSuccess(100)) { string Item = "721020-0-0-0-0-0"; DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops); World.ItemDrops(item); } }
So for those "noobs" out there lol your probably wondering with the five "0"'s are after 721020.
They represent the stats of the item, usually used for gear.
the five zeros represent plus of the item, bless of the item, enchantment of the item, and the last two zeros are the gem's.
So back to the topic, this is the code you are gonna use to make a mob drop a certain item.
Code:
if (Name == "MOBNAME") { if (Other.ChanceSuccess(NUMBER CHANCE THE ITEM HAS TO DROP)) { string Item = "ITEMID-PLUS-BLESS-ENCHANTMENT-GEMID-GEMID"; DroppedItem item = DroppedItems.DropItem(Item, (uint)(PosX - General.Rand.Next(4) + General.Rand.Next(4)), (uint)(PosY - General.Rand.Next(4) + General.Rand.Next(4)), (uint)Map, MoneyDrops); World.ItemDrops(item); } }
If you want the mob to drop more than one item then just look over the code and you'll figure it out.
Hope this helped somebody.
Btw: Wrote this pretty quick so something might be missing.
Just tell me if you see anything wrong.