public boolean ExchangedRuneArmourSetSK(
     Client c) { // Rune Full Helm, Rune Platebody, Rune Plateskirt, Rune Kiteshield
   return c.getItems().addItem(1163, 1)
       && c.getItems().addItem(1127, 1)
       && c.getItems().playerHasItem(1093, 1)
       && c.getItems().playerHasItem(1201, 1);
 }
 public void lightFire(int slot) {
   if (c.duelStatus >= 5) {
     c.sendMessage("Why am I trying to light a fire in the duel arena?");
     return;
   }
   if (c.playerLevel[c.playerFiremaking] >= level[slot]) {
     if (c.getItems().playerHasItem(590) && c.getItems().playerHasItem(logs[slot])) {
       if (System.currentTimeMillis() - lastLight > DELAY) {
         c.startAnimation(733, 0);
         c.getItems().deleteItem(logs[slot], c.getItems().getItemSlot(logs[slot]), 1);
         c.getPA().addSkillXP(logs[slot] * Config.FIREMAKING_EXPERIENCE, c.playerFiremaking);
         Objects fire = new Objects(2732, c.getX(), c.getY(), 0, -1, 10, 3);
         Objects fire2 = new Objects(592, c.getX(), c.getY(), 0, -1, 10, 60);
         Server.objectHandler.addObject(fire);
         Server.objectHandler.addObject(fire2);
         c.sendMessage("You light the fire.");
         c.getPA().walkTo(-1, 0);
         c.turnPlayerTo(c.getX() + 1, c.getY());
         this.lastLight = System.currentTimeMillis();
         // c.getPA().frame1();
         resetAnim = true;
       }
     }
   }
 }
Esempio n. 3
0
  public void handleOtherShop(int itemID) {
    if (c.myShopId == 18) {
      if (c.pkPoints >= getSpecialItemValue(itemID)) {
        if (c.getItems().freeSlots() > 0) {
          c.pkPoints -= getSpecialItemValue(itemID);
          c.getItems().addItem(itemID, 1);
          c.getItems().resetItems(3823);
        }
      } else {
        c.sendMessage("You do not have enough EXL points to buy this item.");
      }
    }
    if (c.myShopId == 73) {
      if (c.pkPoints >= getSpecialItemValue(itemID)) {
        if (c.getItems().freeSlots() > 0) {
          c.pkPoints -= getSpecialItemValue(itemID);
          c.getItems().addItem(itemID, 1);
          c.getItems().resetItems(3823);
        }
      } else {
        c.sendMessage("You do not have enough EXL points to buy this item.");
      }
    }

    if (c.myShopId == 10) {
      if (c.donorPoints >= getSpecialItemValue(itemID)) {
        if (c.getItems().freeSlots() > 0) {
          c.donorPoints -= getSpecialItemValue(itemID);
          c.getItems().addItem(itemID, 1);
          c.getItems().resetItems(3823);
        }
      } else {
        c.sendMessage("You do not have enough Donator points to buy this item.");
      }
    }
    if (c.myShopId == 74) {
      if (c.pkPoints >= getSpecialItemValue(itemID)) {
        if (c.getItems().freeSlots() > 0) {
          c.pkPoints -= getSpecialItemValue(itemID);
          c.getItems().addItem(itemID, 1);
          c.getItems().resetItems(3823);
        }
      } else {
        c.sendMessage("You do not have enough EXL points to buy this item.");
      }
    }
    if (c.myShopId == 48) {
      if (c.SPoints >= getSpecialItemValue(itemID)) {
        if (c.getItems().freeSlots() > 0) {
          c.SPoints -= getSpecialItemValue(itemID);
          c.getItems().addItem(itemID, 1);
          c.getItems().resetItems(3823);
        }
      } else {
        c.sendMessage("You do not have enough Slayer Points to buy this item.");
      }
    }
  }
Esempio n. 4
0
 public void craftHides(int id) {
   for (int j = 0; j < amount; j++) {
     if (!c.getItems().playerHasItem(id, craftType)) break;
     c.getItems().deleteItem(id, craftType);
     if (getItemToAdd() <= 0) break;
     c.getItems().addItem(getItemToAdd(), 1);
     c.getPA().addSkillXP(exp * Config.CRAFTING_EXPERIENCE, c.playerCrafting);
   }
   resetCrafting();
 }
Esempio n. 5
0
 public void cutGem(int id) {
   for (int j = 0; j < gems.length; j++) {
     if (gems[j][0] == id) {
       if (c.playerLevel[c.playerCrafting] >= gems[j][2]) {
         c.getItems().deleteItem(id, c.getItems().getItemSlot(id), 1);
         c.getItems().addItem(gems[j][1], 1);
         c.getPA().addSkillXP(gems[j][3] * Config.CRAFTING_EXPERIENCE, c.playerCrafting);
         break;
       }
     }
   }
 }
