// .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_level(13176,18);
	set_level(13177,18);
	set_level(13178,18);
	set_level(13179,18);
	
	set_obj_act_at_dist(21975,1);
	set_obj_act_at_dist(21976,1);
	
	
	add_range_to_group(13195,13202,43);
	set_level(30043,16);
	set_aggression(30043,60);
	
		add_range_to_group(13203,13206,44);

		add_range_to_group(13207,13210,45);
	set_name(30045,"Gate Sentinel");
	set_boss_level(30045,1);
	
	if (gf(122,13) < 4)
		sf(122,10,0);
	if (gf(122,14) < 4)
		sf(122,11,0);
	if (gf(122,15) < 4)
		sf(122,12,0);
	sf(122,9,0);
	
//	set_name(,"");
//	add_range_to_group(,,groupn);

	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()) > 5))) {
	//	last_abil = get_current_tick();
	//	}
break;

beginstate 10;
sf(122,9,1);
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(653,555,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(647,549,6);
	// 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);
