- Joined
- Aug 7, 2008
- Messages
- 21
- Reaction score
- 0
Hi all this is my 2nd Guide.. and here I'll teach you how to Put Gems dropping in LOTF Source.
First of all you need Visual Studio 2008 C# Ofc.
Go to entities.cs Press Ctrl+F and find 1060100.
You'll see something like this:
-------------------------------------------------------------------------------------
if (Other.ChanceSuccess(1))
{
string Item = "1060100-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's the code that makes a certain item drops
In this line string Item = "1060100-0-0-0-0-0";
You just have to change the 1060100 to the item you want to drop ID.
But if you want to add more Items to drop and don't delete the others that are dropping already just do this
Copy the code and paste it after one of dropping codes. Make it look like this:
---------------------------------------------------------------------------
if (Other.ChanceSuccess(1))
{
string Item = "1060100-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);
}
if (Other.ChanceSuccess(1))
{
string Item = "1060100-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);
}
------------------------------------------------------------------------------
This is just an example of what it does look like with the others.. You just have to paste 1 after another one and change the ..
string Item = "YOUR ITEM ID HERE-0-0-0-0-0";
And then you can change the drop rate of that item too..
Just change this..
if (Other.ChanceSuccess(1)) <<-- Change the 1 for the rate that you want..
NOTE: Rate 1 it's medium.. 30 it's super hiper mega high. 50 SUPER HIPER MEGA MEGA MEGA HIGH
1 number changes the rate a lot you can use 0.5 ; 2.5
You know.. numbers with . xDD
Not english but i guess this is helping..
Continuing..
After you made this.. Open source with Visual Studio C# and make rebuild Solution and there you have your mobs dropping items!!
----------------------------------------------------------------------------------
Getting a specific mob dropping a specific item:
Do the progress you made before.. just add this before the code.
if (Name == "YOUR MOB NAME HERE! ")
{
And then the code finished will look like this..
-------------------------------------------------------------------------------
if (Name == "MOB NAME HERE")
{
if (Other.ChanceSuccess(2.5))
{
string Item = "1088000-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);
}
I hope i helped.. need help.. post below.
Thanks
First of all you need Visual Studio 2008 C# Ofc.
Go to entities.cs Press Ctrl+F and find 1060100.
You'll see something like this:
-------------------------------------------------------------------------------------
if (Other.ChanceSuccess(1))
{
string Item = "1060100-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's the code that makes a certain item drops
In this line string Item = "1060100-0-0-0-0-0";
You just have to change the 1060100 to the item you want to drop ID.
But if you want to add more Items to drop and don't delete the others that are dropping already just do this
Copy the code and paste it after one of dropping codes. Make it look like this:
---------------------------------------------------------------------------
if (Other.ChanceSuccess(1))
{
string Item = "1060100-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);
}
if (Other.ChanceSuccess(1))
{
string Item = "1060100-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);
}
------------------------------------------------------------------------------
This is just an example of what it does look like with the others.. You just have to paste 1 after another one and change the ..
string Item = "YOUR ITEM ID HERE-0-0-0-0-0";
And then you can change the drop rate of that item too..
Just change this..
if (Other.ChanceSuccess(1)) <<-- Change the 1 for the rate that you want..
NOTE: Rate 1 it's medium.. 30 it's super hiper mega high. 50 SUPER HIPER MEGA MEGA MEGA HIGH
1 number changes the rate a lot you can use 0.5 ; 2.5
You know.. numbers with . xDD
Not english but i guess this is helping..
Continuing..
After you made this.. Open source with Visual Studio C# and make rebuild Solution and there you have your mobs dropping items!!
----------------------------------------------------------------------------------
Getting a specific mob dropping a specific item:
Do the progress you made before.. just add this before the code.
if (Name == "YOUR MOB NAME HERE! ")
{
And then the code finished will look like this..
-------------------------------------------------------------------------------
if (Name == "MOB NAME HERE")
{
if (Other.ChanceSuccess(2.5))
{
string Item = "1088000-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);
}
I hope i helped.. need help.. post below.
Thanks