begintownscript;

variables;

int choice;

body;

beginstate INIT_STATE;
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

	if (get_flag(5,2) == 1) {
			if (get_flag(6,1) == 1) {
					set_flag(6,7,1);
					}
			}

	if (get_flag(6,4) == 1)
			end();
		message_dialog("The smell here is very bad. A smell of rotten fish, eggs, rotten fruit, sweatsocks... also, the squeaking of rats is quite loud because of the echoing of the sounds in the tunnels.","You can understand a lot of things, but how people can stand this mess and din you can not comprehend.");
		set_flag(6,4,1);

break;

beginstate 10;
reset_dialog();
add_dialog_str(0,"You find the ladder leading up to Voughton. Do you want to climb up?",0);
add_dialog_choice(0,"Climb up");
add_dialog_choice(1,"Leave");
choice = run_dialog(0);

	if (choice == 1)
			move_to_new_town(5,35,43);
break;

beginstate 11;
if (get_flag(6,2) == 1)
		end();
	message_dialog("Apparently, the bandits made some sort of a guardhouse here. It's not so dumb, actually. This way they can easily see who comes in and who goes out.","");
	set_flag(6,2,1);
break;

beginstate 12;
if (get_flag(6,3) == 1)
		end();
	message_dialog("Apparently, the bandits made some sort of a guardhouse here. It's not so dumb, actually. This way they can easily see who comes in and who goes out.","");
	set_flag(6,3,1);
break;

beginstate 13;
if (get_flag(6,5) > 0)
		end();
	message_dialog("You search the bandit's leader desk, only to find a lot of rubbish and some pieces of paper. The papers look quite interesting.","Two papers in particular look interesting: one is a letter describing how to abduct the Empire Liaison of Voughton, the other describes a powerful altar somewhere in these sewers.");
	message_dialog("You pocket both papers. The letter about the Empire Liaison should be brought to mayor Ruth at once.","");
	set_flag(6,5,1);
	change_spec_item(9,1);
break;

beginstate 14;
if (get_flag(6,6) == 0) {
		run_animation_sound(24);
		message_dialog("As you perform the ritual of sanctification, a green fog fills the room. The evil altar which fuels the bandits with power and might cracks, letting all evil energy out.","");
		set_flag(6,6,1);
		end();
		}
	message_dialog("You already sanctified the altar, making a second try useless. You decide not to do the ritual again.","");
break;

beginstate 15;
if (get_flag(6,6) == 0) {
		message_dialog("This altar is simply soaked with evil energy. You gather this must be the source of power for the bandits. Destroying it might be a very good cause.","");
		end();
		}
	message_dialog("The once mighty altar is now full with cracks. The energy fuelling the bandits has left the altar, making the bandits powerless.","");
break;