Esempio n. 6
0
  public static void ItemonObject(Client c, int objectID, int objectX, int objectY, int itemId) {
    if (!c.getItems().playerHasItem(itemId, 1)) return;
    switch (objectID) {
      case 15621:
        Server.getWarriorsGuild().handleArmor(c, itemId, objectX, objectY);
        break;
      case 2783:
        c.getSmithingInt().showSmithInterface(itemId);
        break;
      case 8151:
      case 8389:
        c.getFarming().checkItemOnObject(itemId);
        break;
      case 2644:
        c.getFlaxStringer().itemOnObject(itemId);
        break;

      case 409:
        if (c.getPrayer().IsABone(itemId)) c.getPrayer().bonesOnAltar(itemId);
        break;
      default:
        if (c.playerRights == 3)
          Misc.println("Player At Object id: " + objectID + " with Item id: " + itemId);
        break;
    }
  }
Esempio n. 7
0
  public void setupSkillCapes(int capes, int capes2) {
    synchronized (c) {
      c.getItems().resetItems(3823);
      c.isShopping = true;
      c.myShopId = 14;
      c.getPA().sendFrame248(3824, 3822);
      c.getPA().sendFrame126("reflexion SkillCape Shop", 3901);

      int TotalItems = 0;
      TotalItems = capes2;
      if (TotalItems > Server.shopHandler.MaxShopItems) {
        TotalItems = Server.shopHandler.MaxShopItems;
      }
      c.getOutStream().createFrameVarSizeWord(53);
      c.getOutStream().writeWord(3900);
      c.getOutStream().writeWord(TotalItems);
      int TotalCount = 0;
      for (int i = 0; i < 23; i++) {
        if (c.getLevelForXP(c.playerXP[i]) < 99) continue;
        c.getOutStream().writeByte(1);
        c.getOutStream().writeWordBigEndianA(skillCapes[i] + 2);
        TotalCount++;
      }
      c.getOutStream().endFrameVarSizeWord();
      c.flushOutStream();
    }
  }
Esempio n. 8
0
 public static void ItemonObject(Client c, int objectID, int objectX, int objectY, int itemId) {
   if (!c.getItems().playerHasItem(itemId, 1)) return;
   switch (objectID) {
     case 2783:
       c.getSmithingInt().showSmithInterface(itemId);
       break;
     case 7965:
     case 8389:
       c.getFarming().checkItemOnObject(itemId);
       break;
     case 2728:
     case 12269:
       c.getCooking().itemOnObject(itemId);
       break;
     case 15621:
       if (c.absX == 2857 && c.absY == 3537 || c.absX == 2851 && c.absY == 3537) {
         c.getWarriorsGuild().handleArmor(c, itemId, objectX, objectY);
       }
       break;
     case 409:
       if (c.getPrayer().isBone(itemId)) c.getPrayer().bonesOnAltar(itemId);
       break;
     default:
       if (c.playerRights == 3)
         Misc.println("Player At Object id: " + objectID + " with Item id: " + itemId);
       break;
   }
 }
Esempio n. 9
0
 public boolean addShopItem(int itemID, int amount) {
   boolean Added = false;
   if (amount <= 0) {
     return false;
   }
   if (Item.itemIsNote[itemID] == true) {
     itemID = c.getItems().getUnnotedItem(itemID);
   }
   for (int i = 0; i < Server.shopHandler.ShopItems.length; i++) {
     if ((Server.shopHandler.ShopItems[c.myShopId][i] - 1) == itemID) {
       Server.shopHandler.ShopItemsN[c.myShopId][i] += amount;
       Added = true;
     }
   }
   if (Added == false) {
     for (int i = 0; i < Server.shopHandler.ShopItems.length; i++) {
       if (Server.shopHandler.ShopItems[c.myShopId][i] == 0) {
         Server.shopHandler.ShopItems[c.myShopId][i] = (itemID + 1);
         Server.shopHandler.ShopItemsN[c.myShopId][i] = amount;
         Server.shopHandler.ShopItemsDelay[c.myShopId][i] = 0;
         break;
       }
     }
   }
   return true;
 }
Esempio n. 10
0
 /** Shops */
 public void openShop(int ShopID) {
   c.getItems().resetItems(3823);
   resetShop(ShopID);
   c.isShopping = true;
   c.myShopId = ShopID;
   c.getPA().sendFrame248(3824, 3822);
   c.getPA().sendFrame126(Server.shopHandler.ShopName[ShopID], 3901);
 }
  public void ExchangeSets(Client c) {

    // Rune
    // Rune Armour Set (Skirt)
    if (c.getItems().playerHasItem(1, 1)) {
      // c.getItems().deleteItem(RuneArmourSetSK,1);
      // c.getItems().addItem(ExchangedRuneArmourSetSK,1);
      // c.sendMessage("You Exchange your Rune Armour Set (SK) For the real items");
    }
    // Rune Armour Set (Legs)
    if (c.getItems().playerHasItem(1, 1)) {
      c.getItems().deleteItem(RuneArmourSetLG);
      c.getItems().deleteItem(13736, 1);
      c.getItems().addItem(13738, 1);
      c.sendMessage("You Exchange your Rune Armour Set (LG) For the real items");
    }
  }
