// TOWN SPECIAL ENCOUNTERS
//    Town 53: Empire Archives

beginzonescript;

variables;

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

body;
 //1 2 34 5
 
beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,);
//	add_range_to_group(,,groupn);

	set_personality_name(1060,"Aydin");
	set_personality_name(1061,"Josie");

	set_name(30002,"Guardian Salamander");
	set_level(30002,27);
	set_boss_level(30002,1);
	set_aggression(30002,40);
	
	set_name(5311,"Plated Scumgiant");
	set_boss_level(5311,1);
	set_new_abil(5311,14);
	
	set_level(30003,28);
	change_max_health(30003,250);
	set_aggression(30003,25);
	
	set_aggression(30004,50);

	set_aggression(30005,50);
	set_name(5332,"Librarian Korzol");
	set_boss_level(5332,2);
	set_name(5313,"Flameeye");
	set_level(5313,28);
	set_boss_level(5313,1);
	
	set_crime_tolerance(max_crime);

	if (gf(53,25) > 0)
		erase_char(5300);
	if (gf(53,26) > 0)
		erase_char(5301);
		
	if (gf(53,23) > 0) {

		set_terrain(0,9,25,0);
		set_terrain(0,15,25,0);
		set_terrain(0,21,25,0);
		}
	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (gf(53,23) == 1) {
		sf(53,23,2);

		activate_hidden_group(18);
		set_boss_level(30001,2);
		set_attack_bonus(30001,20);
		
		set_terrain(0,9,25,0);
		set_terrain(0,15,25,0);
		set_terrain(0,21,25,0);
		}

	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5300,"Rescue at last.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5300,"I knew there was hope.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5300,"Is Josie all right?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5301,"You are real?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5301,"Should I die?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(5301,"What should I do?");
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);

