// TOWN SPECIAL ENCOUNTERS
//    Town 20: Fort Draco

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 200;
short last_abil;
short counter = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,);
//	add_range_to_group(,,groupn);

	set_personality_name(400,"Boutell");
	set_personality_name(401,"Della");
	set_personality_name(402,"Kellia");
	set_personality_name(403,"Cheryl");
	set_personality_name(404,"Esther");
	set_personality_name(405,"Orson");
	set_personality_name(406,"Boris");
	set_personality_name(407,"Kev");
	set_personality_name(408,"Crisper");
	set_personality_name(409,"Harg");
	set_personality_name(410,"Tess");
	set_personality_name(411,"Anford");

	set_name(2031,"Merchant");
	set_name(2032,"Merchant");
	set_name(2033,"Merchant");
	set_name(2034,"Merchant");

	set_name(2030,"Caravan Guard");
	
	set_crime_tolerance(max_crime);

		if (revive_party()) {
			print_str_color("Entering a friendly town heals your wounds and restores",2);
			print_str_color("  your spell energy.",2);
			}
	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2000,"Fine steel.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2000,"Welcome, soldier.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2000,"I provide aid to heroes.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2001,"Phew.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2001,"Ooof.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2001,"So tired.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2002,"Stay out of the lava.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2002,"All still working.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2002,"Please don't explode.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2002,"Did that sound wrong?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2004,"Poke. Poke.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2004,"Sigh.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2004,"Cough.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2010,"Any used armor to sell?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2010,"Welcome.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2010,"Fine, repaired goods.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2005,"We have javelins.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2005,"Need a bow!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2005,"The best stone weapons.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2005,"We have some metal!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2006,"Thwack!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2006,"Wham!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2006,"Pow!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2006,"Phew.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2007,"Sweep!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2007,"Sweep. Sweep.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2007,"Wow! It's you!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2013,"(Wipe. Wipe.)");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2013,"So much filth.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2013,"Need a drink?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2013,"No fighting!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2008,"Grumble.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2008,"Despair.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2008,"Loneliness.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2008,"(Siiiiip.)");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2028,"Need a boat?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2028,"We got boats.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2028,"Pass me that chisel there?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2028,"I hate cavewood.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2015,"So much to plan.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2015,"We must watch the water.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2015,"Ah ... the adventurer.");
	if ((get_ran(1,0,100) < 20) && (gf(71,20) == 1))
		give_char_text_bubble(2015,"Come speak with me.");
	if ((get_ran(1,0,100) < 20) && (gf(71,20) > 1) && (gf(20,21) == 0))
		give_char_text_bubble(2015,"I have work for you.");
	if ((get_ran(1,0,100) < 20) && (gf(20,3) == 1))
		give_char_text_bubble(2015,"Go to Formello.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2031 + get_ran(1,0,3),"Any news?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2031 + get_ran(1,0,3),"More ale!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2031 + get_ran(1,0,3),"A bitter brew.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2031 + get_ran(1,0,3),"We need to travel.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2031 + get_ran(1,0,3),"I hate this ash.");

break;

beginstate 10;
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 14;
break;

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

 