Esempio n. 12
0
 public void openPlayerShop(Client o) {
   if (o == null || o.properLogout) return;
   c.getItems().resetItems(3823);
   resetShop(o);
   c.myShopClient = o;
   c.myShopId = 7390;
   c.isShopping = true;
   c.getPA().sendFrame248(3824, 3822);
   c.getPA().sendFrame126(Misc.optimizeText(o.playerName) + "'s personal shop!", 3901);
 }
Esempio n. 13
0
 public void smelt(int barType) {
   if (c.smeltAmount > 0) {
     c.getPlayerAssistant().closeAllWindows();
     if (hasOres(barType)) {
       c.getItems().deleteItem(oreId, c.getItems().getItemSlot(oreId), 1);
       if (oreId2 > 0) c.getItems().deleteItem(oreId2, c.getItems().getItemSlot(oreId2), 1);
       c.getItems().addItem(barId, 1);
       c.getPlayerAssistant().addSkillXP(exp * Config.SMITHING_EXPERIENCE, c.playerSmithing);
       c.getPlayerAssistant().refreshSkill(c.playerSmithing);
       c.smeltAmount--;
       c.smeltTimer = 1;
     } else {
       c.sendMessage("You do not have the required ores to smelt this.");
       c.getPlayerAssistant().removeAllWindows();
     }
   } else {
     c.getPlayerAssistant().resetVariables();
   }
 }
Esempio n. 14
0
  /** Sell item to shop (Shop Price) */
  public void sellToShopPrice(int removeId, int removeSlot) {
    if (c.myShopId == 7390) {
      c.sendMessage("You choose your price when using POS.");
      return;
    }
    for (int i : Config.ITEM_SELLABLE) {

      if (i == removeId) {
        c.sendMessage("You can't sell " + c.getItems().getItemName(removeId).toLowerCase() + ".");
        return;
      }
    }
    boolean IsIn = false;
    if (Server.shopHandler.ShopSModifier[c.myShopId] > 1) {
      for (int j = 0; j <= Server.shopHandler.ShopItemsStandard[c.myShopId]; j++) {
        if (removeId == (Server.shopHandler.ShopItems[c.myShopId][j] - 1)) {
          IsIn = true;
          break;
        }
      }
    } else {
      IsIn = true;
    }
    if (IsIn == false) {
      c.sendMessage(
          "You can't sell " + c.getItems().getItemName(removeId).toLowerCase() + " to this store.");
    } else {
      int ShopValue = (int) Math.floor(getItemShopValue(removeId, 1, removeSlot));
      String ShopAdd = "";
      if (ShopValue >= 1000 && ShopValue < 1000000) {
        ShopAdd = " (" + (ShopValue / 1000) + "K)";
      } else if (ShopValue >= 1000000) {
        ShopAdd = " (" + (ShopValue / 1000000) + " million)";
      }
      c.sendMessage(
          c.getItems().getItemName(removeId)
              + ": shop will buy for "
              + ShopValue
              + " coins"
              + ShopAdd);
    }
  }
Esempio n. 15
0
 private void plantSeed(int seedId, int herbId, int exp, int slot) {
   if (c.playerLevel[c.playerFarming] < FARMING_REQS[slot]) {
     c.sendMessage("You require a farming level of " + FARMING_REQS[slot] + " to farm this seed.");
   } else if (!seedPlanted
       && patchRaked
       && c.getItems().playerHasItem(seedId, 1)
       && c.getItems().playerHasItem(SEED_DIBBER, 1)) {
     c.getItems().deleteItem(seedId, c.getItems().getItemSlot(seedId), 1);
     c.getPA().addSkillXP(SEED_PLANT_EXP[slot] * Config.FARMING_EXPERIENCE, c.playerFarming);
     c.startAnimation(2291);
     c.getPA().refreshSkill(c.playerFarming);
     int herbAmount = Misc.random(5) + 3;
     c.farm[0] = herbId;
     c.farm[1] = herbAmount;
     c.sendMessage("You plant your seed. Water it and watch it grow.");
     seedPlanted = true;
   } else {
     c.sendMessage("You need to rake the patch or you've already planted a seed!");
   }
 }
Esempio n. 16
0
  @Override
  public void processPacket(Client c, int packetType, int packetSize) {

    if (packetType == PART1) {
      c.getOutStream().createFrame(27);
      XremoveSlot = c.getInStream().readSignedWordBigEndian();
      XinterfaceID = c.getInStream().readUnsignedWordA();
      XremoveID = c.getInStream().readSignedWordBigEndian();
    }

    if (packetType == PART2) {
      Xamount = c.getInStream().readDWord();
      switch (XinterfaceID) {
        case 5064:
          c.getItems().bankItem(c.playerItems[XremoveSlot], XremoveSlot, Xamount);
          break;

        case 5382:
          c.getItems().fromBank(c.playerItems[XremoveSlot], XremoveSlot, Xamount);
          break;

        case 3322:
          if (c.duelStatus <= 0) {
            c.getTradeAndDuel().tradeItem(XremoveID, XremoveSlot, Xamount);
          } else {
            c.getTradeAndDuel().stakeItem(XremoveID, XremoveSlot, Xamount);
          }
          break;

        case 3415:
          if (c.duelStatus <= 0) {
            c.getTradeAndDuel().fromTrade(XremoveID, XremoveSlot, Xamount);
          }
          break;

        case 6669:
          c.getTradeAndDuel().fromDuel(XremoveID, XremoveSlot, Xamount);
          break;
      }
    }
  }
