beginoutdoorscript;

variables;

body;

beginstate 0; //INIT_STATE
break;

beginstate 1; //EXIT_STATE
break;

beginstate 2; //START_STATE
break;

beginstate 10; //salvation!!!
	if(get_flag(30,0) == 1)
		end();
	set_flag(30,0,1);
	reset_dialog();
	add_dialog_str(0,"You fall to your knees and nearly weep for joy. You've reached a part of the caves which at the very least is habitable. And fresh water at last...",0);
	add_dialog_str(1,"And most importantly, the light. It may not be sunlight, but it's enough.",0);
	add_dialog_str(2,"For now, all that's left to do is try and find someone, anyone humanoid who can help you find your way home.",0);
	run_dialog(1);
break;

beginstate 20; //vahnatai
	outdoor_enc_result(1);
	reset_dialog();
	add_dialog_str(0,"You stumble into a patrol of vahnatai guarding this bridge. Vahnatai and humans haven't kept the best relations as of late, but you'll happily greet anyone at this point.",0);
	add_dialog_str(1,"After a bit of honest confusion, they escort you to a small village where you're given your first real food in far too long. It tastes horrible, but you don't really care.",0);
	run_dialog(1);
	reset_dialog();
	add_dialog_str(0,"Once the vahnatai finally find a translator, you blurt out the story of your journey through the chitrach nest. But the vahnatai don't seem very interested in that.",0);
	add_dialog_str(1,"Even once you've finished, they continue to stare at the chunk of blue crystal you recovered from the ruins a lifetime ago. Eventually, the translator speaks.",0);
	add_dialog_str(2,"_That,_ he says warily, _is part of a Crystal Soul. Please tell us where you found it._",0);
	add_dialog_str(3,"You slump over your food. After all of that effort, your rescuers only care about a measly chunk of crystal. Oh well... as long as they take you back home eventually.",0);
	add_dialog_str(4,"THE END",40);
	run_dialog(1);
	end_scenario(1);
break;