// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,"");

 	add_range_to_group(6923,6926,31);

 	add_range_to_group(6927,6931,32);
	set_level(30032,18);
	set_aggression(30032,50);

 	add_range_to_group(6941,6946,33);
	set_aggression(30033,50);
	
	set_crime_tolerance(max_crime);

	sf(64,2,0);
	
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((gf(64,2) > 0) && (on_which_layer() == 1)) {
		sf(64,2,0);
		spawn_creature(6938);
		spawn_creature(6939);
		spawn_creature(6940);

		set_name(6939,"Horde Warbeast");
		set_name(6940,"Horde Warbeast");
		set_resistance(6939,7,70);
		set_resistance(6940,7,70);
		
		}
		
	//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();
		
		if ((gf(64,6) > 0) && (gf(64,6) < 100)) {
			inc_flag(64,6,1);
	if (char_ok(6961))
		alert_char(6961);
			
			if (gf(64,6) == 2) {
				spawn_creature(6947);
				spawn_creature(6948);
				spawn_creature(6949);
				}
			if (gf(64,6) == 5) {
				spawn_creature(6950);
				spawn_creature(6951);
				spawn_creature(6952);
				}
			if (gf(64,6) == 7) {
				spawn_creature(6953);
				spawn_creature(6954);
				spawn_creature(6955);
				spawn_creature(6956);
				spawn_creature(6957);
				spawn_creature(6958);
				spawn_creature(6959);
				spawn_creature(6960);
				}
			if (gf(64,6) == 9) {
				spawn_creature(6961);
				set_name(6961,"Muridae Infernal");
				set_boss_level(6961,2);
				}
			}
		}
		
	
break;

beginstate 10;
	set_terrain_string_range("Someone has murdered several loggers and left their remains hidden in this storeroom.",1);
break;

beginstate 11;
	set_terrain_string_range("This stone dome was a loggers' camp. It has been abandoned.",1);
break;

beginstate 12;
	if (gf(64,9) == 0) {
		activate_hidden_group(31);
		sf(64,9,1);
		set_name(6912,"Horde Hunter");
		set_name(6913,"Horde Hunter");
		set_name(6914,"Horde Hunter");
		set_name(6915,"Horde Hunter");
		set_level(6912,20);
		set_level(6913,20);
		set_level(6914,20);
		set_level(6915,20);
		}
break;

beginstate 13;
break;

beginstate 14;
	if (gf(64,10) == 0) {
		sf(64,10,1);
		if (has_spec_item(13) == 0) {
			activate_hidden_group(32);
			set_name(6922,"Chitrach Spitter");
			alert_char(6922);
			}
		begin_talk_mode(6);
		}
break;
//	print_str("");
//	set_terrain_string_range(".",1);
//	set_terrain_string_range("The sign says - .",1);
