Hi .. i'm trying that code for loosing items on capture... not guaranties that working but you can try... if errors feel free to tell me!
In Character.cs replace public void Die() with this:
Quote:
public void Die()
{
try
{
DeathSent = true;
World.UpdateSpawn(this);
int EModel;
if (Model == 1003 || Model == 1004)
EModel = 15099;
else
EModel = 15199;
if (PKPoints > 30)
if (PKPoints > 30)
{
Teleport(6000, 60, 60);
}
XpList = false;
SMOn = false;
CycloneOn = false;
XpCircle = 0;
MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
MyClient.SendPacket(General.MyPackets.Status1(UID, EModel));
MyClient.SendPacket(General.MyPackets.Death(this)) ;
if (PKPoints <= 30)
{
if (Other.ChanceSuccess(60))
{
Random lol = new Random();
int x = lol.Next(0, 9);
if (Equips[x] == null)
return;
uint TheItemUID = Equips_UIDs[x];
UnEquip((byte)x);
int Count = 0;
foreach (uint uid in Inventory_UIDs)
{
if (uid == TheItemUID)
{
string Item = Inventory[Count];
DroppedItem e = DroppedItems.DropItem(Item, (uint)(LocX - General.Rand.Next(2) + General.Rand.Next(2)), (uint)(LocY - General.Rand.Next(2) + General.Rand.Next(2)), (uint)LocMap, 1020);
World.ItemDrops(e);
RemoveItem(TheItemUID);
}
Count++;
}
}
}
}
catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
}
|
Thanks to AlexBigFoot to help me completing the code
if it isn't working tell me ... if someone can fix it, good!