Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.rs.game.player.dialogues.impl;
- import com.rs.game.item.Item;
- import com.rs.game.player.content.ItemTransportation;
- import com.rs.game.player.dialogues.Dialogue;
- public class Transportation extends Dialogue {
- @Override
- public void start() {
- String[] locations = (String[]) parameters[0];
- if (locations.length >= 5)
- sendOptionsDialogue("Where would you like to teleport to", locations[0], locations[1], locations[2],
- locations[3], locations[4]);
- else if (locations.length >= 4)
- sendOptionsDialogue("Where would you like to teleport to", locations[0], locations[1], locations[2],
- locations[3]);
- else if (locations.length >= 3)
- sendOptionsDialogue("Where would you like to teleport to", locations[0], locations[1], locations[2]);
- else if (locations.length >= 2)
- sendOptionsDialogue("Where would you like to teleport to", locations[0], locations[1]);
- else
- sendOptionsDialogue("Where would you like to teleport to", locations[0], "No where");
- }
- @Override
- public void run(int interfaceId, int componentId) {
- String[] locations = (String[]) parameters[0];
- int option = componentId == OPTION_1 ? 0 : ((componentId - OPTION_1) + 1);
- ItemTransportation.sendTeleport(player, (Item) parameters[1], option, false,
- (locations[locations.length - 1].equals("Nowhere") ? locations.length - 1 : locations.length),
- (boolean) parameters[2]);
- end();
- }
- @Override
- public void finish() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment