// .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(16740,"Private Trihn");
	set_name(16741,"Commander Castrone");
	set_name(16742,"Texiera");
	if (gf(155,13) > 0)
		erase_char(16742);
		
	set_name(16743,"Healer Danika");
	set_name(16744,"Mrreema");
	set_name(16745,"Sergeant Kaye");
	set_level(16745,20);
	set_name(16746,"Fort Remote Soldier");
	set_name(16747,"Fort Remote Soldier");
	set_name(16748,"Fort Remote Soldier");
	set_name(16749,"Fort Remote Soldier");
	set_name(16750,"Fort Remote Soldier");
	set_name(16751,"Fort Remote Soldier");
	set_name(16752,"Fort Remote Soldier");
	set_name(16753,"Fort Remote Soldier");
	set_name(16754,"Fort Remote Soldier");
	set_name(16755,"Fort Remote Soldier");

	set_name(16756,"Wounded Soldier");
		set_name(16757,"Wounded Soldier");
	set_name(16758,"Wounded Soldier");
	set_name(16759,"Wounded Soldier");

	set_name(16760,"Caravan Driver");
	set_name(16761,"Caravan Driver");
	set_name(16762,"Caravan Driver");

	set_name(16763,"Young Trainee");
	set_name(16764,"Young Trainee");

	set_level(16765,25);

	set_name(16766,"Experimental Horror");
	set_new_abil(16766,20);
	change_max_health(16766,100);
	set_boss_level(16766,1);
	
	add_range_to_group(16771,16776,43);
	set_name(30043,"Sonic Bat");
	set_level(30043,12);

	set_name(16777,"Huge Basilisk");
	set_name(16778,"Huge Basilisk");
	set_name(16779,"Huge Basilisk");
	set_name(16780,"Huge Basilisk");
	set_coloradj(16777,2);
	set_coloradj(16778,2);
	set_coloradj(16779,2);
	set_coloradj(16780,2);
	
	set_name(16786,"Shade Construct");
	set_level(16786,40);
	set_boss_level(16786,2);
	change_max_health(16786,100);
	set_new_abil(16786,13);
	set_aggression(16786,40);
	
	set_crime_tolerance(max_crime);
	
	if ((registered()) && (gf(155,6) > 0))
		sf(155,12,1);

	if (gf(155,18) > 0)
		set_terrain(0,111,758,0);
		
	if (gf(155,20) == 0)
		sf(155,19,0);
	sf(155,15,0);
	
	if (gf(155,1) > 0) {
		set_terrain(1,80,711,118);
		set_terrain(1,82,711,118);
		set_terrain(1,84,711,118);
		set_terrain(1,81,713,118);
		set_terrain(1,83,713,118);
		set_terrain(1,85,713,118);
		}	
		
	set_obj_act_at_dist(28055,1);
	break;

beginstate EXIT_STATE;

break;

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

	if (gf(155,6) == 0) {
		if ((get_ran(1,0,100) < 10) && (gf(155,12) == 0))
			give_char_text_bubble(16740,"You need orders to enter.");
		if ((get_ran(1,0,100) < 10) && (gf(155,12) == 0))
			give_char_text_bubble(16740,"I can let you in. Maybe.");
		if ((get_ran(1,0,100) < 10) && (gf(155,12) > 0))
			give_char_text_bubble(16740,"You can pass.");
		if ((get_ran(1,0,100) < 10) && (gf(155,12) > 0))
			give_char_text_bubble(16740,"Good luck to you.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16740,"Zzzzz.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16741,"Yawn.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16741,"Sigh.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16741,"What do you need?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16741,"No trouble here.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16742,"Give me some water?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16742,"My arms hurt.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16742,"The Abyss will survive.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16742,"You will all die.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16743,"Be calm.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16743,"You'll be better soon.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16743,"Just don't take more!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16743,"A new patient?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16744,"Mrrrr!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16744,"Just eat it!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16744,"Stop complaining!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16744,"Well, I say it's food!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16745,"Now parry!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16745,"Thrust!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16745,"Try harder!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16745,"You will be slith food.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16745,"You sicken me.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16766 + get_ran(1,0,3),"Cough.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16766 + get_ran(1,0,3),"Zzzzzz.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16766 + get_ran(1,0,3),"Ahhhhh.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16766 + get_ran(1,0,3),"Water, please?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16770 + get_ran(1,0,2),"What is this?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16770 + get_ran(1,0,2),"Ugh!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16770 + get_ran(1,0,2),"That a fingernail?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16763 + get_ran(1,0,1),"Swish!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16763 + get_ran(1,0,1),"Thunk!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16763 + get_ran(1,0,1),"How was that?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(16763 + get_ran(1,0,1),"Swoosh!");
		}

	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();
		
		if ((gf(155,22) > 0) && (gf(155,22) < 20)) {
			inc_flag(155,22,1);
			
			if (gf(155,22) == 10) {
				set_attitude(16787,4);
				set_attitude(16788,4);
				set_attitude(16789,4);
				set_attitude(16790,4);
				set_attitude(16791,4);
				set_attitude(16792,4);
				begin_talk_mode(28);
				}
			}
		}
break;

beginstate 10;
	set_terrain_string_range("This door has been marked with a blue stripe.",1);
break;

beginstate 11;
	set_terrain_string_range("This door has been marked with a green stripe.",1);
break;

beginstate 12;
	set_terrain_string_range("This door has been marked with a red stripe.",1);
break;

beginstate 13;
	set_terrain_string_range("This door has been marked with a gray stripe.",1);
break;

beginstate 14;
	set_terrain_string_range("The sign says - SUPPLY DEPOT. MERCHANT QUARTERS.",1);
break;

beginstate 20;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(104,760,2);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 21;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(107,762,6);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 22;
		if (revive_party()) {
			print_str_color("Entering or leaving Fort Remote 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);
