// TOWN SPECIAL ENCOUNTERS
//    Town 23: Cave of Motrax

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
//1

	last_abil = get_current_tick();

	if (gf(23,11) > 1)
		sf(23,11,1);
	
	set_level(30001,30);
	set_boss_level(30001,1);

	set_level(30002,7);
	set_level(30003,7);
	
//	set_name(,);
//	add_range_to_group(,,groupn);

	set_personality_name(460,"Motrax");
	set_personality_name(461,"Delta");
	set_personality_name(462,"Epsilon");
	set_personality_name(463,"Captain Ko");
	set_personality_name(464,"Marion");
	set_personality_name(465,"Platte");
	set_personality_name(466,"Ostoth");
	set_personality_name(467,"Enla");
	set_personality_name(468,"Linda");

	set_crime_tolerance(max_crime);

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

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if ((char_ok(2309)) && (gf(23,28) > 0))
		erase_char(2309);
		
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2300,"Ahssss.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2300,"Tired.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2300,"The pain. I never thought.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2300,"I was avenged.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2300,"They were my meat.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2300,"Good to see you.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2300,"My friends. Gone.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2301 + get_ran(1,0,1),"Meow.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2301 + get_ran(1,0,1),"Hissss!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2301 + get_ran(1,0,1),"Mew!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2303,"Zzz.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2303,"Zzzzz.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2303,"Mmmph.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2303,"What was that?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2303,"Heard scratching.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2305,"I miss my friend.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2305,"Is Motrax well?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2305,"So tired of this place.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2305,"I should go see Ko.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2312,"Hmmm.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2312,"Yes.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2312,"When will I be called for?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2306,"Grumble.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2306,"Poor notes.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2306,"The specimen fades.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2306,"Don't touch our books.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2313,"Hum hummm...");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2313,"That's one order done.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2313,"Time for a new batch.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2313,"Who is there?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(2313,"Cough.");


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

