示例#1
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;
      }
    }
  }
示例#2
0
  @Override
  public void processPacket(Client c, int packetType, int packetSize) {
    c.getInStream().readSignedWordBigEndianA();
    int itemSlot = c.getInStream().readUnsignedWordA();
    int itemId = c.getInStream().readUnsignedWordBigEndian();
    if (!c.getItems().playerHasItem(itemId, 1)) { // , itemSlot
      return;
    }
    if (itemId != c.playerItems[itemSlot] - 1) {
      return;
    }
    if (itemId >= 5509 && itemId <= 5514) {
      Pouches.fillEssencePouch(c, itemId);
      return;
    }
    //		if (itemId == 11941) {
    //			c.getBag().showContents(c);
    //			c.showLootingBagContents();
    //		}
    TabData tabData = TabData.forId(itemId);
    if (tabData != null) c.getTablet().useTeleTab(c, itemSlot, tabData);
    if (itemId == 3144) {
      if (c.duelRule[6]) {
        c.sendMessage("You may not eat in this duel.");
        return;
      }
      if ((System.currentTimeMillis() - c.karamDelay >= 2000) && c.playerLevel[3] > 0) {
        c.getCombat().resetPlayerAttack();
        c.attackTimer += 2;
        c.startAnimation(829);
        c.getItems().deleteItem(itemId, itemSlot, 1);
        if (c.playerLevel[3] < c.getLevelForXP(c.playerXP[3])) {
          c.playerLevel[3] += 18;
          if (c.playerLevel[3] > c.getLevelForXP(c.playerXP[3]))
            c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]);
        }
        c.karamDelay = System.currentTimeMillis();
        c.getPA().refreshSkill(3);
        c.sendMessage("You eat the karambwan.");
        return;
      }
    }
    if (itemId == 11740) {
      if (c.getItems().freeSlots() > 0 && c.getItems().playerHasItem(11740, 1)) {
        c.getItems().deleteItem(11740, 1);
        c.getItems().addItem(11230, 500);
        c.sendMessage("You have received 500 Dragon Darts.");
      } else if (c.getItems().freeSlots() == 0 && c.getItems().playerHasItem(11740, 1)) {
        c.getItems().deleteItem(11740, 1);
        c.getItems().addItemToBank(11230, 500);
        c.sendMessage("You have received 500 Dragon Darts.");
      }
    }
    if (itemId == 3801) {
      c.startAnimation(1330);
      c.forcedChat("Arghh! Matey... That's some tasty Rum!");
      c.getPA().requestUpdates();
    }
    if (itemId == 761) {
      if (c.time <= 0) {
        c.getItems().deleteItem(itemId, 1);
        c.doubleEXPTicket(1800);
      } else {
        c.sendMessage("You currently already have double experience.");
      }
    }
    if (itemId == 455) {
      c.bossPasses += 5;
      c.getItems().deleteItem(itemId, 1);
      c.sendMessage(
          "You now have "
              + c.bossPasses
              + " free boss passes! You can use this for Zulrah and other upcoming bosses!");
    }
    /*
     * if (itemId == 952) { c.getBarrows().spadeDigging();
     * c.sendMessage("This is in progress.."); return; }
     */
    // Dice bag
    if (itemId == 5073) {
      c.getItems().addItem(5075, 1);
      c.getItems().handleNests(itemId);
    }
    if (itemId == 7509 && c.playerLevel[c.playerHitpoints] >= 1) {
      c.startAnimation(829);
      c.dealDamage(1);
      c.handleHitMask(1);
      c.forcedChat("Ow! I nearly broke a tooth!");
      c.getPA().refreshSkill(3);
    }
    if (itemId == 1917) {
      c.startAnimation(2770);
      c.sendMessage("You drink the beer.");
      c.playerStandIndex = 2770;
      c.playerTurnIndex = 2769;
      c.playerWalkIndex = 2769;
      c.playerTurn180Index = 2769;
      c.playerTurn90CWIndex = 2769;
      c.playerTurn90CCWIndex = 2769;
      c.playerRunIndex = 2769;
      c.updateRequired = true;
      c.getPA().walkableInterface(14600);
      c.getItems().deleteItem(1917, 1);
    }
    /* Mystery box */
    MysteryBox.handleBox(c, itemId);
    /** Hard Clue Scroll * */
    if (itemId == 2714) { // Easy Clue Scroll Casket
      c.getItems().deleteItem(itemId, 1);
      c.getPA().addClueReward(c, 0);
    }
    if (itemId == 2802) { // Medium Clue Scroll Casket
      c.getItems().deleteItem(itemId, 1);
      c.getPA().addClueReward(c, 1);
    }
    if (itemId == 2775 || itemId == 2789) { // Hard Clue Scroll Casket
      c.getItems().deleteItem(itemId, 1);
      c.getPA().addClueReward(c, 2);
    }
    if (itemId == 2713) {
      c.getPA().showInterface(17537);
    }
    if (itemId == 2712) {
      c.getPA().showInterface(9043);
    }
    if (itemId == 2711) {
      c.getPA().showInterface(7271);
    }
    if (itemId == 2710) {
      c.getPA().showInterface(7045);
    }
    if (itemId == 2709) {
      c.getPA().showInterface(9275);
    }
    if (itemId == 2708) {
      c.getPA().showInterface(7113);
    }
    if (itemId == 2707) {
      c.getPA().showInterface(17634);
    }
    if (itemId == 2706) {
      c.getPA().showInterface(17620);
    }
    if (itemId == 2705) {
      c.getPA().showInterface(4305);
    }
    if (itemId == 2704) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("In a lair of a Boss lies", 6971);
      c.getPA().sendNewString("the next clue scroll!", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2703) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("I seek another cluse just", 6971);
      c.getPA().sendNewString("west of the fountain, at the origin!", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2702) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("We are here lying to protect", 6971);
      c.getPA().sendNewString("the castle that we truely love!", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2701) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("This has to be bob's favorite", 6971);
      c.getPA().sendNewString("training spot in-game.", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2700) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("We all love water, especially", 6971);
      c.getPA().sendNewString("from big, clean, fountains!", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2699) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("near the wilderness", 6971);
      c.getPA().sendNewString("where the road begins to end.", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2698) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("We stall seek history within", 6971);
      c.getPA().sendNewString("the ancient museum.", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2697) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("We party with pete", 6971);
      c.getPA().sendNewString("within a city named ....", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2696) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("The Mage Of Change!", 6971);
      c.getPA().sendNewString("Go Find him at varrock!", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2695) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("These fish must be hot!", 6971);
      c.getPA().sendNewString("We shall call this, Lava Fishing", 6972);
      c.getPA().showInterface(6965);
    }
    // if(itemId == 2694) {
    // c.sendMessage("My loved one..Once murdered in front of my eyes..I couldn't save her..");
    // }
    if (itemId == 2693) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("This village contains torches,", 6971);
      c.getPA().sendNewString("rocks, and some kind of stronghold.", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2692) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("We shall thieve Master Farmers!", 6971);
      c.getPA().sendNewString("I wonder where I can find them...", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2691) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("arggggghhh mate,", 6971);
      c.getPA().sendNewString("Would you like some beer?", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2690) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("Can'd fish!", 6971);
      c.getPA().sendNewString("Lies the next clue or casket matey!!", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2689) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("Ew, a scorpian.", 6971);
      c.getPA().sendNewString("Why are these mines so messed up!", 6972);
      c.getPA().showInterface(6965);
    }
    if (itemId == 2688) {
      for (int i = 6968; i < 6976; i++) {
        c.getPA().sendNewString("", i);
      }
      c.getPA().sendNewString("You Can Duel.", 6971);
      c.getPA().sendNewString("But You seek Truesure at the bank?", 6972);
      c.getPA().showInterface(6965);
    }
    /** Hard Clue Scroll * */
    if (c.safeAreas(2969, 3411, 2974, 3415) & (c.getItems().playerHasItem(2713, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2713, c.getItems().getItemSlot(2713), 1);
      c.getItems().addItem(2712, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(2613, 3075, 2619, 3080) & (c.getItems().playerHasItem(2712, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2712, c.getItems().getItemSlot(2712), 1);
      c.getItems().addItem(2711, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3030, 3394, 3049, 3401) & (c.getItems().playerHasItem(2711, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2711, c.getItems().getItemSlot(2711), 1);
      c.getItems().addItem(2775, 1);
      c.sendMessage("You recieve a HARD Casket!");
    } else if (c.safeAreas(3285, 3371, 3291, 3375) & (c.getItems().playerHasItem(2710, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2710, c.getItems().getItemSlot(2710), 1);
      c.getItems().addItem(2709, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3106, 3148, 3113, 3154) & (c.getItems().playerHasItem(2709, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2709, c.getItems().getItemSlot(2709), 1);
      c.getItems().addItem(2775, 1);
      c.sendMessage("You recieve a HARD Casket!");
    } else if (c.safeAreas(3092, 3213, 3104, 3225) & (c.getItems().playerHasItem(2708, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2708, c.getItems().getItemSlot(2708), 1);
      c.getItems().addItem(2775, 1);
      c.sendMessage("You recieve a HARD Casket!");
    } else if (c.safeAreas(2721, 3337, 2724, 3342) & (c.getItems().playerHasItem(2707, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2707, c.getItems().getItemSlot(2707), 1);
      c.getItems().addItem(2706, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3016, 3907, 3026, 3915) & (c.getItems().playerHasItem(2706, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2706, c.getItems().getItemSlot(2706), 1);
      c.getItems().addItem(2705, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(2903, 3287, 2909, 3300) & (c.getItems().playerHasItem(2705, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2705, c.getItems().getItemSlot(2705), 1);
      c.getItems().addItem(2775, 1);
      c.sendMessage("You recieve a HARD Casket!");
      /** Easy Clue Scrolls * */
    } else if (c.safeAreas(2259, 4680, 2287, 4711) & (c.getItems().playerHasItem(2704, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2704, c.getItems().getItemSlot(2704), 1);
      c.getItems().addItem(2703, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3217, 3207, 3225, 3213) & (c.getItems().playerHasItem(2703, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2703, c.getItems().getItemSlot(2703), 1);
      c.getItems().addItem(2702, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(2962, 3331, 2987, 3351) & (c.getItems().playerHasItem(2702, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2702, c.getItems().getItemSlot(2702), 1);
      c.getItems().addItem(2714, 1);
      c.sendMessage("You recieve a EASY Casket!");
    } else if (c.safeAreas(3253, 3256, 3265, 3296) & (c.getItems().playerHasItem(2701, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2701, c.getItems().getItemSlot(2701), 1);
      c.getItems().addItem(2700, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3208, 3421, 3220, 3435) & (c.getItems().playerHasItem(2700, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2700, c.getItems().getItemSlot(2700), 1);
      c.getItems().addItem(2699, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3084, 3486, 3086, 3488) & (c.getItems().playerHasItem(2699, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2699, c.getItems().getItemSlot(2699), 1);
      c.getItems().addItem(2698, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3253, 3445, 3261, 3453) & (c.getItems().playerHasItem(2698, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2698, c.getItems().getItemSlot(2698), 1);
      c.getItems().addItem(2714, 1);
      c.sendMessage("You recieve a EASY Casket!");
      /** Medium Clue Scrolls * */
    } else if (c.safeAreas(2953, 3365, 2977, 3392) & (c.getItems().playerHasItem(2697, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2697, c.getItems().getItemSlot(2697), 1);
      c.getItems().addItem(2696, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3202, 3424, 3259, 9873) & (c.getItems().playerHasItem(2696, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2696, c.getItems().getItemSlot(2696), 1);
      c.getItems().addItem(2695, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(2875, 9763, 2904, 9776) & (c.getItems().playerHasItem(2695, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2695, c.getItems().getItemSlot(2695), 1);
      c.getItems().addItem(2802, 1);
      c.sendMessage("You recieve a MEDIUM Casket!");
    } else if (c.safeAreas(3074, 3407, 3085, 3436) & (c.getItems().playerHasItem(2693, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2693, c.getItems().getItemSlot(2693), 1);
      c.getItems().addItem(2692, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3074, 3245, 3085, 3255) & (c.getItems().playerHasItem(2692, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2692, c.getItems().getItemSlot(2692), 1);
      c.getItems().addItem(2691, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3044, 3255, 3055, 3259) & (c.getItems().playerHasItem(2691, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2691, c.getItems().getItemSlot(2691), 1);
      c.getItems().addItem(2802, 1);
      c.sendMessage("You recieve a MEDIUM Casket!");
    } else if (c.safeAreas(3506, 3496, 3508, 3497) & (c.getItems().playerHasItem(2690, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2690, c.getItems().getItemSlot(2690), 1);
      c.getItems().addItem(2689, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3032, 9756, 3056, 9804) & (c.getItems().playerHasItem(2689, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2689, c.getItems().getItemSlot(2689), 1);
      c.getItems().addItem(2688, 1);
      c.sendMessage("You recieve another scroll.");
    } else if (c.safeAreas(3381, 3268, 3382, 3269) & (c.getItems().playerHasItem(2688, 1))) {
      c.getPA().removeAllWindows();
      c.getItems().deleteItem(2688, c.getItems().getItemSlot(2688), 1);
      c.getItems().addItem(2802, 1);
      c.sendMessage("You recieve a MEDIUM Casket!");
    }
    if (itemId == 405) {
      if (c.getItems().playerHasItem(405, 1)) {
        c.getItems().deleteItem(405, 1);
        c.getItems().addItem(995, 2500000);
      }
    }
    if (itemId == 13192) {
      if (c.getItems().playerHasItem(13192, 1)) {
        c.getItems().deleteItem(13192, 1);
        c.donPoints += 1000;
        c.playerRights = 4;
        c.logout();
      }
    }
    if (itemId == 13190) {
      if (c.getItems().playerHasItem(13190, 1)) {
        c.getItems().deleteItem(13190, 1);
        c.getItems().addItemToBank(761, 1);
        c.donPoints += 2000;
        c.playerRights = 5;
        c.logout();
      }
    }
    if (itemId == 13187) {
      if (c.getItems().playerHasItem(13187, 1)) {
        c.getItems().deleteItem(13187, 1);
        c.getItems().addItemToBank(12892, 1);
        c.getItems().addItemToBank(761, 2);
        c.donPoints += 5000;
        c.playerRights = 6;
      }
    }

    if (itemId == 6950) {
      if (c.playerMagicBook == 0) {
        if (c.playerLevel[6] >= 94) {
          if (System.currentTimeMillis() - c.lastVeng > 30000) {
            c.vengOn = true;
            c.lastVeng = System.currentTimeMillis();
            c.startAnimation(4410);
            c.gfx100(726);
          } else {
            c.sendMessage("You have to wait 30 seconds before you can use this spell again.");
          }
        } else {
          c.sendMessage("Your magic level has to be over 94 to use this spell.");
        }
      } else {
        c.sendMessage("You must be on the regular spellbook to use this spell.");
      }
    }

    if (itemId == 5073) {
      // c.getItems().addItem(5075, 1);
      // c.getItems().deleteItem(5073, 1);
      // c.getItems().handleNests(itemId);
    }
    if (itemId >= 5509 && itemId <= 5514) {
      int pouch = -1;
      int a = itemId;
      if (a == 5509) pouch = 0;
      if (a == 5510) pouch = 1;
      if (a == 5512) pouch = 2;
      if (a == 5514) pouch = 3;
      c.getPA().fillPouch(pouch);
      return;
    }
    if (itemId == 15084) {
      if (System.currentTimeMillis() - c.diceDelay >= 5000 && c.playerRights == 3
          || c.playerRights == 8) {
        /*c.clan.sendDiceChat(c, " has rolled a " + Misc.random(100)
        		+ " on the percentile dice.");
        c.startAnimation(827);
        c.diceDelay = System.currentTimeMillis();*/
        c.sendMessage("This feature is currently disabled");
      }
    }
    if (Cleaning.handleCleaning(c, itemId, itemSlot)) return;
    /*
     * if (c.getHerblore().isUnidHerb(itemId))
     * c.getHerblore().handleHerbClick(itemId);
     */
    if (c.getFood().isFood(itemId)) c.getFood().eat(itemId, itemSlot);
    if (c.getPrayer().isBone(itemId)) c.getPrayer().buryBone(itemId, itemSlot);
    if (c.getPotions().isPotion(itemId)) c.getPotions().handlePotion(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; } }
     */
    if (c.getHerblore().isUnidHerb(itemId)) c.getHerblore().handleHerbClick(itemId);
    // ScriptManager.callFunc("itemClick_"+itemId, c, itemId, itemSlot);
    if (c.getPrayer().isBone(itemId)) c.getPrayer().buryBone(itemId, itemSlot);
    if (itemId == 952) {
      c.getBarrows().spadeDigging();
      return;
    }
  }