// .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(7452,7456,25);
	
	add_range_to_group(7457,7459,26);
	set_name(30026,"Curse-Bearing Rat");
	set_aggression(30026,40);
	set_new_abil(30026,1);
	set_attack_bonus(30026,12);
	
	set_name(7472,"Horde Hunter");
	set_name(7473,"Horde Hunter");
	set_name(7474,"Horde Hunter");
	set_name(7475,"Horde Sparkcaster");
	set_coloradj(7475,256);
	
	set_name(7488,"Shade of Ess-Kalyn");

	add_range_to_group(7489,7494,27);
	set_name(7489,"Chained Balor");
	set_name(7490,"Chained Balor");
	set_name(7491,"Horde Apprentice");
	set_name(7492,"Horde Apprentice");
	set_name(7493,"Horde Apprentice");
	set_name(7494,"Demontamer Kyzyss");
	set_level(7494,22);
	set_boss_level(7494,1);
	set_coloradj(7494,256);
	set_new_abil(7494,7);
	
	if ((gf(170,8) > 0) || (gf(69,1) > 0))
		erase_char(30027);
		
	set_crime_tolerance(max_crime);

	//if (get_ran(1,0,100) < 25)
	//	sf(67,8,0);

	if (gf(69,5) > 0) 
		set_terrain(0,877,317,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;
	if (gf(69,4) == 0) {
		sf(69,4,1);
		activate_hidden_group(25);
		
		set_name(7476,"Horde Infiltrator");
		set_name(7477,"Horde Infiltrator");
		set_name(7478,"Horde Infiltrator");
		set_level(7476,22);
		set_level(7477,22);
		set_level(7478,22);

		set_name(7479,"Horde Flinger");
		set_name(7480,"Horde Flinger");
		set_name(7481,"Horde Flinger");
		}
break;

beginstate 11;
	if (gf(69,5) == 0) {
		sf(69,5,1);
		activate_hidden_group(26);
		
		set_name(7482,"Horde Infiltrator");
		set_name(7483,"Horde Infiltrator");
		set_name(7484,"Horde Infiltrator");
		set_level(7482,22);
		set_level(7483,22);
		set_level(7484,22);

		set_name(7485,"Horde Flinger");
		set_name(7486,"Horde Flinger");
		set_name(7487,"Horde Flinger");
		
		set_terrain(0,877,317,0);
		}
break;

beginstate 12;
	sf(69,6,1);
break;

beginstate 13;
break;

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