Beispiel #1
0
 private static int getAnimation(Bow item)
 {
     if (item.isStringing())
     {
         return item.getItemType() == 0 ? 6678 + item.getLogType() : 6684 + item.getLogType();
     }
     return item.getLogType() == 5 ? 7211 : 1248;
 }
Beispiel #2
0
 private static bool canFletch(Player p, Bow item, bool stringing)
 {
     if (item == null || item.getAmount() <= 0)
     {
         return false;
     }
     if (p.getSkills().getGreaterLevel(Skills.SKILL.FLETCHING) < item.getLevel())
     {
         p.getPackets().sendMessage("You need a Fletching level of " + item.getLevel() + " to make that.");
         return false;
     }
     if (!stringing)
     {
         if (!p.getInventory().hasItem(LOGS[item.getLogType()]))
         {
             p.getPackets().sendMessage("You have run out of logs.");
             return false;
         }
         if (!p.getInventory().hasItem(KNIFE))
         {
             p.getPackets().sendMessage("You need a knife to fletch logs.");
             return false;
         }
     }
     else
     {
         int[] bows = item.getItemType() == 0 ? UNSTRUNG_SHORTBOW : UNSTRUNG_LONGBOW;
         if (!p.getInventory().hasItem(bows[item.getLogType()]))
         {
             p.getPackets().sendMessage("You do not have a bow to string.");
             return false;
         }
         if (!p.getInventory().hasItem(BOWSTRING))
         {
             p.getPackets().sendMessage("You need Bowstring if you wish to string a bow!");
             return false;
         }
     }
     return true;
 }