// .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(,"");
	add_range_to_group(10476,10483,7);
	set_name(30007,"Anama Farmer");
	set_name(10476,"Teacher Jessica");
	add_range_to_group(10484,10490,8);

	set_aggression(10491,50);
	set_aggression(10492,50);
	set_aggression(10493,50);
	
	add_range_to_group(10494,10498,9);
	set_aggression(30009,50);
	
	add_range_to_group(10499,10503,10);
	set_aggression(30010,50);

	add_range_to_group(10505,10510,11);
	set_aggression(30011,50);

	if (gf(97,2) > 1) {
		erase_char(30007);
		erase_char(30008);
		}
	
	set_boss_level(10504,2);
	
	set_level(10519,20);
	set_level(10520,20);

	add_range_to_group(10529,10534,12);
	set_level(30012,20);
	set_aggression(30012,50);
	
	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) && (gf(97,2) < 2))
		give_char_text_bubble(10476,"Ugh.");
	if ((get_ran(1,0,100) < 10) && (gf(97,2) < 2))
		give_char_text_bubble(10476,"Hard work.");
	if ((get_ran(1,0,100) < 10) && (gf(97,2) < 2))
		give_char_text_bubble(10476,"We don't want visitors.");
	if ((get_ran(1,0,100) < 10) && (gf(97,2) > 1))
		give_char_text_bubble(10476,"It is time!");
	if ((get_ran(1,0,100) < 10) && (gf(97,2) > 1))
		give_char_text_bubble(10476,"We must depart!");
	if ((get_ran(1,0,100) < 10) && (gf(97,2) > 1))
		give_char_text_bubble(10476,"Make haste!");
	//	}

	//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(97,4) == 0) {
		sf(97,4,1);
		activate_hidden_group(7);
		}
break;

beginstate 11;
	if (gf(97,5) == 0) {
		sf(97,5,1);
		activate_hidden_group(8);
		}
break;

beginstate 12;
break;

beginstate 13;
break;

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