I am also trying to add this. I only have it where if you attack an npc/player it breaks
|
Does anyone know how to make barrows break when its dropped? Giving rep++ For help :]
I am also trying to add this. I only have it where if you attack an npc/player it breaks
EDIT: Just read that you said Emulous, sorry wasn't paying attention. The below code could be changed to Emulous though.
And use it like this. In your dropping void useCode:public void replaceitem2(int oldID, int newID) { for(int i2 = 0; i2 < playerItems.length; i2++) { if(playerItems[i2] == oldID+1) { int newamount = playerItemsN[i2]; deleteItem(oldID, getItemSlot(oldID), playerItemsN[i2]); ItemHandler.addItem(newID, absX, absY, newamount, playerId, false); } } }So replace a full barrows item that gets dropped with a 0 barrows item.Code:if(droppedItem == BARROWSDROPPED){ replaceitem2(OLDITEMID, NEWITEMID);
}
Where abouts would I add this?public void replaceitem2(int oldID, int newID) {
for(int i2 = 0; i2 < playerItems.length; i2++)
{
if(playerItems[i2] == oldID+1)
{
int newamount = playerItemsN[i2];
deleteItem(oldID, getItemSlot(oldID), playerItemsN[i2]);
ItemHandler.addItem(newID, absX, absY, newamount, playerId, false);
}
}
}
still need help
Why? that works you just need to edit some of it so that it works
No, just find droping packet and add switch statement:
switch (itemID) {
case BARROWS_ITEM_ID:
replaceitem(BROKEN_BARROWS_ITEM_ID, BARROWS_ITEM_ID);
break;
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |