// TOWN SPECIAL ENCOUNTERS
//    Town 5: Cotra

beginzonescript;

variables;

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

body;

//1234567 9

beginstate INIT_STATE;
	last_abil = get_current_tick();

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

	set_aggression(30001,60);
	set_aggression(30002,60);
	set_aggression(30007,60);
	
	set_personality_name(101,"Yong-Mi");

	set_crime_tolerance(max_crime);

	set_name(569,"Raider Thressa");
	set_boss_level(569,1);
	
	set_name(538,"Eyebeast Chel-Far");
	set_name(526,"Eyebeast Hynga-Far");
	
	if (gf(5,19) > 0) {
		erase_char(529);
		erase_char(530);
		}
		else {
			set_name(529,"Mayor's Bones");
			set_resistance(529,0,95);
			set_resistance(529,1,95);
			set_resistance(529,2,95);
			set_resistance(529,5,80);
			set_resistance(529,6,95);
			place_particle_num(529,22,12,5);		
			place_particle_num(529,24,13,5);		

			set_name(530,"Commander's Bones");
			set_resistance(530,0,95);
			set_resistance(530,1,95);
			set_resistance(530,2,95);
			set_resistance(530,5,80);
			set_resistance(530,6,95);
			place_particle_num(530,22,12,5);		
			place_particle_num(530,24,13,5);		
			}
			
	if (gf(5,13) > 0)
		erase_char(516);

	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (counter < 3) {
		counter = counter + 1;
		if ((gf(5,6) == 0) && (counter >= 3)) {
			sf(5,6,1);
			ok_dlog(37,3);
			}
		}

	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(516,"At last.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(516,"Shhhh!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(516,"Be careful.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(516,"I need help.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(516,"The Empire is here.");
	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);

