Posted June 29, 20205 yr comment_59485 public static boolean convertItems(Player player, Item item) { if (item.getDefinitions().containsOption("Convert")) { for (int i = 45405; i < Utils.getItemDefinitionsSize(); i++) { if (ItemDefinitions.getItemDefinitions(i).getName().equalsIgnoreCase(item.getName())) { item.setId(i); player.getInventory().refresh(); player.getPackets().sendGameMessage("You have converted your " + item.getName().toLowerCase() + " to a useable form."); break; } } return true; } return false; }
April 29, 20232 yr comment_92213 I'm still surprised that people browse this section to find this. I might have to post some more snippets soon.
Create an account or sign in to comment