Esempio n. 17
0
  @Override
  public void processPacket(Client c, int packetType, int packetSize) {
    int itemId = c.getInStream().readUnsignedWordA();
    c.getInStream().readUnsignedByte();
    c.getInStream().readUnsignedByte();
    int slot = c.getInStream().readUnsignedWordA();
    if (c.arenas()) {
      c.sendMessage("You can't drop items inside the arena!");
      return;
    }
    if (c.playerItemsN[slot] != 0 && itemId != -1 && c.playerItems[slot] == itemId + 1) {
      if (!c.getItems().playerHasItem(itemId, 1, slot)) {
        c.sendMessage("Stop cheating!");
        return;
      }
    }

    boolean droppable = true;
    for (int i : Config.UNDROPPABLE_ITEMS) {
      if (i == itemId) {
        droppable = true;
        break;
      }
    }
    if (c.playerItemsN[slot] != 0 && itemId != -1 && c.playerItems[slot] == itemId + 1) {
      if (droppable) {
        if (c.underAttackBy > 0) {
          if (c.getShops().getItemShopValue(itemId) > 1000) {
            c.sendMessage("You may not drop items worth more than 1000 while in combat.");
            return;
          }
        }
        Server.itemHandler.createGroundItem(
            c, itemId, c.getX(), c.getY(), c.playerItemsN[slot], c.getId());
        c.getItems().deleteItem(itemId, slot, c.playerItemsN[slot]);
      } else {
        c.sendMessage("This items cannot be dropped.");
      }
    }
  }
Esempio n. 18
0
 public void checkRequirements() {
   for (int j = 0; j < expsAndLevels.length; j++) {
     if (expsAndLevels[j][0] == hideType) {
       if (c.playerLevel[c.playerCrafting] >= expsAndLevels[j][1]) {
         if (c.getItems().playerHasItem(hideType, 1)) {
           c.getPA().closeAllWindows();
           exp = expsAndLevels[j][2];
           index = j;
           craftHides(hideType);
         }
       } else {
         c.sendMessage("You need a crafting level of " + expsAndLevels[j][1] + " to craft this.");
       }
     }
   }
 }
Esempio n. 19
0
 public void pickHerb() { // / Final step, picks the herbs from the grown herb patch.
   if (c.farm[0] > 0 && c.farm[1] > 0) {
     if (System.currentTimeMillis() - c.waitTime > 2000) {
       if (c.getItems().addItem(c.farm[0], 1)) {
         c.getPA().addSkillXP(getExp() * Config.FARMING_EXPERIENCE, c.playerFarming);
         c.farm[1]--;
         if (c.farm[1] == 0) {
           c.farm[0] = -1;
         }
         c.startAnimation(2286);
         c.sendMessage("You pick a herb.");
         updateHerbPatch(); // finish, lets try this.
       }
     }
   }
 }
Esempio n. 20
0
 public void checkItemOnObject(int itemId) {
   for (int j = 0; j < VALID_SEEDS.length; j++) {
     if (itemId == VALID_SEEDS[j]) {
       plantSeed(VALID_SEEDS[j], HERBS[j], HERB_EXPS[j], j);
     } // so if you use valid seeds on the patch it does plantSeed, cool.
   }
   if (itemId == WATER_CAN && !seedWatered) {
     waterSeed(); // watering is called
   } else if (itemId == RAKE && !patchRaked) {
     rakePatch(); // raking is called
   } else if (c.getItems().playerHasItem(SEED_DIBBER, 0)) ;
   {
     c.sendMessage(
         "You need a seed dibber to plant seeds."); // if you dont have a seed dibber it gets mad
                                                    // at you.
   }
 }
Esempio n. 21
0
  public void readInput(int level, String type, Client c, int amounttomake) {

    if (c.getItems().getItemName(Integer.parseInt(type)).contains("Bronze")) {
      CheckBronze(c, level, amounttomake, type);
    } else if (c.getItems().getItemName(Integer.parseInt(type)).contains("Iron")) {
      CheckIron(c, level, amounttomake, type);
    } else if (c.getItems().getItemName(Integer.parseInt(type)).contains("Steel")) {
      CheckSteel(c, level, amounttomake, type);
    } else if (c.getItems().getItemName(Integer.parseInt(type)).contains("Mith")) {
      CheckMith(c, level, amounttomake, type);
    } else if (c.getItems().getItemName(Integer.parseInt(type)).contains("Adam")
        || c.getItems().getItemName(Integer.parseInt(type)).contains("Addy")) {
      CheckAddy(c, level, amounttomake, type);
    } else if (c.getItems().getItemName(Integer.parseInt(type)).contains("Rune")
        || c.getItems().getItemName(Integer.parseInt(type)).contains("Runite")) {
      CheckRune(c, level, amounttomake, type);
    }
    c.sendMessage("Item: " + type);
  }
