Jump to content
  • 0
Sign in to follow this  
Ahmedo0o

[Delta] Items drop to the ground when you die

Question

[Delta] Items drop to the ground when you die

Hello,

In my rsps when you die, you keep 3 items, and the rest disappears. My players started to nag about it, so I spent about 2 hours trying to fix it but couldn't. I want the rest of the items (except the 3) to be left (dropped) on the ground where you died, like rs or a lot of rsps's around here.

This is my whole youdie() method:

[CODE]public void youdied()
{
if(playerHasItem(5509)){
deleteItem(5509, 1);
}
if(playerHasItem(5510)){
deleteItem(5510, 1);
}
if(playerHasItem(5512)){
deleteItem(5512, 1);
}
if(playerHasItem(5514)){
deleteItem(5514, 1);
}
if(playerHasItem(6570)){
keep6570 = true;
deleteItem(6570, 1);
}
if (!isSkulled) {
keepItemHandle();
}
if (ProtItem) {
applyProtectItemProt();
}
for(int rr=0; rr<playerItems.length; rr++) {
try {
if(playerItems[rr] > 0 && playerItems[rr] < 11999) { //createItem(currentX,currentY,playerItems[rr]-1);
replaceBarrows();
//server.checkPlayerCapes.checkDrop(this);
ItemHandler.addItem(playerItems[rr]-1, absX, absY, playerItemsN[rr], KillerId, false);
//createGroundItem(playerItems[rr]-1, absX, absY, playerItemsN[i]);
deleteItem(playerItems[rr]-1, getItemSlot(playerItems[rr]-1), playerItemsN[rr]);

}
} catch(Exception e) { }
}
for(int r=0; r<playerEquipment.length; r++) {
try {
int item = playerEquipment[r];
if((item > 0) && (item < 11999)) {
remove(item, r);
}
} catch(Exception e) { sM("ERROR: Removing Equipment"); }
}
if(playerHasItem(5509)){
deleteItem(5509, 1);
}
if(playerHasItem(5510)){
deleteItem(5510, 1);
}
if(playerHasItem(5512)){
deleteItem(5512, 1);
}
if(playerHasItem(5514)){
deleteItem(5514, 1);
}
if(playerHasItem(6570)){
keep6570 = true;
deleteItem(6570, 1);
}
for(int rr=0; rr<playerItems.length; rr++) {
try {
if(playerItems[rr] > 0 && playerItems[rr] < 11999) {
//createItem(currentX,currentY,playerItems[rr]-1);
replaceBarrows();
//server.checkPlayerCapes.checkDrop(this);
ItemHandler.addItem(playerItems[rr]-1, absX, absY, playerItemsN[rr], KillerId, false);
//createGroundItem(playerItems[rr]-1, absX, absY, playerItemsN[i]);
deleteItem(playerItems[rr]-1, getItemSlot(playerItems[rr]-1), playerItemsN[rr]);
}
} catch(Exception e) { }
}
try {

} catch(Exception e) {}
ItemHandler.addItem(526, absX, absY, 1, KillerId, false);
try {
} catch(Exception e) {}
if (itemKept1 > 0)
addItem(itemKept1, 1);
if (itemKept2 > 0)
addItem(itemKept2, 1);
if (itemKept3 > 0)
addItem(itemKept3, 1);
if (itemKept4 > 0)
addItem(itemKept4, 1);
if (keep6570) {
addItem(6570, 1);
keep6570 = false;
}

resetKeepItem();
hitDiff = 0;
updateRequired = true; appearanceUpdateRequired = true;
}
[/CODE]

I tried un-commenting the [CODE]creategrounditem[/CODE] but it didn't work.

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Sign in to follow this  

×