Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package server.game.content.dialogue.teleport;
- import server.game.content.dialogue.Dialogue;
- import server.game.content.dialogue.Type;
- import server.game.content.teleport.TeleportExecutor;
- import server.game.world.Position;
- public class BossTeleportDialogue extends Dialogue
- {
- /**
- * An array for all the dialogue strings.
- */
- private static final String OPTION_1 =
- {
- "Barrelchest",
- "Godwars Dungeon",
- "Kalphite Queen",
- "King Black Dragon [@red@Wildy@bla@]",
- "[More]"
- };
- private static final String OPTION_2 =
- {
- "Chaos Elemental [@red@Wildy@bla@]",
- "Dagannoth Kings",
- "Giant Mole",
- "Kraken",
- "[Back]"
- };
- /**
- * An array for all corresponding dialogue strings which holds all the teleport locations.
- */
- private static final int[][] OPTION_1_TELEPORT =
- {
- { 2983, 9516, 1 }, //Barrelchest
- { 2871, 5317, 2 }, //Godwars Dungeon
- { 3480, 9484, 0 }, //Kalphite Queen
- { 3007, 3849, 0 }, //King Black Dragon
- { 0, 0, 0 } //More
- };
- private static final int[][] OPTION_2_TELEPORT =
- {
- { 3295, 3921, 0 }, //Chaos Elemental
- { 1891, 4409, 0 }, //Dagannoth King
- { 1771, 5167, 0 }, //Giant Mole
- { 2340, 3686, 0 }, //Kraken
- { 0, 0, 0 } //More
- };
- @Override
- protected void start(Object... parameters)
- {
- send(Type.CHOICE, DEFAULT_OPTION_TITLE, OPTIONS_1[0], OPTIONS_1[1], OPTIONS_1[2], OPTIONS_1[3], OPTIONS_1[4]);
- }
- @Override
- public void select(int index)
- {
- System.out.println("Phase: " + phase + ", Index: " + index);
- if (phase == 0)
- {
- if (index == 5)
- {
- phase = 1;
- send(Type.CHOICE, DEFAULT_OPTION_TITLE, OPTIONS_2[0], OPTIONS_2[1], OPTIONS_2[2], OPTIONS_2[3], OPTIONS_2[4]);
- } else {
- TeleportExecutor.teleport(player, new Position(OPTIONS_1[0], OPTION_1[1], OPTION_1[2], OPTION_1[3]));
- }
- } else if (phase == 1)
- {
- if (index == 5)
- {
- phase = 0;
- send(Type.CHOICE, DEFAULT_OPTION_TITLE, OPTIONS_1[0], OPTIONS_1[1], OPTIONS_1[2], OPTIONS_1[3], OPTIONS_1[4]);
- } else {
- TeleportExecutor.teleport(player, new Position(OPTIONS_2[0], OPTIONS_2[1], OPTIONS_2[2], OPTIONS_2[3]));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement