// .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(15228,15232,25);
	set_aggression(30025,50);
	add_range_to_group(15233,15237,26);
	set_aggression(30026,50);

	sf(141,4,0);
	
	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)) ) {
		last_abil = get_current_tick();
		
		if (gf(141,4) > 1) {
			inc_flag(141,6,1);
			
			if (gf(141,6) == 2) {
				activate_hidden_group(25);
				begin_talk_mode(32);
				}
			if (gf(141,6) == 5) {
				if (gf(141,8) == 0) {
					sf(141,6,4);
					}
					else {
						activate_hidden_group(26);
						begin_talk_mode(33);
						}
				}
			if (gf(141,6) == 9) {
				activate_hidden_group(27);
				begin_talk_mode(34);
				}
			if (gf(141,6) == 12) {
				activate_hidden_group(28);
				begin_talk_mode(35);
				}
			}
		}
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);
