// TOWN SPECIAL ENCOUNTERS
//    Town 37: Mertis

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	set_aggression(3717,40);
	set_aggression(3718,40);
	set_aggression(3719,40);
	
//	set_name(,);
//	add_range_to_group(,,groupn);

	set_personality_name(740,"Elmer");
	set_personality_name(741,"Tina");
	set_personality_name(742,"Matt");
	set_personality_name(743,"Anhara");
	set_personality_name(744,"Rhoads");
	set_personality_name(745,"Cronan");
	set_personality_name(746,"Caelen");
	set_personality_name(747,"Lynn");
	set_personality_name(748,"Gorb");
	set_personality_name(749,"Caerno");
	set_personality_name(750,"Dougherty");

	set_crime_tolerance(max_crime);

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

	if (gf(37,24) > 0)
		erase_char(3706);
	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3700,"No auction today.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3700,"Check the livestock.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3700,"Selling mushroom meal tomorrow.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3700,"Hello, soldier.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3702,"Nikko, no.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3702,"Are you hungry, honey?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3702,"Need a bow, warrior?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3702,"We have javelins.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3724,"I have weapons.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3724,"Still need iron.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3724,"Obsidian is so brittle.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3724,"Sigh.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3703,"(Stir.)");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3703,"(Grind.)");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3703,"(Chop. Chop.)");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3704,"All hail Elgar!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3704,"Crush the bad!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3704,"Disembowel our foes.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3705,"A customer!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3705,"We have ale.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3705,"Common room is empty.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3706,"Welcome, envoy.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3706,"I am studying the passes.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3706,"Gray pass is best.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3706,"Red pass is worst.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3707,"Stay out of the secure cells.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3707,"I may have work for you.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3707,"Empire prisoners come here.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3707,"Too many forms.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3708,"Cough.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3708,"Ugh.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3708,"Can't stand it.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3708,"Closing in.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3709,"You won't break me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3709,"Shut up, Gorb.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3743,"Don't hurt me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3743,"I'll say anything.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(3743,"I know about the passes.");


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);

