
Originally Posted by
Tesla
Code:
final int platinumTokenValue = 1000;
final int platinumTokenAmount = coinAmount / platinumTokenValue;
if (platinumTokenAmount > 0) {
player.getInventory().removeItem(995, platinumTokenAmount * platinumTokenValue);
} else {
// not enough coins to convert
}
what exactly do you need help with?
Thanks i've been doing it wrong lol...
Code:
final int value = 1000;
final int size = player.getInventory().getItemAmount(995);
player.getInventory().remove(new Item(995, size * value));
player.getInventory().add(new Item(13204, size / 2));