// .txt

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 5;
short last_abil;
short counter = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	add_range_to_group(13725,13728,7);

	set_name(13716,"Avernite Refugee");
	set_name(13717,"Avernite Refugee");
	set_name(13718,"Avernite Refugee");
	set_name(13719,"Avernite Refugee");

	set_name(13733,"Ruby Skeleton");
	set_coloradj(13733,256);
	set_level(13733,9);
	set_strategy(13733,2);
	change_max_health(13733,40);

	set_name(13734,"Foundry Sentinel");
	change_max_health(13734,200);

	add_range_to_group(13747,13751,9);
	set_level(30009,7);
	set_name(30009,"Borer Worm");
	add_range_to_group(13752,13756,10);
	set_level(30010,7);
	set_name(30010,"Borer Worm");
	set_aggression(30009,75);
	set_aggression(30010,75);

	set_name(13761,"Chief Kah'Horrr");
	set_boss_level(13761,1);
	change_max_health(13761,40);
	add_range_to_group(13761,13765,11);
	set_aggression(30011,60);
	
	set_crime_tolerance(max_crime);

	if (has_spec_item(23) == 0)
		sf(127,3,0);
		

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
		
	if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
		make_zone_hostile();
		im_hostile = 1;
		}

	// if (gf(,) == 0) {
	//if (get_ran(1,0,100) < 10)
	//	give_char_text_bubble(,"");
	//	}

	//if (((is_combat()) && (tick_difference(last_abil,get_current_tick()) > 0)) || ((is_group()) && (tick_difference(last_abil,get_current_tick()) > 5))) {
	//	last_abil = get_current_tick();
	//	}
break;

beginstate 10;
	set_terrain_string_range("This is an abandoned quarry. Stone blocks were mined out of here to make the buildings in this area.",1);
break;

beginstate 11;
		if ((has_spec_item(23) == 0) && (char_ok(13734)) && (get_attitude(13734) < 10)) {
			print_str_color("Suddenly, the sentinel springs to life and lumbers toward you.",2);
			set_attitude(13734,10);
			}
break;

beginstate 12;
break;

beginstate 13;
break;

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