Posted November 18, 20186 yr comment_25067 This is for the Underwall Tunnel at the Grand Exchange. In your ObjectHandler, you will want to place these two methods (preferably under HandleOption5, somewhere): public static void climbTunnel(final Player player, final boolean goingIn) { if (player.getBoneDelay() > Utils.currentTimeMillis()) return; player.addBoneDelay(150); if (!goingIn) { player.addWalkSteps(3144, 3514, 0, false); player.setNextWorldTile(new WorldTile(3143, 3514, 0)); player.setNextAnimation(new Animation(2589)); } else { player.addWalkSteps(3138, 3516, 0, false); player.setNextWorldTile(new WorldTile(3139, 3516, 0)); player.setNextAnimation(new Animation(2589)); } player.getPackets().sendGameMessage("Climb into the tunnel..."); WorldTasksManager.schedule(new WorldTask() { @Override public void run() { if (!goingIn) { player.addBoneDelay(3000); //5sec-2sec=3sec walkTunnel(player, false); } else { player.addBoneDelay(3000); //5sec-2sec=3sec walkTunnel(player, true); } stop(); } }, 2); } public static void walkTunnel(final Player player, final boolean goingIn) { if (!goingIn) { player.setNextAnimation(new Animation(2591)); player.setNextWorldTile(new WorldTile(3139, 3516, 0)); } else { player.setNextAnimation(new Animation(2591)); player.setNextWorldTile(new WorldTile(3143, 3514, 0)); } player.getPackets().sendGameMessage((goingIn) ? "...and end up inside the Grand Exchange" : "...and end up outside the Grand Exchange."); WorldTasksManager.schedule(new WorldTask() { @Override public void run() { if (!goingIn) { player.addWalkSteps(3138, 3516, 0, false); } else { player.addWalkSteps(3144, 3514, 0, false); } stop(); } }); } Then, in your HandleOption1 method, inside ObjectHandler, add this: } else if (id == 9311 && object.getX() == 3139 && object.getY() == 3516) { climbTunnel(player, true); // GE Tunnel outside to inside } else if (id == 9312 && object.getX() == 3143 && object.getY() == 3514) { climbTunnel(player, false); // GE Tunnel inside to outside
Create an account or sign in to comment