// TOWN SPECIAL ENCOUNTERS
//    Town 9: Pyrog's Cave

beginzonescript;

variables;

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

body;

//123 45 67 8 9 10 11

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,);
//	add_range_to_group(,,groupn);
	sf(9,24,0);
	
	set_aggression(30001,60);
	set_level(30001,26);
	set_aggression(30002,60);
	set_level(30002,26);
	
	set_name(964,"Diviner Xaga");
	set_boss_level(964,1);
	set_name(972,"Overseer Jugran");
	set_boss_level(972,1);
	
	change_max_health(918,600);

	set_aggression(30003,40);
	set_level(30003,28);
	
	set_level(921,28);
	set_name(921,"Lava Lizard");
	set_attack_bonus(921,30);
	set_level(922,28);
	set_name(922,"Lava Lizard");
	set_attack_bonus(922,30);

	set_level(30003,28);
	set_aggression(30003,75);
	set_attack_bonus(30003,20);
	
	set_name(985,"Dervish Fedra");
	set_boss_level(985,1);
	
	set_level(30004,28);
	set_attack_bonus(30004,30);
	change_max_health(30004,200);
	
	set_name(917,"Mindtaker Agent");
	add_ability(917, 10, 65, 0);
	set_new_abil(917,5);
	set_name(974,"Mindtaker Agent");
	add_ability(974, 10, 65, 0);
	set_new_abil(974,5);
	
	set_level(30005,28);
	set_attack_bonus(30005,30);
	change_max_health(30005,200);
	
	set_name(913,"Terror Agent");
	add_ability(913, 10, 127, 0);
	set_new_abil(913,6);
	set_name(954,"Terror Agent");
	add_ability(954, 10, 127, 0);
	set_new_abil(954,6);

	set_level(30006,28);
	set_attack_bonus(30006,50);
	change_max_health(30006,200);
	set_level(30007,28);
	set_attack_bonus(30007,50);
	change_max_health(30007,200);

	set_name(942,"Mindtaker Agent");
	add_ability(942, 10, 65, 0);
	set_new_abil(942,5);
	set_boss_level(942,1);
	set_name(951,"Terror Agent");
	add_ability(951, 10, 127, 0);
	set_new_abil(951,6);
	set_boss_level(951,1);

	set_level(30008,28);
	set_attack_bonus(30008,50);
	change_max_health(30008,200);

	set_name(959,"Incantor Frex");
	set_boss_level(959,1);
	set_name(960,"Cultist Hyarule");
	set_boss_level(960,1);

	set_level(30009,28);
	set_attack_bonus(30009,50);
	change_max_health(30009,200);
	set_name(30009,"Rakshasa Hireling");

	set_level(30010,28);
	set_attack_bonus(30010,50);
	set_boss_level(30010,1);
	set_level(30011,28);
	set_attack_bonus(30011,50);
	set_boss_level(30011,1);
	
	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if ((set_ter == 0) && (gf(9,19) > 0)) {
		set_ter = 1;
		set_terrain(0,19,11,0);
		}
	
	if ((set_ter2 == 0) && (gf(9,2) > 0)) {
		set_ter2 = 1;
		kill_object(3930,1);
		}
break;

beginstate 10;
	if ((char_ok(918)) && (get_attitude(918) < 10))
		set_attitude(918,10);

			if (gf(9,16) == 0) {
				ok_dlog(56,3);
				sf(9,16,1);
				}
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);

