gt:                 switch (player.getOption()) {
context: package server.core.net.packet.impl;
  
  import java.util.logging.Logger;
  
  import server.core.net.buffer.PacketBuffer;
  import server.core.net.packet.PacketDecoder;
  import server.util.Misc;
  import server.world.entity.Gfx;
  import server.world.entity.npc.NpcDialogue;
  import server.world.entity.player.Player;
  import server.world.entity.player.content.TradeSession.TradeStage;
  import server.world.entity.player.skill.impl.Cooking;
  import server.world.entity.player.skill.impl.Runecrafting;
  import server.world.entity.player.skill.impl.Runecrafting.Altar;
  import server.world.map.Position;
  
  /**
   * Sent when the player clicks an action button.
   * 
   * @author lare96
   */
  public class DecodeClickButtonPacket extends PacketDecoder {
  
      /** A {@link Logger} for printing debugging info. */
      private static Logger logger = Logger.getLogger(DecodeClickButtonPacket.class.getSimpleName());
  
      @Override
      public void decode(Player player, PacketBuffer.ReadBuffer in) {
          int buttonId = Misc.hexToInt(in.readBytes(2));
  
          switch (buttonId) {
  
              /** Teleports. */
              case 50235:
              case 4140:
                  player.teleport(new Position(3094, 3243));
                  break;
              case 50245:
              case 4143:
                  NpcDialogue.fiveOptions(player, "Cat Pits", "Barrows", "Fight Pits", "Pest Control", "More");
                  break;
              // case 4146: // falador
              // player.teleport(new Position(2964, 3378));
              // break;
              // case 4150: // camelot
              // player.teleport(new Position(2757, 3477));
              // break;
              // case 6004: // ardougne
              // player.teleport(new Position(2529, 3307));
              // break;
              // case 6005: // watchtower
              // player.teleport(new Position(2951, 3087));
              // break;
              // case 29031: // trollheim
              // player.teleport(new Position(2892, 3670));
              // break;
              // case 72038: // ape atoll
              // player.teleport(new Position(2755, 2784));
              // break;
              // case 50253: // kharyrll
              //
              // break;
              // case 51005: // lassar
              //
              // break;
              // case 51013: // dareeyak
              //
              // break;
              // case 51023: // carrallangar
              //
              // break;
              // case 51031: // annakarl
              //
              // break;
              // case 51039: // ghorrock
              //
              // break;
              /** Prayers */
              case 21233:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.THICK_SKIN);
                  break;
              case 21234:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.BURST_OF_STRENGTH);
                  break;
              case 21235:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.CLARITY_OF_THOUGHT);
                  break;
              case 21236:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.ROCK_SKIN);
                  break;
              case 21237:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.SUPERHUMAN_STRENGTH);
                  break;
              case 21238:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.IMPROVED_REFLEXES);
                  break;
              case 21239:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.RAPID_RESTORE);
                  break;
              case 21240:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.RAPID_HEAL);
                  break;
              case 21241:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.PROTECT_ITEM);
                  break;
              case 21242:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.STEEL_SKIN);
                  break;
              case 21243:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.ULTIMATE_STRENGTH);
                  break;
              case 21244:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.INCREDIBLE_REFLEXES);
                  break;
              case 21245:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.PROTECT_FROM_MAGIC);
                  break;
              case 21246:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.PROTECT_FROM_MISSILES);
                  break;
              case 21247:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.PROTECT_FROM_MELEE);
                  break;
              case 2171:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.RETRIBUTION);
                  break;
              case 2172:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.REDEMPTION);
                  break;
              case 2173:
                  // Prayer.getSingleton().activatePrayer(player,
                  // CombatPrayer.SMITE);
                  break;
              /** End of Prayers */
  
              case 150:
                  player.setAutoRetaliate(true);
                  player.getPacketBuilder().sendMessage("Auto retaliate has been turned on!");
                  break;
              case 151:
                  player.setAutoRetaliate(false);
                  player.getPacketBuilder().sendMessage("Auto retaliate has been turned off!");
                  break;
              case 56109:
                  switch (player.getOption()) {
                      case 1:
                          Runecrafting.getSingleton().teleport(player, player.getRunecraftingNpc(), Runecrafting.RUNE_ESSENCE_MINE);
                          player.getPacketBuilder().closeWindows();
                          break;
                      case 6:
                          player.getPacketBuilder().closeWindows();
                          player.heal(99);
                          player.getPacketBuilder().sendMessage("You feel a magical aura pass through your body.");
                          player.gfx(new Gfx(436));
                          break;
                      case 7:
                          // start security tapes
                          break;
                  }
                  break;
              case 56110:
                  switch (player.getOption()) {
                      case 1:
                          NpcDialogue.fiveOptions(player, "Air", "Mind", "Water", "Earth", "Next");
                          player.setOption(2);
                          break;
                      case 6:
                      case 7:
                          player.getPacketBuilder().closeWindows();
                          break;
                  }
                  break;
  
              case 32017:
                  switch (player.getOption()) {
                      case 5:
                          Runecrafting.getSingleton().teleport(player, player.getRunecraftingNpc(), Altar.DEATH.getTeleport());
                          player.getPacketBuilder().closeWindows();
                          break;
                  }
                  break;
              case 32018:
                  switch (player.getOption()) {
                      case 5:
                          Runecrafting.getSingleton().teleport(player, player.getRunecraftingNpc(), Altar.BLOOD.getTeleport());
                          player.getPacketBuilder().closeWindows();
                          break;
                  }
                  break;
              case 32019:
                  switch (player.getOption()) {
                      case 5:
                          Runecrafting.getSingleton().teleport(player, player.getRunecraftingNpc(), Altar.SOUL.getTeleport());
                          player.getPacketBuilder().closeWindows();
                          break;
                  }
                  break;
              case 32020:
  