// TOWN SCRIPT
//    Town 1: Fort Avernum


begintownscript;

variables;

int i,j,k,r1,choice;


body;

beginstate INIT_STATE;
	set_name(6,"Andrew");
	set_name(7,"Janice");
	set_name(8,"Tor");
	set_name(9,"Thairl");
	set_name(10,"Dunbar");
	set_name(11,"Acacia");
	set_name(30,"Diane");
	set_name(31,"Warrick");
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 11;
	set_town_visibility(0,0);
	change_outdoor_location(6,3,39,29);
break;	

beginstate 12;
	set_town_visibility(0,0);
	change_outdoor_location(6,3,37,31);
break;	

beginstate 13;
	set_town_visibility(0,0);
	change_outdoor_location(6,3,39,33);
break;	

beginstate 14;
	set_town_visibility(0,0);
	change_outdoor_location(6,3,41,31);
break;	

beginstate 15;
	reset_dialog();
		add_dialog_str(0,"You return to the arrival portal. It is a tall, glowing pillar of energy, almost twenty feet high. The air around it is blisteringly hot.",0);
		add_dialog_str(1,"The greatest magicians on the surface worked in concert to create it. Many of them later ended up down here, once Emperor Hawthorne started to fear their power.",0);		
	add_dialog_choice(0,"Step away from it.");
	add_dialog_choice(1,"Walk into the portal.");
	choice = run_dialog(0);
	
	if (choice == 1) {
	block_entry(1);
	reset_dialog();
		add_dialog_str(0,"You turn away from the portal. Trying to use it would be madness. It has only one purpose: to trap souls like you down here.There must be a route back to the surface.",0);
	choice = run_dialog(0);
	}
	if (choice == 2) {
	block_entry(1);
	reset_dialog();
		add_dialog_str(0,"You start to walk back into the portal. The heat is incredible. As you get closer to that awesome power of energy, your skin starts to blister and sear.You back away before it kills you. The Empire did its work well. ",0);
	choice = run_dialog(0);
	}
break;	