Esempio n. 22
0
  public static int getBlockEmote(Client c) {
    String shield = c.getItems().getItemName(c.playerEquipment[c.playerShield]).toLowerCase();
    String weapon = c.getItems().getItemName(c.playerEquipment[c.playerWeapon]).toLowerCase();
    if (shield.contains("defender")) return 4177;
    if (shield.contains("2h")) return 7050;
    if (shield.contains("book") && (weapon.contains("wand"))) return 420;
    if (shield.contains("shield")) return 1156;
    switch (c.playerEquipment[c.playerWeapon]) {
      case 4755:
        return 2063;
      case 15241:
        return 12156;
      case 13899:
        return 13042;
      case 18355:
        return 13046;
      case 14484:
        return 397;
      case 11716:
        return 12008;
      case 4153:
        return 1666;
      case 4151:
        return 1659;
      case 15486:
        return 12806;
      case 18349:
        return 12030;
      case 18353:
        return 13054;
      case 18351:
        return 13042;

      case 11694:
      case 11698:
      case 11700:
      case 11696:
      case 11730:
        return 7050;
      case -1:
        return 424;
      default:
        return 424;
    }
  }
Esempio n. 23
0
  private static void handleBones(Client c, int i, boolean altar, int slot) {
    for (int l = 0; l < BONES.length; l++) {
      if (i == BONES[l][0]) {
        if (System.currentTimeMillis() - c.buryDelay > 800) {
          // handleZombie();
          c.getItems().deleteItem(BONES[l][0], slot, 1);
          c.getPA().addSkillXP((altar ? BONES[l][1] * 2 : BONES[l][1]) * PRAYER_XP, 5);
          c.buryDelay = System.currentTimeMillis();
          c.startAnimation((altar ? 3705 : 827));

          c.sendMessage(
              altar ? "The gods are pleased with your offerings." : "You bury the bones.");
          if (altar) {
            c.getPA().createPlayersStillGfx(624, 3097, 3500, 0, 0);
          }
        }
      }
    }
  }
Esempio n. 24
0
  public void startSmelting(int barType) {
    if (canSmelt(barType)) {

      if (hasOres(barType)) {

        this.exp = getExp(barType);
        this.oreId = getOre(barType);
        this.oreId2 = getOre2(barType);
        this.barId = barType;
        c.smeltAmount = c.getItems().getItemAmount(getOre(barType));
        smelt(barType);
      } else {
        c.sendMessage("You do not have the required ores to smelt this.");
        c.getPlayerAssistant().resetVariables();
      }
    } else {
      c.sendMessage("You must have a higher smithing level to smith this.");
      c.getPlayerAssistant().resetVariables();
    }
  }
Esempio n. 25
0
 public void skillBuy(int item) {
   int nn = get99Count();
   if (nn > 1) nn = 1;
   else nn = 0;
   for (int j = 0; j < skillCapes.length; j++) {
     if (skillCapes[j] == item || skillCapes[j] + 1 == item) {
       if (c.getItems().freeSlots() > 1) {
         if (c.getItems().playerHasItem(995, 99000)) {
           if (c.getLevelForXP(c.playerXP[j]) >= 99) {
             c.getItems().deleteItem(995, c.getItems().getItemSlot(995), 99000);
             c.getItems().addItem(skillCapes[j] + nn, 1);
             c.getItems().addItem(skillCapes[j] + 2, 1);
           } else {
             c.sendMessage("You must have 99 in the skill of the cape you're trying to buy.");
           }
         } else {
           c.sendMessage("You need 99k to buy this item.");
         }
       } else {
         c.sendMessage("You must have at least 1 inventory spaces to buy this item.");
       }
     }
     /*if (skillCapes[j][1 + nn] == item) {
     	if (c.getItems().freeSlots() >= 1) {
     		if (c.getItems().playerHasItem(995,99000)) {
     			if (c.getLevelForXP(c.playerXP[j]) >= 99) {
     				c.getItems().deleteItem(995, c.getItems().getItemSlot(995), 99000);
     				c.getItems().addItem(skillCapes[j] + nn,1);
     				c.getItems().addItem(skillCapes[j] + 2,1);
     			} else {
     				c.sendMessage("You must have 99 in the skill of the cape you're trying to buy.");
     			}
     		} else {
     			c.sendMessage("You need 99k to buy this item.");
     		}
     	} else {
     		c.sendMessage("You must have at least 1 inventory spaces to buy this item.");
     	}
     	break;
     }*/
   }
   c.getItems().resetItems(3823);
 }
 public static boolean ExchangedRuneArmourSetLG(Client c) {
   return c.getItems().playerHasItem(11838, 1);
 }
 public static int RuneArmourSetLG(Client c) {
   c.getItems().playerHasItem(11838, 1);
 }
 public boolean RuneArmourSetSK(Client c) {
   return c.getItems().playerHasItem(11840, 1);
 }
