Sanity 435 Posted September 28, 2017 Report Share Posted September 28, 2017 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."); } Link to comment Share on other sites More sharing options...
Ary3x 0 Posted February 14, 2022 Report Share Posted February 14, 2022 Will use thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now