Package org.moparscape.msc.gs.model.definition.skill

Examples of org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef


    return true;
  }

  private boolean doBowString(Player player, final InvItem bowString,
      final InvItem bow) {
    final ItemBowStringDef stringDef = EntityHandler
        .getItemBowStringDef(bow.id);
    if (!Config.members) {
      player.getActionSender().sendMessage(
          "This feature is not avaliable in f2p");
      return true;
    }

    if (stringDef == null) {
      return false;
    }
    if (player.getCurStat(9) < stringDef.getReqLevel()) {
      player.getActionSender().sendMessage(
          "You need a fletching level of " + stringDef.getReqLevel()
              + " to do that.");
      return true;
    }
    Instance.getDelayedEventHandler().add(new MiniEvent(player) {
      public void action() {
        if (owner.getInventory().remove(bowString.id, bowString.amount,
            false)
            && owner.getInventory().remove(bow.id, bow.amount,
                false)) {
          owner.getActionSender().sendMessage(
              "You add the bow string to the bow");
          owner.getInventory().add(stringDef.getBowID(), 1, false);
          owner.incExp(9, stringDef.getExp(), true);
          owner.getActionSender().sendStat(9);
          owner.getActionSender().sendInventory();
        }
      }
    });
View Full Code Here

TOP

Related Classes of org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.