@Override public void run(String command, final String parameters) { if (command.equals("overdrink")) { DrinkItemRequest.permitOverdrink(); command = "drink"; } else if (command.equals("eatsilent")) { EatItemRequest.ignoreMilkPrompt(); command = "eat"; } SpecialOutfit.createImplicitCheckpoint(); UseItemCommand.use(command, parameters); SpecialOutfit.restoreImplicitCheckpoint(); }
private void buff(boolean maxBuff) { UseSkillRequest request = (UseSkillRequest) SkillBuffFrame.this.skillSelect.getSelectedItem(); if (request == null) { return; } String buffName = request.getSkillName(); if (buffName == null) { return; } String[] targets = StaticEntity.getClient() .extractTargets((String) SkillBuffFrame.this.targetSelect.getSelectedItem()); int buffCount = !maxBuff ? InputFieldUtilities.getValue(SkillBuffFrame.this.amountField, 1) : Integer.MAX_VALUE; if (buffCount == 0) { return; } SpecialOutfit.createImplicitCheckpoint(); if (targets.length == 0) { RequestThread.postRequest( UseSkillRequest.getInstance(buffName, KoLCharacter.getUserName(), buffCount)); } else { for (int i = 0; i < targets.length && KoLmafia.permitsContinue(); ++i) { if (targets[i] != null) { RequestThread.postRequest(UseSkillRequest.getInstance(buffName, targets[i], buffCount)); } } } SpecialOutfit.restoreImplicitCheckpoint(); }