// TOWN SPECIAL ENCOUNTERS
//    Town 3: Tower of Magi

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(60,"Vincent");
	set_personality_name(61,"Pygryn");
	set_personality_name(62,"Brantford");
	set_personality_name(63,"Mother Clarisse");
	set_personality_name(64,"X");
	set_personality_name(65,"Kayannan");
	set_personality_name(66,"Vidrain");
	set_personality_name(67,"Mahdavi");
	set_personality_name(68,"Suzanne");
	set_personality_name(69,"Nathan");
	set_personality_name(70,"Kelner");
	set_personality_name(71,"Elrad");
	set_personality_name(72,"Apprentice");

	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(300,"Three elixirs for Fort Emerald.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(300,"New order from Fort Duvno.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(300,"This Great Cave order is ready.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(300,"News from Formello farms?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(356,"I can make potions.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(356,"My skill is great.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(356,"You are lucky to have me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(303,"I'll buy your junk.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(303,"Sell me your junk.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(301,"Welcome.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(301,"This is a safe place.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(301,"Don't summon demons.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(310,"I'll show them.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(310,"I'll show them all.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(310,"Destruction from the skies.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(310,"Yes. Yes!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(329,"I'm late for class.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(329,"Do you need a lesson?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(329,"My spells are efficient.");
	if ((get_ran(1,0,100) < 20) && (gf(3,9) == 0))
		give_char_text_bubble(312,"You must master the portal.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(312,"I control the portal.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(312,"The portal is vital.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(312,"I can direct you.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(307,"Moss is looking good.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(307,"Nice mold development.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(307,"Lichen is difficult.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(307,"Yes! Good spore formation!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(309,"I can talk.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(309,"What a relief.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(309,"Want to chat?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(309,"I like words.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(344,"Skritch. Skritch.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(344,"Sigh.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(344,"Another letter to answer.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(344,"Ah! A visitor!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(311,"...");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(311,".....");


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

