// TOWN SPECIAL ENCOUNTERS
//    Town 8: The Castle

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(160,"King Micah");
	set_personality_name(161,"Rone");
	set_personality_name(162,"Gilda");
	set_personality_name(163,"Prince Chevyn");
	set_personality_name(164,"Lorraine");
	set_personality_name(165,"Lithgow");
	set_personality_name(166,"Curtin");
	set_personality_name(167,"Kristen");
	set_personality_name(168,"Levitt");
	set_personality_name(169,"Ackroyd");
	set_personality_name(170,"Fred");

	set_name(852,"Big Fred");
	set_boss_level(852,1);
	
	set_name(30001,"Guard Basilisk");
	set_level(30001,26);
	set_boss_level(30001,1);
	set_new_abil(30001,20);
	
	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);
			}
	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(800,"More reports?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(800,"That is done.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(800,"What is next?");
	if ((get_ran(1,0,100) < 20) && (gf(16,11) == 0))
		give_char_text_bubble(800,"Take this message.");
	if ((get_ran(1,0,100) < 20) && (gf(16,11) == 0))
		give_char_text_bubble(800,"I have a major mission.");
	if ((get_ran(1,0,100) < 20) && (gf(16,11) > 0))
		give_char_text_bubble(800,"There is hope now.");
	if ((get_ran(1,0,100) < 20) && (gf(16,11) > 0))
		give_char_text_bubble(800,"Garzahd has fallen.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(801,"Realms.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(801,"Seek.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(801,"Defense.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(801,"Hope.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(801,"Tired.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(811,"I give our clearances.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(811,"Spies are rewarded.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(811,"I live to help.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(818,"Hi!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(818,"I'm the prince!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(818,"I am royalty.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(818,"I'll be king someday. Or not.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(804,"Where's my Eastern Gallery map?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(804,"Tunnel reports from the north.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(804,"Hmm. A new chasm.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(804,"The Northern Islands?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(802,"Oh dear.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(802,"Hmmph.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(802,"Never enough.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(802,"Another soldier?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(806,"Hmmm.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(806,"Ummmmm.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(806,"Join me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(807,"Come and rest.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(807,"Are you hurt?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(807,"I will atone.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(807,"I heal and teach.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(805,"Ahhh.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(805,"Help me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(805,"Free me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(805,"I know nothing.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(809,"Ooof.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(809,"Hmmph.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(845,"Hiss.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(845,"Sssss.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(845,"HISS!");

	if (char_ok(800) == FALSE)
		begin_talk_mode(2);
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);

