// .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(14364,"Incantor Tenelan");
	set_name(14365,"Goodwife Rhoswen");
	set_name(14366,"Goodman Dugan");
	set_name(14367,"Innkeeper Taggart");
	set_name(14368,"Quiet Refugee");
	set_name(14369,"Quiet Refugee");
	set_name(14370,"Quiet Refugee");
	set_name(14371,"Quiet Refugee");
	set_name(14372,"Quiet Refugee");


	add_range_to_group(14373,14377,7);
	set_aggression(30007,50);
	add_range_to_group(14378,14380,8);
	set_aggression(30008,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();
		sf(147,5,1);
		im_hostile = 1;
		}

	 if (gf(147,5) == 0) {
	if (get_ran(1,0,100) < 30)
		give_char_text_bubble(14364,"Stay out!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14364,"Scribble. Scribble.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14364,"Mutter. Mutter.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14365,"Welcome, soldier.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14365,"Have some tea.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14365,"These are sad times.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14367,"Have some soup.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14367,"Stay out of the rooms.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14367,"We are full.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14367,"We still have ale.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14367,"Good Almarian wine!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14368 + get_ran(1,0,4),"Mutter. Mutter.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14368 + get_ran(1,0,4),"Shhh ... Quiet.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14368 + get_ran(1,0,4),"Who is that?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14368 + get_ran(1,0,4),"This is private.");

		}

	//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 ((char_ok(14364)) && (get_attitude(14364) < 10)) {
		set_attitude(14364,10);
		alert_char(14364);
		begin_talk_mode(6);
		}
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);
