// TOWN SCRIPT
//    Town 39: Crypt of Drath, Level 2


// 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;
	if (get_flag(39,0) == 10)
		set_terrain(29,42,32);	
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 11;
	move_to_new_town(38,43,7);
break;

beginstate 12;
	move_to_new_town(38,35,18);
break;

beginstate 13;
	move_to_new_town(40,6,19);
break;

beginstate 14;
	if (get_flag(39,0) == 0)
		message_dialog("This closed iron gate is enormous. You try to lift it, but you have nowhere near the strength.","On the other side, you can see a stairway leading down into the shadows.");
	if ((get_flag(39,0) == 2) || (get_flag(39,0) == 8))
		message_dialog("This iron gate is enormous. You try to lift it, but you have nowhere near the strength. It has been opened a few inches, but not far enough for you to slide under it.","On the other side, you can see a stairway leading down into the shadows.");
break;
