/*     */   public static void applyPlayerAction(String action)
/*     */   {
/* 360 */     Player p = PlayerList.getInstance().getPlayer(Config.USERNAME);
/* 361 */     p.setPlayerAction("");
/*     */ 
/* 365 */     if (action.startsWith("openShop"))
/*     */     {
/* 367 */       int shopId = Integer.parseInt(action.substring(8));
/* 368 */       GamePanel.getInstance().openShop(new ShopGui(ShopList.getInstance().getShop(shopId)));
/*     */     }
/* 370 */     if (action.equals("climbLadder"))
/*     */     {
/* 372 */       p.telePlayer(545, 98);
/* 373 */       p.setPlayerAction("");
/*     */     }
/* 375 */     else if (action.equals("climbDownLadder"))
/*     */     {
/* 377 */       p.telePlayer(558, 448);
/* 378 */       p.setPlayerAction("");
/*     */     }
/* 380 */     else if (action.equals("fixBridge"))
/*     */     {
/* 382 */       if (PlayerList.getInstance().getPlayer(Config.USERNAME).getFlagValue("fixedBridgeCamp2") != null)
/*     */       {
/* 384 */         p.setCanWalk(false);
/* 385 */         Command.getInstance().teleportPlayer(12, 44, 291);
/*     */       }
/*     */       else
/*     */       {
/* 389 */         InputBox input = new InputBox();
/* 390 */         input.setTitleAndMessage("Repair Bridge?", "To repair the bridge, you need a hammer with 5 bronze bars.");
/* 391 */         input.setNumberOfOptions(1);
/* 392 */         input.setOption("Fix", 0, "fixCamp2Bridge");
/* 393 */         input.init(false);
/* 394 */         GamePanel.getInstance().openInputBox(input);
/*     */       }
/*     */ 
/*     */     }
/* 398 */     else if (action.equals("smelt"))
/*     */     {
/* 401 */       InputBox inputbox = new InputBox();
/* 402 */       inputbox.setTitleAndMessage("Smelting", "Which ore do you wish to smelt in to bars?");
/* 403 */       inputbox.setNumberOfOptions(5);
/* 404 */       inputbox.setOption("Smelt Copper Ore", 0, "smelt_copper");
/* 405 */       inputbox.setOption("Smelt Iron Ore", 1, "smelt_iron");
/* 406 */       inputbox.setOption("Smelt Silver Ore", 2, "smelt_silver");
/* 407 */       inputbox.setOption("Smelt Gold Ore", 3, "smelt_gold");
/* 408 */       inputbox.setOption("Smelt Titanium Ore", 4, "smelt_titanium");
/* 409 */       inputbox.init(false);
/* 410 */       GamePanel.getInstance().openInputBox(inputbox);
/*     */     }
/* 412 */     else if (action.equals("smith"))
/*     */     {
/* 415 */       InputBox inputbox = new InputBox();
/* 416 */       inputbox.setTitleAndMessage("Smelting", "What type of bar do you with to use?");
/* 417 */       inputbox.setNumberOfOptions(5);
/* 418 */       inputbox.setOption("Bronze", 0, "smith_bronze");
/* 419 */       inputbox.setOption("Iron", 1, "smith_iron");
/* 420 */       inputbox.setOption("Silver", 2, "smith_silver");
/* 421 */       inputbox.setOption("Gold", 3, "smith_gold");
/* 422 */       inputbox.setOption("Titanium", 4, "smith_titanium");
/* 423 */       inputbox.init(false);
/* 424 */       GamePanel.getInstance().openInputBox(inputbox);
/*     */     }
/* 426 */     else if (action.equals("enterMiningGuild"))
/*     */     {
/* 428 */       InputBox inputbox = new InputBox();
/* 429 */       inputbox.setTitleAndMessage("Mining Guild", "You must have a mining level of at least 35 to enter the guild.");
/* 430 */       inputbox.setNumberOfOptions(1);
/* 431 */       inputbox.setOption("Enter", 0, "enterMiningGuild");
/* 432 */       inputbox.init(false);
/* 433 */       GamePanel.getInstance().openInputBox(inputbox);
/*     */     }
/* 435 */     else if (action.equals("trainMiningGuild"))
/*     */     {
/* 437 */       InputBox inputbox = new InputBox();
/* 438 */       inputbox.setTitleAndMessage("Train Operator", "Hello ! Would you like to ride the train to the desert?  It only costs 1000 coins.<br /><br /><b>Warning: Monsters level 30+ roam the desert</b>");
/* 439 */       inputbox.setNumberOfOptions(1);
/* 440 */       inputbox.setOption("Take me there!", 0, "rideTrainToDesert");
/* 441 */       inputbox.init(true);
/* 442 */       GamePanel.getInstance().openInputBox(inputbox);
/*     */     }
/*     */     else {
/* 445 */       Command.getInstance().sendCommand(action, "");
/*     */     }
/*     */   }