public void setCustomAmount(int amount) { if (currentOffer != null) { currentOffer.setTotalAmount(amount); if (currentOffer.getTotalAmount() < 1) { currentOffer.setTotalAmount(0); } p.getPackets().sendConfig(1110, currentOffer.getTotalAmount()); } }
public void updateSearchItem(int item) { p.getPackets().sendConfig(1109, item); p.getPackets().sendConfig(1110, 0); ItemData.Item def = ItemData.forId(item); if (def == null) { return; } p.getPackets().sendConfig(1109, item); p.getPackets().sendConfig(1114, def.getPrice().getNormalPrice()); p.getPackets().sendConfig(1116, def.getPrice().getMaximumPrice()); p.getPackets().sendConfig(1115, def.getPrice().getMinimumPrice()); p.getPackets().sendConfig(1111, def.getPrice().getNormalPrice()); currentOffer = new BuyOffer(slot, p.getLoginDetails().getUsername()); currentOffer.setTotalAmount(0); currentOffer.setItem(item); currentOffer.setPriceEach(def.getPrice().getNormalPrice()); p.getPackets().sendInterface(0, 752, 6, 137); // Removes the item search }
public void updateSearchItem(int item) { ItemData.Item def = ItemData.forId(item); if (def == null) { p.getPackets().sendMessage("Item: " + item + " cannot be found in item definitions, please report it."); return; } if (currentOffer == null) { p.getPackets().sendMessage("You shouldn't be running GE Item Search if you didn't click Buy in GE first"); p.getPackets().sendCloseInterface(752, 6); // Removes the item search p.getPackets().sendInterface(0, 752, 6, 137); // Removes the item search return; } p.getPackets().sendConfig(1109, item); p.getPackets().sendConfig(1110, 0); p.getPackets().sendConfig(1114, def.getPrice().getNormalPrice()); p.getPackets().sendConfig(1116, def.getPrice().getMaximumPrice()); p.getPackets().sendConfig(1115, def.getPrice().getMinimumPrice()); p.getPackets().sendConfig(1111, def.getPrice().getNormalPrice()); p.getPackets().modifyText(def.getExamine(), 105, 142); //item examine text. currentOffer.setTotalAmount(0); currentOffer.setItem(item); currentOffer.setPriceEach(def.getPrice().getNormalPrice()); p.getPackets().sendInterface(0, 752, 6, 137);// Removes the item search }