// TOWN SCRIPT
//    Town 3: Marralis

// This is the special encounter script for this town.
// The states INIT_STATE, EXIT_STATE, and START_STATE have
// meanings that are described in the documenation. States you write
// yourself should be numbered from 10-100.

begintownscript;

variables;

int i,j,k,r1,choice;

body;

beginstate INIT_STATE;
	if (get_flag(6,1) == 0) {
		message_dialog("You had heard about this, but never actually believed it. This place is populated by harpies. Legends say they are shrill, cruel, winged women.","Well, they're definitely shrill; you can hear them screaming to each other. Hopefully they aren't cruel!");
		set_flag(6,1,250);
		}
	if (get_flag(6,2) == 250)
		erase_char(6);
break;

beginstate EXIT_STATE;
// Always called when the town is left.
break;

beginstate START_STATE;
break;

beginstate 10;
	if (get_flag(6,2) == 250)
		end();
	set_flag(6,2,250);
	message_dialog("You round the corner and find a huge raven. These birds, in legends, always brought woe and ill fortune. It glares at you with a dark eye; then it quickly flies away. How strange.","");
	march_party(22,8);
	force_view_center(25,7);
	force_instant_terrain_redraw();
	pause(3);
	set_character_facing(6,6);
	force_instant_terrain_redraw();

	relocate_character(6,26,7);
	force_instant_terrain_redraw();

	pause(3);
	relocate_character(6,27,7);
	force_instant_terrain_redraw();

	pause(3);
	relocate_character(6,28,7);
	force_instant_terrain_redraw();

	pause(3);
	relocate_character(6,29,7);
	force_instant_terrain_redraw();

	pause(3);
	relocate_character(6,30,7);
	force_instant_terrain_redraw();

	pause(3);
	relocate_character(6,31,7);
	force_instant_terrain_redraw();
	
	erase_char(6);
	force_instant_terrain_redraw();
break;