// TOWN SPECIAL ENCOUNTERS
//    Town 12: Angierach

beginzonescript;

variables;

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

//12345 7 10

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

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

	set_name(1266,"Balor of the Ten");
	set_boss_level(1266,1);
	set_name(1267,"Ynka of the Ten");
	set_boss_level(1267,1);
	change_max_health(1267,100);
	set_aggression(30001,40);
	add_ability(30001, 10, 200, 0);
	set_attack_bonus(30001,20);
	
	set_aggression(30002,40);
	set_level(30002,28);

	set_aggression(30003,40);
	change_max_health(30003,100);
	set_attack_bonus(30003,20);
	set_name(1204,"Oriket of the Ten");
	set_boss_level(1204,1);
	set_name(1264,"Seleta of the Ten");
	set_boss_level(1264,1);
	set_name(1203,"Vorg of the Ten");
	set_boss_level(1203,1);
	
	set_name(30004,"Crypt Vampire");
	set_level(30004,28);
	set_boss_level(30004,1);
	set_attack_bonus(30004,25);
	
	set_level(30005,28);
	set_attack_bonus(30005,25);

	set_aggression(30007,40);
	change_max_health(30007,100);
	set_attack_bonus(30007,20);
	set_name(1222,"Infernal of the Ten");
	set_boss_level(1222,1);
	set_name(1220,"Hrrma of the Ten");
	set_boss_level(1220,1);
	set_name(1221,"Orrun of the Ten");
	set_boss_level(1221,1);
	set_name(1253,"Alass of the Ten");
	set_boss_level(1253,1);

	
	set_personality_name(240,"Quinby");

	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	clear_fields(27,46);
	clear_fields(27,47);
	clear_fields(31,46);
	clear_fields(31,47);
	
	if ((gf(12,23) == 0) && (is_field(31,60,2))) {
		sf(12,23,1);
		ok_dlog(59,1);
		}
	if ((gf(12,23) > 0) && (set_ter == 0)) {
		set_ter = 1;
		set_terrain(0,29,55,0);
		set_terrain(0,30,55,0);
		set_terrain(0,31,55,0);
		set_terrain(0,32,55,0);
		set_terrain(0,33,55,0);

		set_terrain(0,29,56,0);
		set_terrain(0,29,57,0);
		set_terrain(0,29,58,0);

		set_terrain(0,33,56,0);
		set_terrain(0,33,57,0);
		set_terrain(0,33,58,0);

		set_terrain(0,29,59,0);
		set_terrain(0,30,59,0);
		set_terrain(0,31,59,0);
		set_terrain(0,32,59,0);
		set_terrain(0,33,59,0);
		}
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);

