// .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();

	set_name(4119,"Tesssik Shaya");
	set_name(4120,"Dyass Shaya");

	add_range_to_group(4104,4109,45);
	set_name(30045,"Slave of the Horde");
	set_name(4104,"Roagan");
	
	set_name(4131,"Ogre Brute");
	change_max_health(4131,200);

	add_range_to_group(4136,4140,47);
	set_level(30047,28);
	set_name(4136,"Horde Sentry");
	set_name(4137,"Horde Sentry");

	add_range_to_group(4141,4144,46);
	
	set_crime_tolerance(max_crime);

	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()) > 3))) {
		if ((gf(38,6) == 0) && (on_which_layer() == 1) && (party_dist_to_spot(654,168) <= 6)) {
			counter = counter + 1;
			if (counter == 7) {
				print_str_color("Suddenly, chitrachs burrow out of the rock all around you!.",3);
				sf(38,6,1);
				activate_hidden_group(48);
				}
				else if (counter < 7)
					print_str_color("You hear scratching and clicking coming from somewhere nearby.",3);
			}
		
		last_abil = get_current_tick();
		}
break;

beginstate 10;
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 20;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(654,138,2);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 21;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(653,138,6);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 22;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(700,172,0);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 23;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(700,174,4);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;
//	print_str("");
//	set_terrain_string_range(".",1);
//	set_terrain_string_range("The sign says - .",1);
