return true;
}
private boolean doArrowHeads(Player player, final InvItem headlessArrows,
final InvItem arrowHeads) {
final ItemArrowHeadDef headDef = EntityHandler
.getItemArrowHeadDef(arrowHeads.id);
if (!Config.members) {
player.getActionSender().sendMessage(
"This feature is not avaliable in f2p");
return true;
}
if (headDef == null) {
return false;
}
if (player.getCurStat(9) < headDef.getReqLevel()) {
player.getActionSender().sendMessage(
"You need a fletching level of " + headDef.getReqLevel()
+ " to attach those.");
return true;
}
int amount = 10;
if (headlessArrows.amount < amount) {
amount = headlessArrows.amount;
}
if (arrowHeads.amount < amount) {
amount = arrowHeads.amount;
}
final int amt = amount;
Instance.getDelayedEventHandler().add(new MiniEvent(player) {
public void action() {
if (owner.getInventory().remove(headlessArrows.id, amt, false)
&& owner.getInventory().remove(arrowHeads.id, amt,
false)) {
owner.getActionSender().sendMessage(
"You attach the heads to the arrows");
owner.getInventory().add(headDef.getArrowID(), amt, false);
owner.incExp(9, (int) (headDef.getExp() * (double) amt),
true);
owner.getActionSender().sendStat(9);
owner.getActionSender().sendInventory();
}
}