//Town script for town 1: level -3

begintownscript;

variables;
int choice;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

// place quickfire
put_field_on_space(4,22,6);
put_field_on_space(22,37,6);
put_field_on_space(28,17,6);

break;

beginstate 10;
if (get_flag(1,7) == 1)
	message_dialog("As we descend the stairs, we hear a sound of opening pipes and sounds of fluid streaming away. We look back, and notice the quickfire is gone.","");
	set_flag(1,7,0);
	move_to_new_town(0,32,7);
break;

beginstate 11;
	if (get_flag(1,0) == 0) {
			message_dialog("Between the rubble, it's a corpse. We see white and brittle bones, crushed by small stones and rocks. We see death. Our death?","");
			set_flag(1,0,1);
			}
break;

beginstate 12;
	if (get_flag(1,1) == 0) {
			message_dialog("_Hey, come back. You don't have permission to go into the caves. Guests should stay should stay in their rooms rooms. Should stay in their rooms. Come back, where I can see you. _","");
			set_flag(1,1,1);
			}
break;

beginstate 13;
	if (get_flag(1,2) == 0) {
			message_dialog("_You are back. Good. Now return to the guests rooms at once, for the welcoming committee will get you tea and bis bis biscuits. Go back to the room. Tea and biscuits. Room_","Where are we? The voice is acting more and more strangely. What is it. What is he? What is HIM? We need answers.");
			set_flag(1,2,1);
			}
break;

beginstate 14;
reset_dialog();
add_dialog_str(0,"It's a bookshelf. It's not broken and contains scrolls. We need answers. The scrolls are readable. Not torn. Readable. Read them?",0);
add_dialog_choice(0,"Read them");
add_dialog_choice(1,"Leave them");
choice = run_dialog(1);

if (choice == 1) {
		reset_dialog();
		add_dialog_str(0,"This seems to be a letter. A letter from one person to the other. Read it!",0);
		add_dialog_str(1,"Conrad, we need your help. There are problems. HIM is getting the treatment, but it doesn't help. I'm not sure what the problem is, but slowly, I don't know. It's getting into our minds.",20);
		add_dialog_str(2,"Meet me at level -2, at the Mine Utility Development. We need your help soon, for we don't know what otherwise might happen. Something has to be done about HIM, soon!",20);
		add_dialog_str(3,"Signed, John",20);
		choice = run_dialog(1);
		set_flag(1,9,1);
		if (get_flag(3,5) == 0) {
				award_party_xp(25,20);
				set_flag(3,5,1);
				}
		}
break;

beginstate 15;
if (get_flag(1,7) == 1)
	message_dialog("As we ascend the stairs, we hear a sound of opening pipes and sounds of fluid streaming away. We look back, and notice the quickfire is gone.","");
	set_flag(1,7,0);
	move_to_new_town(2,43,39);
break;

beginstate 16;
if (get_flag(1,7) == 1)
	message_dialog("As we ascend the stairs, we hear a sound of opening pipes and sounds of fluid streaming away. We look back, and notice the quickfire is gone.","");
	set_flag(1,7,0);
	move_to_new_town(2,39,15);
break;

beginstate 17;
	if (get_flag(1,3) == 0) {
			message_dialog("Oh, the passage seems blocked... Bite it knives out? Meh, we won't get through. We'll have to find some other way to get wherever we want to go.","");
			set_flag(1,3,1);
			}
break;

beginstate 18;
	if (get_flag(1,4) == 0) {
			message_dialog("Oh, the passage seems blocked... Bite it knives out? Meh, we won't get through. We'll have to find some other way to get wherever we want to go.","");
			set_flag(1,4,1);
			}
break;

beginstate 19;
	if (get_flag(1,5) == 0) {
			message_dialog("This is one strange mine. We see emptiness and decay everywhere and we hear voices. This is a wicked place. We used to be all right, what happened?","_Guests should not go beyond their rooms. Now, I might have to kill you. Go back, or I will have to kill you. It is only standard procedure, there is no need to be alarmed of anything_");
			set_flag(1,5,1);
			}
break;

beginstate 20;
	if (get_flag(1,6) == 0) {
			message_dialog("What's this? Somebody had to leave in a hurry. Most other rooms we saw were abandoned with scarcely any stuff lying about. Why is there then food all around this place? Maybe HIM, we don't know what it is, this voice, can it be the cause of all this?","");
			set_flag(1,6,1);
			}
break;

beginstate 21;
	if (get_flag(1,7) == 0) {
			message_dialog("We mournfully trudge on in this godforsaken place, when we hear a click. Just a click. A click. Click. The welcoming committee?","Stone sliding over stone, a strange sizzling sound of burning rocks. Could it be quickfire? If it were, we'd better stomp n run n bite knives out here we come!");
			set_terrain(28,17,0);
			set_terrain(4,22,0);
			set_terrain(22,37,0);
			set_flag(1,7,1);
			}
break;