[Release] Loose items on capture

10/29/2008 21:37 stephanyd#1
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!
10/29/2008 21:38 randomnoob#2
Quote:
EModel = 15199;
if (PKPoints > 30)
if (PKPoints > 30)

{
Teleport(6000, 60, 60);
}
double if statement.
remove one of them.
i think the rest is fine tho.
10/29/2008 21:42 tao4229#3
Wtf? Didn't you already see the other leached thread? I mean damn, one leached thread is bad enough, but two leached threads that are exactly the same?!
10/29/2008 21:42 ahmadinho12#4
Cool For Catcher's.
Isn't for Pkers :D
10/29/2008 21:45 stephanyd#5
Quote:
Originally Posted by tao4229 View Post
Wtf? Didn't you already see the other leached thread? I mean damn, one leached thread is bad enough, but two leached threads that are exactly the same?!
lol.. for the first time i try to contribute and try to be nice:D
10/29/2008 22:25 alexbigfoot#6
Quote:
Originally Posted by stephanyd View Post
lol.. for the first time i try to contribute and try to be nice:D
isnt bad to contribute with something, but before look for other threads.....