i'm coding mob.cs, to make a monster droping an item so here is the script and tell me wha'ts wrong, because i made the Id of GoldDew [ID:721514]
PHP Code:
else if (MyMath.ChanceSuccess(DropRates.CPBag))
{
if (Char != null)
if (Char.VipLevel >= 3)
{
if (Char.Inventory.Count <= 39)
{
Char.AddItem(721514);
return;
}
}
DI2.Info.ID = 150279;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
else if (MyMath.ChanceSuccess(DropRates.CPBackpack))
if (Loc.Map == 1511)
{
if (Name == "GhostBossL159")
{
if (MyMath.ChanceSuccess(0.5))
{
DI2.Info.ID = 721514;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
}
}
if (Loc.Map == 4021)
{
if (Name == "GhostBoss159")
{
if (MyMath.ChanceSuccess(0.5))
{
DI2.Info.ID = 721514;
DI2.Info.MaxDur = DI2.Info.DBInfo.Durability;
DI2.Info.CurDur = DI2.Info.MaxDur;
}
}
}
but it drop CPBackPack, why, and if the code is wrong, give me the right code or p






