// .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(2808,2813,19);
	set_name(30019,"Scourge Envoy");
	set_name(2811,"Triad Envoy");
	set_name(2812,"Triad Envoy");
	set_name(2813,"Triad Envoy");
	alter_stat(30019,29,10);
	set_resistance(30019,1,75);
	set_resistance(30019,7,75);
	if (gf(170,8) > 0)
		erase_char(30019);
	if (gf(26,1) > 0)
		erase_char(30019);
		
	add_range_to_group(2817,2820,20);
	set_name(2820,"Ensnaring Arachnid");
	set_level(2820,27);
	
	set_name(2821,"Horde Gate Guard");
	set_name(2822,"Horde Gate Guard");
	set_name(2823,"Horde Gate Guard");
	set_level(2821,30);
	set_level(2822,30);
	set_level(2823,30);
	
	set_crime_tolerance(max_crime);

	set_name(2825,"Byss of the Scourge");
	set_name(2826,"Essa of the Scourge");
	set_name(2827,"Gyla of the Scourge");
	set_level(2825,28);
	set_level(2826,28);
	set_level(2827,28);
	set_boss_level(2825,1);
	set_boss_level(2826,1);
	set_boss_level(2827,1);

	add_range_to_group(2828,2833,21);
	set_name(30021,"Horde Road Patrol");
	set_level(30021,28);

	set_name(2834,"Kesha");

	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(2834,"You have come.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2834,"I expected thisss.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2834,"I will never betray the Horde.");
	//	}

	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();
		
		counter = counter + 1;
		if (counter == 10) {
			counter = 0;
			if (gf(26,5) == 0)
				sf(26,5,1);
				else sf(26,5,0);
			}
		}
break;

beginstate 10;
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

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