// TOWN SPECIAL ENCOUNTERS
//    Town 47: Giant Fort

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;

//123456789 10 11

beginstate INIT_STATE;
	last_abil = get_current_tick();

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

	set_aggression(30001,50);
	set_aggression(30002,50);
	set_aggression(30003,50);
	set_aggression(30004,50);
	set_aggression(30005,50);
	set_aggression(30006,50);
	set_aggression(30007,50);
	set_aggression(30008,50);
	set_aggression(30009,50);
	set_aggression(30010,50);

	set_aggression(4747,50);
	set_aggression(4744,50);
	
	set_name(30006,"Ogre Slave");
	
	set_name(30007,"Giant Blacksmith");
	set_boss_level(30007,1);
	set_coloradj(30007,1);
	add_ability(30007, 10, 135, 0);
	add_ability(30007, 11, 135, 0);
	
	set_name(4725,"Stablekeeper Ygra");
	set_boss_level(4725,1);
	add_ability(4725, 10, 160, 0);
	add_ability(4725, 11, 187, 0);

	set_name(4702,"Slavering Imp");
	set_level(4702,22);
	set_name(4703,"Slavering Imp");
	set_level(4703,22);
	set_name(4704,"Slavering Imp");
	set_level(4704,22);

	set_name(30008,"Lady Gremlin");

	set_name(4713,"Overseer Uighra");
	set_boss_level(4713,1);

	set_name(4714,"Imp Servitor");
	set_level(4714,20);

	set_name(4707,"Imp Servitor");
	set_level(4707,20);

	set_name(4708,"Imp Servitor");
	set_level(4708,20);
	
	set_crime_tolerance(max_crime);

	if (gf(47,1) > 0)
		erase_char(4777);
	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if (difficulty() > 1) {
		set_new_abil(4702,14);
		set_new_abil(4702,12);
		set_new_abil(4702,16);
		}
		else {
			set_new_abil(4702,10);
			set_new_abil(4702,11);
			set_new_abil(4702,10);
			}
			
	if ((gf(47,1) > 0) && (char_ok(4777) )) {
		erase_char(4777);
		activate_hidden_group(1);
		set_name(4700,"Frenzied Vampire");
		set_boss_level(4700,1);
		}
		
	if ((set_ter == 0) && (gf(47,11) > 0)) {
		set_ter = 1;
		set_terrain(0,12,53,204);
		}
	if ((set_ter2 == 0) && (gf(47,12) > 0)) {
		set_ter2 = 1;
		set_terrain(0,22,53,204);
		}
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);

