// .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(10692,"Commander Melo");
	set_name(10693,"Sergeant Horrum");
	set_name(10694,"Private Tennison");
	set_name(10695,"Edeline");
	set_name(10696,"Kravin");

	add_range_to_group(10697,10703,25);
	set_name(30025,"Avernite Soldier");
	add_range_to_group(10704,10708,26);
	set_name(30026,"Avernite Soldier");
	add_range_to_group(10709,10715,27);
	set_name(30027,"Fort Spire Soldier");

//	add_range_to_group(,,groupn);

	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;
		//erase_char(30000);
		begin_talk_mode(299);
		}


	// if (gf(,) == 0) {
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10692,"We're very busy.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10692,"Fort Spire is abandoned.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10692,"We have much to ship out.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10692,"I've heard of you.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10693,"Mrrrr.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10693,"Don't touch anything.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10693,"I'll check prisoners.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10693,"Must send them soon.");
	if ((get_ran(1,0,100) < 20) && (gf(99,12) > 0))
		give_char_text_bubble(10694,"I control the gate.");
	if ((get_ran(1,0,100) < 20) && (gf(99,12) > 0))
		give_char_text_bubble(10694,"Talk to me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10695,"I can buy equipment.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10695,"Goods for sale.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10695,"Won't ask too many questions.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10696,"Curse you all.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10696,"We'll get back at you.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(10696,"Where's my food?");

	//	}

	//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("The sign says - Barracks.",1);
break;


beginstate 11;
	set_terrain_string_range("The sign says - Officers' Quarters.",1);
break;


beginstate 12;
break;

beginstate 13;
	set_terrain_string_range("The sign says - Infirmary.",1);
break;

beginstate 14;
	set_terrain_string_range("Oddly, the infirmary was locked up. Perhaps their healer was sent elsewhere.",1);
break;

beginstate 15;
	set_terrain_string_range("The sign says - To cells.",1);
break;


beginstate 16;
	set_terrain_string_range("Prisoners were held in these cells while waiting to be taken to the Abyss.",1);
break;

beginstate 22;
		if (revive_party()) {
			print_str_color("Entering or leaving Fort Saffron heals your wounds",2);
			print_str_color("  and restores your spell energy.",2);
			}
break;
//	print_str("");
//	set_terrain_string_range(".",1);
//	set_terrain_string_range("The sign says - .",1);
