Posted September 28, 20177 yr comment_13284 Very simple to do, kind of nice to have an additional currency that many stakers should be familiar with being introduced into the economy. Modify to your needs. Anyways. Add this into your Items.json file. { "id": 13204, "name": "Platinum Tokens", "examine": "Shiny currency, could be useful to some.", "value": 1000, "stackable": true, "noted": false, "noteId": -1, "tradeable": true, "sellable": false, "dropable": true }, In your UseItemPacketListener class, itemOnObject method if (itemId == 995 && gameObject.getDefinition().getName().contains("Bank")) { final int size = player.getInventory().getAmount(995); player.getInventory().delete(new Item(995, size)); player.getInventory().add(new Item(13204, size / 2)); player.getPacketSender().sendMessage("You exchange " + Misc.format(size) + " Coins for " + Misc.format(player.getInventory().getAmount(13204)) + " Platinum tokens."); }
Create an account or sign in to comment