I have this custom shop that is supposed to take tokens.
If the player doesn't have enough tokens for the priced item, it does come back with a return message saying they don't have enough tokens.
If they do have enough, the player receives the items, but no tokens are taken.
Code:
public void handleOtherShop(int itemID) {
int Slot = c.getItems().getItemSlot(6183);
if (c.myShopId == 14) { // Noob Token Shop
if (c.playerItemsN[Slot] >= getSpecialNoobValue(itemID)) {
if (c.getItems().freeSlots() > 0) {
c.getItems().deleteItem(6183, c.getItems().getItemSlot(6183), getSpecialItemValue(itemID));
c.getItems().addItem(itemID, 1);
c.getItems().resetItems(3823);
}
} else {
c.sendMessage("You do not have enough Noob Tokens.");
}
}
}
Can someone tell me why, please? Thank you.