// Town 34: Sthikhoss
begintownscript;

variables;

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

body;

beginstate INIT_STATE;
	set_crime_tolerance(2);
	
	change_blocked(14,32,1);
	
	set_name(18,"Khaross");
	
	change_outdoor_location(1,4,37,32);
	
	if (get_flag(34,0) == 0) {
		force_instant_terrain_redraw();
		reset_dialog();
		add_dialog_str(0,"Before you, the legends of the sliths are embodied.",0);
		add_dialog_str(1,"The river Sthikhoss is the first of several obstacles that souls must cross after death before reaching the afterlife. Many souls are not settled to rest properly, usually because they died violent or unnatural deaths, or their bodies were despoiled.",0);
		add_dialog_str(2,"Such unsettled spirits must wait on the banks for decades, sometimes hundreds of years, before they can have peace. Only the souls free from material cares are allowed to pass beyond this point.",0);
		add_dialog_str(3,"Dozens of souls are stuck here right now, all clamoring after the boatman, Khaross, hoping that he will ferry them across the river. Right now, he appears to be waiting for something.",0);
		set_flag(34,0,run_dialog(1));
		}
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
if (get_flag(51,1) == 1) {
	block_entry(1);
	message_dialog("You attempt to board Khaross's boat to cross the river again, but he shakes his head. _It is not right,_ he says, _for mortals to linger in the Land of the Dead after their task is complete. Leave now._","");
	end();
	}
	reset_dialog();
	clear_buffer();
	append_string("Khaross looks up as you approach. _Mortal");
	if (party_size() > 1)
		append_string("s");
	append_string("!_ he says. _You are living beings, not dead souls wishing to travel the river._");
	get_buffer_text(dlgstr);
	add_dialog_str(0,dlgstr,0);
	add_dialog_str(1,"He inspects you closely. _Are you ready indeed to pass the river Sthikhoss, knowing that you will surely not return except with the blessing of some divine power, the assenting nod of a god?_",0);
	add_dialog_str(2,"What do you say?",0);
	add_dialog_choice(0,"Leave.");
	if (party_size() > 1)
		add_dialog_choice(1,"Yes, we are ready.");
	else
		add_dialog_choice(1,"Yes, I am ready.");
	if (run_dialog(1) == 1)
		block_entry(1);
	else
		move_to_new_town(35,23,16);
break;