// Town 1: Vasskolis
// Starting location is (51,46)
begintownscript;

variables;

short choice,i,j,k;
string dlgstr;

body;

beginstate INIT_STATE;
	set_crime_tolerance(1);
	
	set_name(9,"Ithik"); // ID 103
	set_level(9,60);
	set_name(10,"Talas"); // ID 104
	set_char_dialogue_pic(10,582,0);
	set_char_dialogue_pic(11,585,0); // ID 105
	set_name(12,"Ethass"); // ID 106
	set_char_dialogue_pic(12,584,0);
	set_name(13,"Machrone"); // ID 107
	set_name(14,"Guard");
	set_name(16,"Fethiss");
	set_name(21,"Silthokh"); // ID 115
	set_name(22,"Pithoss"); // ID 116
	set_char_dialogue_pic(22,580,0);
	
	if (get_flag(290,7))
		make_town_hostile();
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
if (get_crime_level() == 0)
	end();
if (get_flag(290,7) > 0)
	end();
	
	print_str_color("You have made the expedition angry with you.",1);
	make_town_hostile();
	set_flag(290,7,1);
break;

beginstate 10;
if (get_flag(1,0) == 0) {
	reset_dialog();
	add_dialog_str(0,"You awake in the morning and leave the pen where you've been sleeping. You brush the slime off you.",0);
	add_dialog_str(1,"It's been more than half a year since you first reached Vasskolis, clearing the way for Legare's expedition to come here. In that time, you've been back to Avernum to handle a few matters, and now you've returned.",0);
	add_dialog_str(2,"Legare has been stocking up on supplies here in Vasskolis in preparation for the journey to the homeland, which will apparently be long and arduous.",0);
	add_dialog_str(3,"Meanwhile, he has been relying on the hospitality of the local sliths, but Vasskolis was so poor that they had no guest rooms for others; Legare's followers have been sleeping on makeshift beds in this lizard pen.",0);
	add_dialog_str(4,"All of the old faces are here again: Kass, Pithoss, Ethass, Talas, Silthokh, Phaedra, and Machrone. Several have changed over the past few months, and you have had only brief conversations with each.",0);
	add_dialog_str(5,"You are supposed to speak with any of the leaders, Pithoss, Kass, or Legare, in order to receive your instructions, but there is no hurry. You have seen little of the city yet. You have time enough to look around and talk with old friends, at least.",0);
	set_flag(1,0,run_dialog(1));
	}
break;

beginstate 11;
if (get_flag(1,1) == 0) {
	set_flag(1,1,1);
	message_dialog("This was the house in which Legare, Kass, and Pithoss were staying. By the looks of it, they moved out recently.","It is the only house in the entire town that is in good enough repair to give evidence of what Vasskolis looked like in the glory years a century ago. The design is strange and angular, reminiscent of vahnatai buildings but not entirely similar.");
	}
break;

beginstate 12;
if (get_flag(1,2) == 0) {
	set_flag(1,2,1);
	message_dialog("This part of town has a few broken-down houses. The current residents of Vasskolis don't have enough time or supplies for repairs, so the houses have suffered the wear and tear of several decades without any maintenance.","You hear the sounds of female voices.");
	}
break;

beginstate 13;
if (get_flag(1,3) == 0) {
	set_flag(1,3,1);
	message_dialog("Inside this house are Ethass and Phaedra. Phaedra is pregnant! Very pregnant, in fact: she must be at least seven or eight months along. You had heard this, but seeing it is more immediate.","You know that Phaedra left Vasskolis around the same time as you did, reporting back to Fort Dranlon, and when she returned, months later, she was visibly pregnant. No one knows the identity of the father, though.");
	}
break;

beginstate 14;
if (get_flag(1,4) == 0) {
	set_flag(1,4,1);
	message_dialog("This is the way to the throne room. Machrone sits here, smiling as always, and he greets you with a hearty, _Hello!_","You notice that the guard at the door frowns at him as he speaks. He must be annoying people, as usual.");
	}
break;

beginstate 15;
if (get_flag(1,5) == 0) {
	set_flag(1,5,1);
	message_dialog("In the throne room is Fethiss, the chief of Vasskolis. He nods to you as you enter. You have not spoken with him since you left so many months ago. He must have some sort of news for you.","More importantly, Pithoss stands near him. He knows what you are supposed to do now.");
	}
break;

beginstate 16;
if (get_flag(1,6) == 0) {
	set_flag(1,6,1);
	message_dialog("You open the door to the temple of Vasskolis. It was once a grand building, you are sure, but it has faded with age, and many of its treasures have been looted. The style of the floor is older than anything else in the town except the library.","Ithik kneels before the altar. He finishes a prayer and then rises to greet you. Before you left Vasskolis, you learned his language enough to be fluent, so conversation will be no trouble.");
	}
break;

beginstate 17;
if (get_flag(1,7) == 0) {
	set_flag(1,7,1);
	message_dialog("You open the library doors. The library, alongside the temple, is one of the oldest buildings in Vasskolis, but unfortunately, like the temple, it has been looted since the glory days. Little remains of the old papyrus rolls and few parchment fragments.","Talas the engineer sits at one of the tables looking over one of the fragments.");
	}
break;