begintownscript;

variables;
short bmessage;

body;
beginstate INIT_STATE;

reset_dialog();
add_dialog_str(0,"There isn't a lot to this remote village. A couple of houses, what looks like a shop, an inn, and a small church. It's barely big enough to be considered a village.",0);
add_dialog_str(1,"At first you thought there was nobody here, but there is a bonfire lit in front of the inn, and there are lights in the windows.",0);
add_dialog_str(2,"Hopefully the food at the inn is good.",0);
add_dialog_choice(0,"Okay.");
bmessage = run_dialog(1);

set_name(8,"Burt");
set_name(7,"Jen");
set_name(6,"Innkeeper");
break;

beginstate START_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate 10;
	if(get_flag(1,1) == 0){
	reset_dialog();
	add_dialog_str(0,"This building looks like it was once a shop. It's closed now, and a layer of dust covers everything.",0);
	bmessage = run_dialog(1);
	set_flag(1,1,1);
	}
break;

beginstate 11;
if(get_flag(1,2) == 0){
	reset_dialog();
	add_dialog_str(0,"There is a small, dusty chapel here. It's old and disused. The altar is a simple stone slab.",0);
	add_dialog_str(1,"It isn't much, but it must do for the townspeople.",0);
	bmessage = run_dialog(1);
	set_flag(1,2,1);
}
break;

beginstate 12;
	if(get_flag(1,3) == 0){
		reset_dialog();
		add_dialog_str(0,"This is the village inn. It's very small, and not well furnished, but it's much better than being out in the elements.",0);
		add_dialog_str(1,"The people barely notice you come in. They all seem to stare glumly ahead. Even the innkeeper doesn't seem very happy to see more customers. Maybe there's been a death or something.",0);
		add_dialog_str(2,"The only person who reacts at all is the woman at the far table who waves as you come in.",0);
		bmessage = run_dialog(1);
		set_flag(1,3,1);
	}
break;

beginstate 13;
	if(get_flag(1,4) == 0){
		reset_dialog();
		add_dialog_str(0,"There is a musty and poorly lit back room here. A sign in sheet sits on a desk with no one behind it. An empty bookcase covers up some of the peeling wall paper.",0);
		add_dialog_str(1,"The stairs up are in the far corner of the room.",0);
		bmessage = run_dialog(1);
		set_flag(1,4,1);
	}
break;

beginstate 14;
	reset_dialog();
	add_dialog_str(0,"There is a trap door leading down to the cellers. You have no reason to go down though.",0);
	bmessage = run_dialog(1);
	block_entry(1);
break;

beginstate 15;
	move_to_new_town(2,14,12);
break;

beginstate 16;
	if(get_flag(1,6) == 0){
	reset_dialog();
	add_dialog_str(0,"You haven't bought a room yet, so you shouldn't go up.",0);
	bmessage = run_dialog(1);
	block_entry(1);
	}
break;

beginstate 17;
	reset_dialog();
	add_dialog_str(0,"There's no reason to go back out into the night when you could get a room at the inn here. You need the rest.",0);
	bmessage = run_dialog(1);
	block_entry(1);
break;