[Mini-Guide]How to make mobs drop certain items

07/20/2009 05:26 Arcotemple:)#1
Somebody asked me to make a mini-tutorial for making mobs drop certain stuff in LOTF.
Well first we go to Entities.cs,
when your done with that search for this
Code:
                    if (Name == "Guard")
There should be something under that somewhat like this:
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);
                        }
                    }
that right there is the code for Guards to drop Moonbox, Since moonbox code is 71020.
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);
                        }
                    }
That's pretty much how your gonna build mob drops code.
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.
07/20/2009 10:17 UnoAmigos#2
Quote:
Originally Posted by Arcotemple:) View Post
thats spam...

dont post spam

you'll get infractions
Sorry then....i just want to say "Good/Nice"

:D
07/20/2009 10:38 Arcotemple:)#3
Quote:
Originally Posted by UnoAmigos View Post
Sorry then....i just want to say "Good/Nice"

:D
then +k please lol
07/20/2009 10:51 ~RapidBlade~#4
Good guide, kept it nice and simple
07/20/2009 11:04 Arcotemple:)#5
thanks rapid
07/20/2009 13:05 sergen05#6
where said all cods??
07/21/2009 10:09 Arcotemple:)#7
@sergen05
this isnt a release
its a guide
07/23/2009 21:25 Pyro-G#8
Wtf? I can't find anything you wanted us to find....lol

if (Name == "Guard") doesnt exist
if (Other.ChanceSuccess doesnt exist
DroppedItem item = doesnt exist
World.ItemDrops(item); doesnt exist

Why does dumb sh*t like this always happen....

K..there's not even 1 monster name in the file so I don't see how this is going to make certain monsters drop certain things..lol
07/23/2009 22:17 CIRASH#9
pyro your clearly using a different source.
07/26/2009 03:12 Pyro-G#10
I'm using the source Arcotemple provided here [Only registered and activated users can see links. Click Here To Register...]
07/26/2009 03:16 Arcotemple:)#11
lol wow thats my old source
i never used it though
idk much about it
07/26/2009 21:40 Pyro-G#12
It's a good source. Especially for practice.
07/26/2009 23:22 Arcotemple:)#13
lol yeah its a good source
07/27/2009 11:30 DaBigWeasel#14
great guide i used it on my server to make every monster drop dbs lol
07/27/2009 11:49 DaBigWeasel#15
double post ftw