// TOWN SPECIAL ENCOUNTERS
//    Town 54: Patrick's Tower

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_name(,);
//	add_range_to_group(,,groupn);

	set_personality_name(1080,"Patrick");
	set_personality_name(1081,"Rita");
	set_personality_name(1082,"Marco");
	set_personality_name(1083,"Hathwisa");
	set_personality_name(1084,"Cochran");
	set_personality_name(1085,"Jade");
	set_personality_name(1086,"Kelli");
	set_personality_name(1087,"Captain Rabin");
	set_personality_name(1088,"Julz");
	set_personality_name(1089,"Felix");
	set_personality_name(1090,"Infernal Beast");

	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(54,12) > 0) {
		set_terrain(0,25,27,264);
		set_terrain(0, 26, 24,0);
		}
	if (gf(54,13) > 0) {
		set_terrain(0,25,28,264);
		set_terrain(0, 26, 25,0);
		}

	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5426,"It never ends.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5426,"To be young.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5426,"Hathwisa?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5426,"Curse the Empire.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5426,"They have taken everything.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5400,"What was that?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5400,"They could attack any moment.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5400,"Always be ready.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5400,"Hello, warrior.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5400,"Find any artifacts?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5402,"Real flour.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5402,"Actual fruit.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5402,"Spices!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5402,"Surface tea. Can you imagine?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5403,"Welcome.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5403,"Sit. Rest.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5403,"Always work to do.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5421,"Actual surface dirt.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5421,"Such a rarity.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5421,"Enjoy the smell.");
	if (get_ran(1,0,100) < 20)
		give_char_text_bubble(5421,"I'm an alchemist by trade.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5405,"Hummm.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5405,"Hum. Hummmm.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5405,"My mind is strong.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5405,"I will focus.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5416,"A stranger.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5416,"I am working.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5416,"Much to learn.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5416,"Cough.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5406,"The front needs me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5406,"I should be there.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5406,"I am not weak.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5406,"I am not tired.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5407,"A good day.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5407,"Nobody can focus.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5407,"What was I doing?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5407,"Where is Jade?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5407,"Kelli is hiding.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5409,"Meow.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5409,"I'm hungry.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5409,"Serve me.");
	if (get_ran(1,0,100) < 15)
		give_char_text_bubble(5410,"...");


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

