// .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(11772,"Sergeant Olalla");
	set_name(11773,"Neron");
	set_name(11774,"Nazil");
	
	set_name(11775,"Avernite Soldier");
	set_name(11776,"Avernite Soldier");
	set_name(11777,"Trained Watchlizard");
	set_name(11778,"Trained Watchlizard");

	add_range_to_group(11779,11782,31);
	set_name(30031,"Altered Rat");
	
	add_range_to_group(11783,11789,32);
	set_name(30032,"Avernite Soldier");

	set_name(11790,"Trained Watchlizard");
	set_name(11791,"Trained Watchlizard");

	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
		
	if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
		sf(109,6,1);
		make_zone_hostile();
		im_hostile = 1;
		}

	if (gf(109,6) == 0) {
		if ((get_ran(1,0,100) < 18) && (gf(109,5) == 0))
			give_char_text_bubble(11772,"Speak with me.");
		if ((get_ran(1,0,100) < 18) && (gf(109,5) == 0))
			give_char_text_bubble(11772,"I can let you through.");
		if ((get_ran(1,0,100) < 18) && (gf(109,5) == 0))
			give_char_text_bubble(11772,"Skribbane is forbidden.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11773,"Welcome, soldier!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11773,"A real customer.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11773,"Too many beggars.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11774,"So much misfortune.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11774,"Not enough food.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11774,"Such high prices!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11783 + get_ran(1,0,6),"Hail and well met!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11783 + get_ran(1,0,6),"Come have a drink!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11783 + get_ran(1,0,6),"The swarm is west.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11783 + get_ran(1,0,6),"The raiders are north.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11783 + get_ran(1,0,6),"Beware the skribbane.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(11783 + get_ran(1,0,6),"Better here than north.");

		}

	//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 is a small, abandoned home.",1);
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);
