i would like to get it like original CO's so I can know
so plz help me to set it up !
the drop of mets is to big and items is to small and I have no more ideas what to do !
Code:
public bool GetDamage(uint Damage)
{
if (CurHP > Damage)
{
CurHP -= Damage;
return false;
}
else
{
CurHP = 0;
Alive = false;
Revive = false;
uint MoneyDrops = 0;
if (Other.ChanceSuccess(20))
{
int DropTimes = 1;
if (Other.ChanceSuccess(20))
{
DropTimes = General.Rand.Next(1, 6);
}
for (int i = 0; i < DropTimes; i++)
{
MoneyDrops = (uint)General.Rand.Next(1, 10);
if (Other.ChanceSuccess(10))
MoneyDrops = (uint)General.Rand.Next(30, 500);
if (Other.ChanceSuccess(20))
MoneyDrops = (uint)General.Rand.Next(100, 1000);
if (Other.ChanceSuccess(15))
MoneyDrops = (uint)General.Rand.Next(500, 5000);
if (Other.ChanceSuccess(10))
MoneyDrops = (uint)General.Rand.Next(1000, 15000);
MoneyDrops = MoneyDrops / (136 - (uint)Level) * 10;
if (MoneyDrops < 1)
MoneyDrops = 1;
string Item = "";
if (MoneyDrops < 100)
Item = "1090010-0-0-0-0-0";
else if (MoneyDrops < 1000)
Item = "1090020-0-0-0-0-0";
else if (MoneyDrops < 3000)
Item = "1091000-0-0-0-0-0";
else if (MoneyDrops < 10000)
Item = "1091010-0-0-0-0-0";
else
Item = "1091020-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);
}
}
else
{
if (Map == 1043)
{
if (Other.ChanceSuccess(10))
{
string Item = "721010-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 (Map == 1044)
{
if (Other.ChanceSuccess(10))
{
string Item = "721011-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 (Map == 1045)
{
if (Other.ChanceSuccess(10))
{
string Item = "721012-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 (Map == 1046)
{
if (Other.ChanceSuccess(10))
{
string Item = "721013-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 (Map == 1047)
{
if (Other.ChanceSuccess(10))
{
string Item = "721014-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 (Map == 1048)
{
if (Other.ChanceSuccess(10))
{
string Item = "721015-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 (Map != 1043 && Map != 1044 && Map != 1045 && Map != 1046 && Map != 1047 && Map != 1048 && Map != 1049)
{
if (Other.ChanceSuccess(0.1))
{
string Item = "1060101-0-0-0-0-0"; //FireOF Hell
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(0.05))//Gemai
{
string Item = "700011-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(0.05))
{
string Item = "700021-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(0.05))
{
string Item = "700031-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(0.05))
{
string Item = "700041-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(0.05))
{
string Item = "700051-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(0.05))
{
string Item = "700061-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(0.05))
{
string Item = "700001-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(0.1))
{
string Item = "1060100-0-0-0-0-0"; //BombScroll
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(4) || BossMob && Other.ChanceSuccess(25))
{
byte Repeat = 1;
if (BossMob && Other.ChanceSuccess(0))
Repeat = 2;
if (BossMob && Other.ChanceSuccess(0))
Repeat = 3;
if (BossMob && Other.ChanceSuccess(0))
Repeat = 4;
if (BossMob && Other.ChanceSuccess(0))
Repeat = 5;
for (int i = 0; i < Repeat; i++)
{
string Item = "1088001-0-0-0-0-0"; //Meteor
if (Other.ChanceSuccess(0) || BossMob)
Item = "1088000-0-0-0-0-0"; //DragonBall
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 (Name == "UndeadSpearman")
{
string Item = "723085-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) || BossMob && Other.ChanceSuccess(2)) ;
}
if (SpecialMob && Other.ChanceSuccess(0.04))
{
string Item = "1088001-0-0-0-0-0"; //Metas
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 (SpecialMob && Other.ChanceSuccess(0.03))
{
string Item = "1088000-0-0-0-0-0"; //DragonBall
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 (SpecialMob && Other.ChanceSuccess(2))
{
string Item = "721537-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(0.05))
{
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);
}
if (SpecialMob2 && Other.ChanceSuccess(2))
{
string Item = "721538-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 (SpecialMob3 && Other.ChanceSuccess(2))
{
string Item = "721539-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(0.1) || BossMob && Other.ChanceSuccess(2))
{
string Item = "730001-1-0-0-0-0";
if (Other.ChanceSuccess(1) || BossMob && Other.ChanceSuccess(2))
Item = "730002-2-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(40))
{
byte Quality = (byte)General.Rand.Next(3, 6);
byte Soc1 = 0;
byte Soc2 = 0;
byte Bless = 0;
byte IsPlus = 0;
if (Other.ChanceSuccess(2))
IsPlus = 1;
if (Other.ChanceSuccess(10))
Quality = 6;
if (Other.ChanceSuccess(7))
Quality = 7;
if (Other.ChanceSuccess(3))
Quality = 8;
if (Other.ChanceSuccess(2) || BossMob && Other.ChanceSuccess(5))
Quality = 9;
uint ItemId = Other.GenerateEquip((byte)Level, Quality);
if (Other.ItemType(ItemId) == 4 || Other.ItemType(ItemId) == 5)
{
if (Other.ChanceSuccess(50) || BossMob && Other.ChanceSuccess(80))
{
Soc1 = 255;
if (Other.ChanceSuccess(15) || BossMob && Other.ChanceSuccess(30))
Soc2 = 255;
}
}
if (Other.ChanceSuccess(5) || BossMob && Other.ChanceSuccess(15))
Bless = (byte)General.Rand.Next(1, 8);
if (Other.ChanceSuccess(5))
{
if (ItemId != 0)
{
string Item = ItemId.ToString() + "-" + IsPlus.ToString() + "-" + Bless.ToString() + "-0-" + Soc1.ToString() + "-" + Soc2.ToString();
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, 0);
World.ItemDrops(item);
}
}
}
}
}
return true;
}
}






