// TOWN SPECIAL ENCOUNTERS
//    Town 28: Avit

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(560,"Tekora-Tel");
	set_personality_name(561,"Sera");
	set_personality_name(562,"Iglit");
	set_personality_name(563,"Aif");
	set_personality_name(564,"Keripa");
	set_personality_name(565,"Azik");
	set_personality_name(566,"Stal");
	set_personality_name(567,"Vahnatai Warrior");
	set_personality_name(568,"Forla-Te");
	set_personality_name(569,"Bott");
	set_personality_name(570,"Bon-Ihrno");

	set_crime_tolerance(max_crime);

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

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2800,"Welcome and sit.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2800,"We know your talk.");
	if ((get_ran(1,0,100) < 20) && (gf(28,9) == 0))
		give_char_text_bubble(2800,"Find Bon-Ihrno.");
	if ((get_ran(1,0,100) < 20) && (gf(28,9) == 0))
		give_char_text_bubble(2800,"You must do the ritual.");
	if ((get_ran(1,0,100) < 10) && (gf(28,9) > 0))
		give_char_text_bubble(2800,"The ritual is done.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2811,"Bon-Ihrno brought you.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2811,"I tend to the pools.");
	if ((get_ran(1,0,100) < 20) && (gf(28,9) == 0))
		give_char_text_bubble(2811,"Perform the ritual.");
	if ((get_ran(1,0,100) < 20) && (gf(28,9) == 0))
		give_char_text_bubble(2811,"I teach the ritual.");
	if ((get_ran(1,0,100) < 10) && (gf(28,9) > 0))
		give_char_text_bubble(2811,"You are welcomed.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2802,"I am a Ponder.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2802,"Many human problems.");
	if ((get_ran(1,0,100) < 10) && (gf(20,0) == 0))
		give_char_text_bubble(2802,"Olgai is answer.");
	if ((get_ran(1,0,100) < 10) && (gf(20,0) == 0))
		give_char_text_bubble(2802,"Want you to Olgai Council.");
	if ((get_ran(1,0,100) < 10) && (gf(20,0) > 0))
		give_char_text_bubble(2802,"You have done great work.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2810,"Welcome, outsider.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2810,"You come so far.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2810,"So far to go.");
	if ((get_ran(1,0,100) < 25) && (gf(28,9) == 0))
		give_char_text_bubble(2810,"You must talk to me.");
	if ((get_ran(1,0,100) < 25) && (gf(28,9) > 0) && (gf(20,0) == 0))
		give_char_text_bubble(2810,"Let me guide you.");
	if ((get_ran(1,0,100) < 25) && (gf(28,9) > 0) && (gf(20,0) == 0))
		give_char_text_bubble(2810,"I'll help you lower the barriers.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2809,"Hrm.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2809,"(Hoe. Hoe.)");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2809,"No talk good.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2808,"Outsider.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2808,"Beware.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2808,"We watch you.");

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

