begintownscript;

variables;
short choice;

body;

beginstate INIT_STATE;
	if(get_flag(10,10) == 1)
		set_terrain(10,10,0);
	if(get_flag(24,21) == 1)
		set_terrain(24,21,0);
	if(get_flag(24,8) == 1)
		set_terrain(24,8,0);
	if(get_flag(22,7) == 1)
		set_terrain(22,7,0);
	if(get_flag(4,1) == 1)
		set_terrain(8,11,378);
break;

beginstate START_STATE;
	if(char_on_loc(13,7) > -1){
		put_sparkles_on_char(char_on_loc(13,7),7,7);
		run_animation_sound(42);

		kill_char(char_on_loc(13,7),2,0);
		print_str_color("Another one bites the dust.",1);
		}
break;

beginstate EXIT_STATE;
break;

beginstate 10; //warning
	if(get_flag(4,0) == 0){
		message_dialog("You feel a wave of power wash over you, singeing the hairs off your limbs and causing the water in your skin to boil.  There is something dangerous about the space encircled by runes.","");
		set_flag(4,0,1);
		}
break;

beginstate 11; //doom trap
	if(get_flag(4,1) == 0){
		message_dialog("As you cross the clearly enchanted rune, you are met with a triumphant and familar roar from the north.  Skeletons begin to rise from the pile of bones to your sides.","");
		activate_hidden_group(1);
		set_terrain(8,11,378);
		block_entry(1);
		set_flag(4,1,1);
		}
break;

beginstate 12; //room
	if(get_flag(4,2) == 0){
		message_dialog("You appear to have broken into the evil necromancer's equally evil bed chambers.  For someone who raises the dead, this room sure is poorly decorated.","");
		set_flag(4,2,1);
		}
break;

beginstate 13; //ghosts
	if(get_flag(4,3) == 0){
		message_dialog("Suddenly, the room grows very cold - too cold.  Some spirits materialize out of thin air and begin to scream at you.  They might be hostile.","");
		activate_hidden_group(2);
		set_flag(4,3,1);
		}
break;

beginstate 20;	
	put_sparkles_on_char(char_on_loc(13,7),7,7);
	run_animation_sound(42);

	kill_char(char_on_loc(13,7),2,0);
	print_str_color("Another one bites the dust.",1);
break;

beginstate 30;
	move_to_new_town(3,14,14);
break;