let me explain what he's trying to say in the most easy possible way. Copy Paste
Code:
/**
* Check all slots and determine whether or
* not a slot is accompanied by that item
*/
public boolean isWearingItem(int itemID) {
for(int i = 0; i < 12; i++) {
if(c.playerEquipment[i] == itemID) {
return true;
}
}
return false;
}
/**
* Check all slots and determine the amount
* of said item worn in that slot
*/
public int getWornItemAmount(int itemID) {
for(int i = 0; i < 12; i++) {
if(c.playerEquipment[i] == itemID) {
return c.playerEquipmentN[i];
}
}
return 0;
}
Place it somewhere in itemassistant.java
Go to playerassistant.java
Find
Code:
c.getItems().dropAllItems();
c.getItems().deleteAllItems();
under that add
Code:
for(int item = 0; item < Config.ITEMS_KEPT_ON_DEATH.length; item++) {
int itemId = Config.ITEMS_KEPT_ON_DEATH[item];
int itemAmount = c.getItems().getItemAmount(itemId) + c.getItems().getWornItemAmount(itemId);
if(c.getItems().playerHasItem(itemId) || c.getItems().isWearingItem(itemId)) {
c.sendMessage("You kept "+itemAmount+" "+c.getItems().getItemName(itemId).toLowerCase()+", it was transferred to your bank.");
c.getItems().addItemToBank(itemId, itemAmount);
}
}
then in config.java add
Code:
public static final int[] ITEMS_KEPT_ON_DEATH = {6570, 892};
somewhere.
Was dat so hard?