return true;
}
private boolean doHerblaw(Player player, final InvItem vial,
final InvItem herb) {
final ItemHerbDef herbDef = EntityHandler.getItemHerbDef(herb.id);
if (herbDef == null) {
return false;
}
if (!Config.members) {
player.getActionSender().sendMessage(
"This feature is not avaliable in f2p");
return true;
}
if (player.getCurStat(15) < herbDef.getReqLevel()) {
player.getActionSender().sendMessage(
"You need a herblaw level of " + herbDef.getReqLevel()
+ " to mix those.");
return true;
}
Instance.getDelayedEventHandler().add(new MiniEvent(player) {
public void action() {
if (owner.getInventory().remove(vial.id, vial.amount, false)
&& owner.getInventory().remove(herb.id, herb.amount,
false)) {
owner.getActionSender().sendMessage(
"You add the " + herb.getDef().getName()
+ " to the water");
owner.getInventory().add(herbDef.getPotionId(), 1, false);
// owner.incExp(15, herbDef.getExp(), true);
// owner.getActionSender().sendStat(15);
owner.getActionSender().sendInventory();
}
}