// TOWN SPECIAL ENCOUNTERS
//    Town 59: Halls of Chaos

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 200;
short last_abil;
short counter = 0;
short set_ter = 0;

body;

//12 4

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,);
//	add_range_to_group(,,groupn);

	set_level(30001,22);
	
	set_aggression(5911,50);
	change_max_health(5911,500);
	
	set_aggression(30002,50);
	set_name(30002,"Spectral Guard");
	
	set_aggression(30003,30);
	set_crime_tolerance(max_crime);

	set_aggression(30004,40);
	set_aggression(30005,50);
	
	set_name(5933,"Gazer Ghysa'Eye");
	set_boss_level(5933,1);
	set_level(5933,26);
	set_coloradj(5933,4);

	sf(59,19,0);
	if (gf(59,21) <= 1) {
		sf(59,21,0);
		sf(59,22,0);
		sf(59,23,0);
		sf(59,24,0);
		sf(59,25,0);
		sf(59,26,0);
		sf(59,27,0);		
		sf(59,28,0);
		sf(59,29,0);

		}
	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if ((gf(59,21) == 1) && (gf(59,22) > 0) && (gf(59,23) > 0) && (gf(59,24) > 0) && (gf(59,25) > 0) && (gf(59,26) > 0) && (gf(59,27) > 0)) {
		sf(59,21,2);
		award_party_xp(400,25);
		ok_dlog(80,2);
		}
break;

beginstate 10;
	if (gf(59,21) == 0) {
		sf(59,21,1);
		
		spawn_creature(5935);
		spawn_creature(5942);
		spawn_creature(5944);
		if (difficulty() > 1) {
			spawn_creature(5934);
			spawn_creature(5936);
			}
		if (difficulty() > 2) {
			spawn_creature(5938);
			spawn_creature(5947);
			}
		ok_dlog(74,2);
		}
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 14;
break;

//	print_str("");
//	set_terrain_string_range("",1);
//	set_terrain_string_range("The sign says - .",1);