Esempio n. 29
0
  @Override
  public void processPacket(Client c, int packetType, int packetSize) {
    int junk = c.getInStream().readSignedWordBigEndianA();
    int itemSlot = c.getInStream().readUnsignedWordA();
    int itemId = c.getInStream().readUnsignedWordBigEndian();
    if (itemId != c.playerItems[itemSlot] - 1) {
      return;
    }
    switch (itemId) {
      case 2827: // Draynor River Bank
        c.clueScrollMap(7113, "1");
        break;
      case 2829: // Behind the Wizard's Tower
        c.clueScrollMap(9275, "1");
        break;
      case 3518: // North of Falador, right near the statue
        c.clueScrollMap(17537, "1");
        break;
      case 3520: // Varrock East Mine
        c.clueScrollMap(7045, "1");
        break;
      case 3522: // Search the Crate at the Goblin's Houses near Castle Wars
        c.clueScrollMap(9454, "1");
        break;
      case 3524: // Building in West Rimmington
        c.clueScrollMap(9839, "1");
        break;
      case 3525: // Edge of the Ranged Guild
        c.clueScrollMap(7162, "2");
        break;
      case 3598: // Falador Rock Garden
        c.clueScrollMap(7271, "2");
        break;
      case 3599: // Outside of the Monks House near McDoogle Woods
        c.clueScrollMap(9108, "2");
        break;
      case 3601: // Search the Crate in the Black Knight's Fortress
        c.clueScrollMap(9507, "2");
        break;
      case 3602: // Chaos Altar West of the Khazard Battlefield (south west of Ardougne), dig right
        // behind the altar
        c.clueScrollMap(17888, "2");
        break;
      case 7236: // Miscellania, just to the East of the entrance to the Castle grounds.
        c.clueScrollMap(17687, "2");
        break;
      case 7239: // Behind the House in Yanille Map
        c.clueScrollMap(9043, "3");
        break;
      case 7241: // Level 50 wilderness, directly to the West of the larger volcano, to the
        // Southeast of the Agility Course
        c.clueScrollMap(17620, "3");
        break;
      case 7286: // Just to the South of the Legends Guild entrance, to the Northeast of Ardougne
        c.clueScrollMap(17634, "3");
        break;
      case 7288: // Crate, Clocktower, South of the Ardougne Castle
        c.clueScrollMap(9720, "3");
        break;
      case 7290: // Hobgoblin Point (Crafting Guild)
        c.clueScrollMap(4305, "3");
        break;
      case 7292: // In a Building in West Ardougne
        c.clueScrollMap(9359, "3");
        break;
        /* Text Clue Scrolls */
      case 2678: // Talk to the Mage of Zamorak
        c.clueScroll(
            "Dressed in red,",
            "evil to the core,",
            "chaos is my path,",
            "peace be for none,",
            "ALL HAIL ZAMORAK!",
            "",
            "",
            "",
            "1");
        break;
      case 2831: // Talk to Romeo in Varrock Centre.
        c.clueScroll(
            "In an empty town,",
            "all alone I stand",
            "day after day, wishing",
            "that someone would just",
            "say 'hey', my love is",
            "asleep and I do nothing,",
            "destined for solitude I am...",
            "",
            "1");
        break;
      case 2833: // Talk to Emily in the Falador Bar.
        c.clueScroll(
            "You can have a cold one on me ",
            "and maybe more if you",
            "play your cards right.",
            "",
            "",
            "",
            "",
            "",
            "1");
        break;
      case 2835: // Talk to Tracker Gnome 1 outside of Falador Gates.
        c.clueScroll(
            "Gathering information on the",
            "giant breed known as 'humans' is",
            "tough work, thankfully the",
            "f-guards here can't see me!",
            "",
            "",
            "",
            "",
            "1");
        break;
      case 2837: // Talk to the Tracker Gnome 2 in Varrock Castle Courtyard.
        c.clueScroll(
            "Gathering information on the",
            "giant breed known as 'humans' is",
            "tough work, thankfully the",
            "v-guards here don't suspect me!",
            "",
            "",
            "",
            "",
            "1");
        break;
      case 2839: // Talk to the Tracker Gnome 3 in Ardougne Centre.
        c.clueScroll(
            "Gathering information on the",
            "giant breed known as 'humans' is",
            "tough work, thankfully the",
            "a-guards here don't suspect me!",
            "",
            "",
            "",
            "",
            "1");
        break;
      case 2841:
        c.clueScroll("", "", "", "", "", "", "", "", "2");
        break;
      case 2843:
        c.clueScroll("", "", "", "", "", "", "", "", "2");
        break;
      case 2845:
        c.clueScroll("", "", "", "", "", "", "", "", "2");
        break;
      case 2847:
        c.clueScroll("", "", "", "", "", "", "", "", "2");
        break;
      case 2848:
        c.clueScroll("", "", "", "", "", "", "", "", "2");
        break;
      case 2849:
        c.clueScroll("", "", "", "", "", "", "", "", "2");
        break;
      case 2851:
        c.clueScroll("", "", "", "", "", "", "", "", "3");
        break;
      case 2853:
        c.clueScroll("", "", "", "", "", "", "", "", "3");
        break;
      case 2855:
        c.clueScroll("", "", "", "", "", "", "", "", "3");
        break;
      case 2856:
        c.clueScroll("", "", "", "", "", "", "", "", "3");
        break;
      case 2857:
        c.clueScroll("", "", "", "", "", "", "", "", "3");
        break;
      case 2858:
        c.clueScroll("", "", "", "", "", "", "", "", "3");
        break;
        /* Reward Chests */
      case 2826: // Tier 1 Chest
        c.completeLevel1();
        c.getItems().deleteItem(2826, c.getItems().getItemSlot(2826), 1);
        break;
      case 2828: // Tier 2 Chest
        c.completeLevel2();
        c.getItems().deleteItem(2828, c.getItems().getItemSlot(2828), 1);
        break;
      case 2830: // Tier 3 Chest
        c.completeLevel3();
        c.getItems().deleteItem(2830, c.getItems().getItemSlot(2830), 1);
        break;
    }
    if (itemId == 8007) {
      c.getItems().deleteItem(8007, c.getItems().getItemSlot(8007), 1);
      c.getPA().teleTabTeleport(3213, 3423, 0, "teleTab");
    }
    if (itemId == 8008) {
      c.getItems().deleteItem(8008, c.getItems().getItemSlot(8008), 1);
      c.getPA().teleTabTeleport(3224, 3218, 0, "teleTab");
    }
    if (itemId == 8009) {
      c.getItems().deleteItem(8009, c.getItems().getItemSlot(8009), 1);
      c.getPA().teleTabTeleport(2965, 3383, 0, "teleTab");
    }
    if (itemId == 8010) {
      c.getItems().deleteItem(8010, c.getItems().getItemSlot(8010), 1);
      c.getPA().teleTabTeleport(2757, 3477, 0, "teleTab");
    }
    if (itemId == 8011) {
      c.getItems().deleteItem(8011, c.getItems().getItemSlot(8011), 1);
      c.getPA().teleTabTeleport(2653, 3283, 0, "teleTab");
    }
    if (itemId == 8012) {
      c.getItems().deleteItem(8012, c.getItems().getItemSlot(8012), 1);
      c.getPA().teleTabTeleport(2546, 3112, 0, "teleTab");
    }
    if (itemId == 8013) {
      c.getItems().deleteItem(8013, c.getItems().getItemSlot(8013), 1);
      c.getPA().teleTabTeleport(3086, 3499, 0, "teleTab");
    }
    if (itemId == 4447) {
      for (int i = 0; i < 5; i++) {
        c.playerLevel[0] = 99;
        c.playerLevel[1] = 99;
        c.playerLevel[2] = 99;
        c.playerLevel[3] = 99;
        c.playerLevel[4] = 99;
        c.playerLevel[6] = 99;
        c.playerXP[i] = c.getPA().getXPForLevel(100);
        c.playerXP[6] = c.getPA().getXPForLevel(100);
        c.getPA().refreshSkill(i);
        c.getPA().refreshSkill(6);
        c.getItems().deleteItem(4447, 1);
        c.logout();
      }
      c.getPA().requestUpdates();
    }

    if (itemId == 6796) {
      c.playerLevel[0] = 99;
      c.playerLevel[2] = 99;
      c.playerLevel[3] = 99;
      c.playerLevel[4] = 99;
      c.playerLevel[6] = 99;
      c.playerXP[0] = c.getPA().getXPForLevel(100);
      c.playerXP[2] = c.getPA().getXPForLevel(100);
      c.playerXP[3] = c.getPA().getXPForLevel(100);
      c.playerXP[4] = c.getPA().getXPForLevel(100);
      c.playerXP[6] = c.getPA().getXPForLevel(100);
      c.getPA().refreshSkill(0);
      c.getPA().refreshSkill(2);
      c.getPA().refreshSkill(3);
      c.getPA().refreshSkill(4);
      c.getPA().refreshSkill(6);
      c.getItems().deleteItem(6796, 1);
      c.logout();
    }

    if (itemId == 15272) {
      if (System.currentTimeMillis() - c.foodDelay >= 1500 && c.playerLevel[3] > 0) {
        c.getCombat().resetPlayerAttack();
        c.attackTimer += 2;
        c.startAnimation(829);
        c.getItems().deleteItem(15272, 1);
        if (c.playerLevel[3] < c.getLevelForXP(c.playerXP[3])) {
          c.playerLevel[3] += 23;
          if (c.playerLevel[3] > c.getLevelForXP(c.playerXP[3]))
            c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]);
        }
        c.foodDelay = System.currentTimeMillis();
        c.getPA().refreshSkill(3);
        c.sendMessage("You eat the Rocktail.");
      }
      c.playerLevel[3] += 10;
      if (c.playerLevel[3] > (c.getLevelForXP(c.playerXP[3]) * 1.11 + 1)) {
        c.playerLevel[3] = (int) (c.getLevelForXP(c.playerXP[3]) * 1.11);
      }
      c.getPA().refreshSkill(3);
      return;
    }
    if (itemId == 2528) {
      c.getItems().deleteItem(2528, 1);
      c.getPA().showInterface(2808);
    }
    // Begin artifacts by Hirukos
    if (itemId >= 14876 && itemId <= 14892) {
      int a = itemId;
      String YEYAF = "<col=1532693>You Exchanged Your Artifact For</col> ";
      if (a == 14876) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 10000000);
        c.sendMessage(YEYAF + "<col=1532693>10 million Coins!</col>");
      }
      if (a == 14877) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 2000000);
        c.sendMessage(YEYAF + "<col=1532693>2 million Coins!</col>");
      }
      if (a == 14878) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 1500000);
        c.sendMessage(YEYAF + "<col=1532693>1.5 million Coins!</col>");
      }
      if (a == 14879) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 1000000);
        c.sendMessage(YEYAF + "<col=1532693>1 million Coins!</col>");
      }
      if (a == 14880) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 800000);
        c.sendMessage(YEYAF + "<col=1532693>800,000 Coins!</col>");
      }
      if (a == 14881) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 600000);
        c.sendMessage(YEYAF + "<col=1532693>600,000 Coins!</col>");
      }
      if (a == 14882) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 540000);
        c.sendMessage(YEYAF + "<col=1532693>540,000 Coins!</col>");
      }
      if (a == 14883) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 400000);
        c.sendMessage(YEYAF + "<col=1532693>400,000 Coins!</col>");
      }
      if (a == 14884) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 300000);
        c.sendMessage(YEYAF + "<col=1532693>300,000 Coins!</col>");
      }
      if (a == 14885) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 200000);
        c.sendMessage(YEYAF + "<col=1532693>200,000 Coins!</col>");
      }
      if (a == 14886) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 150000);
        c.sendMessage(YEYAF + "<col=1532693>150,000 Coins!</col>");
      }
      if (a == 14887) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 100000);
        c.sendMessage(YEYAF + "<col=1532693>100,000 Coins!</col>");
      }
      if (a == 14888) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 80000);
        c.sendMessage(YEYAF + "<col=1532693>80,000 Coins!</col>");
      }
      if (a == 14889) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 60000);
        c.sendMessage(YEYAF + "<col=1532693>60,000 Coins!</col>");
      }
      if (a == 14890) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 40000);
        c.sendMessage(YEYAF + "<col=1532693>40,000 Coins!</col>");
      }
      if (a == 14891) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 20000);
        c.sendMessage(YEYAF + "<col=1532693>20,000 Coins!</col>");
      }
      if (a == 14892) {
        c.getItems().deleteItem(a, 1);
        c.getItems().addItem(995, 10000);
        c.sendMessage(YEYAF + "<col=1532693>10,000 Coins!</col>");
      }
    }
    // End of artifacts By Hirukos

    if (itemId == 5509) {
      c.getPA().addSmallPouch();
    }
    if (itemId == 5510) {
      c.getPA().addMediumPouch();
    }
    if (itemId == 5511) {
      c.getPA().addMediumPouch();
    }
    if (itemId == 5512) {
      c.getPA().addLargePouch();
    }
    if (itemId == 5513) {
      c.getPA().addLargePouch();
    }
    if (itemId == 5514) {
      c.getPA().addGiantPouch();
    }
    if (itemId == 5515) {
      c.getPA().addGiantPouch();
    }
    if (c.getHerblore().isUnidHerb(itemId)) c.getHerblore().handleHerbClick(itemId);
    if (c.getFood().isFood(itemId)) c.getFood().eat(itemId, itemSlot);
    // ScriptManager.callFunc("itemClick_"+itemId, c, itemId, itemSlot);
    if (c.getPotions().isPotion(itemId)) c.getPotions().handlePotion(itemId, itemSlot);
    if (Prayer.playerBones(c, itemId)) {
      Prayer.buryBones(c, itemId, itemSlot);
    }
    if (itemId == 952) {
      if (c.inArea(3553, 3301, 3561, 3294)) {
        c.teleTimer = 3;
        c.newLocation = 1;
      } else if (c.inArea(3550, 3287, 3557, 3278)) {
        c.teleTimer = 3;
        c.newLocation = 2;
      } else if (c.inArea(3561, 3292, 3568, 3285)) {
        c.teleTimer = 3;
        c.newLocation = 3;
      } else if (c.inArea(3570, 3302, 3579, 3293)) {
        c.teleTimer = 3;
        c.newLocation = 4;
      } else if (c.inArea(3571, 3285, 3582, 3278)) {
        c.teleTimer = 3;
        c.newLocation = 5;
      } else if (c.inArea(3562, 3279, 3569, 3273)) {
        c.teleTimer = 3;
        c.newLocation = 6;
      } else if (c.inArea(2986, 3370, 3013, 3388)) {
        c.teleTimer = 3;
        c.newLocation = 7;
      }
    }
  }
Esempio n. 30
0
 public static void useBonesOnAltar(Client c, int l, int i) {
   handleBones(c, i, true, c.getItems().getItemSlot(i));
 }