package com.rs.game.player.dialogues.impl;

import com.rs.game.WorldTile;
import com.rs.game.player.Skills;
import com.rs.game.player.content.Magic;
import com.rs.game.player.dialogues.Dialogue;

public class GelatinMaskTeleportD extends Dialogue {
    
	int npcId = 1637;

	@Override
	public void start() {
		sendNPCDialogue(1637, 9827, "Greeting mortal,", " would you like to teleport?" );
	}

	@Override
	public void run(int interfaceId, int componentId) {
		switch (stage) {
		case -1:
			stage = 0;
			sendOptionsDialogue(DEFAULT_OPTIONS_TITLE, "Fuck yea!", "That's a hell no from me.");
			break;
		case 0:
			if (componentId == OPTION_2) {
				stage = 1;
				sendPlayerDialogue(ANGERY, "That's a hell no from me.");
			} else {
				stage = 2;
				sendPlayerDialogue(HAPPY, "Fuck yea!");
			}
			break;
		case 1:
			stage = -2;
			sendNPCDialogue(1637, SAD, "Very well. Come back if you change your mind.");
			break;
		case 2:
		    	stage = 3;
		    	sendNPCDialogue(1637, HAPPY, "You have chosen well mortal,", " Where is you want to go?" );
			break;
		case 3:
			stage = 4;
			sendOptionsDialogue("Select A Location", "Fremennik Dungeon Jelly's.", "Chaos Tunnel Jelly's.", "Mahjarrat Cave Jelly's.", "Nevermind.");
			break;
		case 4:
			if (componentId == OPTION_1) {
			    if (player.getSkills().getLevel(Skills.SLAYER) < 52) {
				player.getPackets().sendGameMessage("You need a Slayer level of 52 to teleport.",
					true);
				return;
			    }
			    Magic.sendSlayerMaskTeleportSpell(player, 0, 0.0D, new WorldTile(2702, 10026, 0), new int[0]);
			player.closeInterfaces();
			} else if (componentId == OPTION_2) {
			    if (player.getSkills().getLevel(Skills.SLAYER) < 52) {
				player.getPackets().sendGameMessage("You need a Slayer level of 52 to teleport.",
					true);
				return;
			    }
			    Magic.sendSlayerMaskTeleportSpell(player, 0, 0.0D, new WorldTile(3280, 5452, 0), new int[0]);
			player.closeInterfaces();
			} else if (componentId == OPTION_3) {
			    if (player.getSkills().getLevel(Skills.SLAYER) < 52) {
				player.getPackets().sendGameMessage("You need a Slayer level of 52 to teleport.",
					true);
				return;
			    }
			    Magic.sendSlayerMaskTeleportSpell(player, 0, 0.0D, new WorldTile(2835, 10340, 0), new int[0]);
			player.closeInterfaces();
			} else if (componentId == OPTION_4) {
			player.closeInterfaces();
			}
			break;
		default:
			end();
			break;
		}
	}
	
	@Override
	public void finish() {
		// Leave This Alone

	}
}
