// .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(14917,"Mayor Arron");
	set_name(14918,"Sage Perth");
	set_name(14919,"Maxfield");
	set_name(14920,"Maura");
	set_name(14921,"Saskia");
	set_name(14922,"Sergeant Brandy");
	set_level(14922,24);
	set_new_abil(14922,20);
	
	set_name(14923,"Refugee");
	set_name(14924,"Refugee");
	set_name(14925,"Avernite Soldier");
	set_name(14926,"Avernite Soldier");
	set_name(14927,"Avernite Soldier");
	set_name(14928,"Avernite Soldier");
	set_name(14929,"Avernite Soldier");
	set_name(14930,"Caravan Guard");
	set_name(14931,"Caravan Merchant");
	set_name(14932,"Caravan Merchant");

	set_level(14925,18);
	set_level(14926,18);
	set_new_abil(14925,20);
	set_new_abil(14926,20);
	
	add_range_to_group(14913,14916,1);

	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(138,6) == 0) {
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14917,"I can heal you.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14917,"This is a refuge.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14917,"We must fight.");
		if ((get_ran(1,0,100) < 10) && (gf(138,2) < 2))
			give_char_text_bubble(14917,"We need your help.");
		if ((get_ran(1,0,100) < 10) && (gf(138,2) >= 2))
			give_char_text_bubble(14917,"We are grateful.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14918,"I am busy.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14918,"What is it now?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14918,"We guard the Spiral.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14919,"Snip. Snip.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14919,"There you go.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14919,"Much better.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14921,"We buy quality goods.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14921,"Our used goods are excellent.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14921,"What do you need?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14922,"Keep careful watch.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14922,"They can come any time.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(14922,"Beware the Honeycomb.");

		}

	//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;
	set_terrain_string_range("This house has been abandoned.",1);
break;

beginstate 11;
	set_terrain_string_range("The sign says - The Mertis Arms.",1);
break;

beginstate 12;
break;

beginstate 13;
break;

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