// townscript for town 40: Senarti capital 2

begintownscript;

variables;

int choice,i,j,x;

body;

beginstate INIT_STATE;

	set_level(49,38);
	set_name(7,"Senarti king");
	
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

	if (get_flag(40,0) == 0) {
			message_dialog("This part of the Senarti capital is a big improvement over the part you just came out. The road is better, and statues are aligned next to them. The houses are also quite big, though you don't see any shops.","");
			set_flag(40,0,1);
			}

break;

beginstate 10;
	move_to_new_town(38,57,41);
break;

beginstate 11;
if (get_flag(40,1) == 1)
		end();
	message_dialog("This temple is one of the largest you have seen so far. The carpet in the middle is wide and continues until it reaches the top, where you see a door and a chair.","This is once again a sign of the intelligence of the Senarti. Humans would have takes ages to make such a hall. The Senarti probably have architectural methods of building which humans don't have yet.");
	set_flag(40,1,1);
break;

beginstate 12;
reset_dialog();
add_dialog_str(0,"After climbing up this small hill, you find an altar. It's black marble is eerie and a faint light of energy radiates from the surface. Care to kneel?",0);
add_dialog_choice(0,"Kneel");
add_dialog_choice(1,"Leave");
choice = run_dialog(0);
		
	if (choice == 1) {
			message_dialog("You kneel and stay in that position. Nothing happens. You keep waiting. Still nothing happens. Eventually you leave. This altar doesn't do anything.","");
			end();
			}
break;

beginstate 13;
if (get_flag(40,2) == 1)
		end();
	message_dialog("The moment you step on the highest platform of the temple, an alarm goes off. Several Senarti come running in. There must be something with that door that causes all this panic.","");
	set_flag(40,2,1);
	activate_hidden_group(10);
break;

beginstate 14;
if (get_flag(40,3) == 1)
		end();
	message_dialog("There is some sort of passage behind this door. Walking it all the way to the end might give you some nice surprise.","");
	set_flag(40,3,1);
break;

beginstate 15;
if (get_flag(40,4) == 1)
		end();
	message_dialog("Now this is something very interesting. The owner of this home actually managed to make a small garden with grass and flowers. You wonder how he managed to do this. In Avernum, only in places with great magic this seemed to work.","You wonder. If all Senarti have this magic, they must have gotten it from their maker, Emperor Thralni. Is it safe to continue chasing the man?");
	set_flag(40,4,1);
break;

beginstate 16;
if (get_flag(40,5) == 1)
		end();
	message_dialog("This house is incredibly big and roomy. Also, it seems the house has more than one room, probably four or five, which is something one only encounters (as far as you have seen) in houses of richer Senarti.","Then there is also that walkway from the temple to the house. The most logical explanation would be that the owner of the house can go to the temple and show himself to his people. The house must be a palace of some sorts.");
	set_flag(40,5,1);
break;

beginstate 17;
if (get_flag(40,6) == 1)
		end();
	message_dialog("And there he is. The owner of the palace. It is a Senarti mage, but a very strong one. Better be very cautious. As the king of Senarti, he must be very powerful.","");
	set_flag(40,6,1);
break;

beginstate 18;
if (get_flag(40,7) == 1)
		end();
	message_dialog("The amount of blood at this wall is quite much. Maybe a murder took place here, or, judging by the amount of blood, something far more disgusting.","You feel you will need a bucket if you stay here long enough.");
	set_flag(40,7,1);
break;