// TOWN SCRIPT
//    Town 65: Prison of Grah Hoth

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documenation. States you write
// yourself should be numbered from 10-100.

begintownscript;

variables;

int i,j,k,r1,choice;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
	reset_dialog();
	add_dialog_str(0,"You can see a circle of painted runes on the floor in the middle of this chamber.",0);
	add_dialog_str(1,"When you get close to the entrance, they start to glow red. The air starts to feel warm. Could be a trap.",0);
	add_dialog_choice(0,"Leave.");
	add_dialog_choice(1,"Enter the room.");
	choice = run_dialog(1);
	if (choice == 1) {
	block_entry(1);
			end();
	}
	if (choice == 2) {
	set_terrain(10,40,0);
	set_terrain(21,15,0);	
	message_dialog("When you enter the room, the runes suddenly stop glowing. The air turns cool again. Nothing else happens.","");	
	}
break;

beginstate 11;
	teleport_party(get_flag(200,1),get_flag(200,2),0);	
break;

