// .txt

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 5;
short last_abil;
short counter = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	add_range_to_group(2376,2383,33);
	set_name(2376,"Captain Esmee");
	set_name(2377,"Essalah");
	set_name(2378,"Incantor Abadon");
	set_name(2379,"Avernite Warrior");
	set_name(2380,"Avernite Warrior");
	set_name(2381,"Avernite Warrior");
	set_name(2382,"Avernite Warrior");
	set_name(2383,"Avernite Warrior");
	if (gf(22,9) > 0)
		erase_char(30033);
	if (gf(22,8) == 1) 
		sf(22,8,2);
	if (gf(22,8) > 0) {
		erase_char(2379);
		erase_char(2380);
		erase_char(2381);
		erase_char(2382);
		erase_char(2383);
		}

	add_range_to_group(2384,2391,31);
	set_name(30031,"Gruesome Watchwolf");
	set_boss_level(30031,1);
	set_attack_bonus(30031,10);

	add_range_to_group(2392,2396,32);
	set_name(30032,"Avernite Traitor");
	set_new_abil(30032,20);
	set_name(2392,"Kellar");
	set_level(2392,28);
	set_boss_level(2392,1);
	set_new_abil(2392,16);
	if (char_ok(2392) == FALSE)
		set_attitude(30032,10);
	alter_stat(30032,28,6);

		
	add_range_to_group(2397,2404,34);
	set_name(30034,"Horde Flinger");
	set_level(30034,26);
	set_attack_bonus(30034,10);
	set_aggression(30034,70);
	
	add_range_to_group(2405,2412,35);
	set_level(30035,30);
	set_name(30035,"Horde Warrior");
	set_attack_bonus(30035,10);
	set_aggression(30035,70);
	
	set_name(2413,"Horde Enchanter");
	set_name(2414,"Horde Demonmaster");
	set_level(2414,28);

	set_aggression(2413,70);
	set_aggression(2414,70);
	set_aggression(2415,70);
	set_aggression(2416,70);

	set_name(2417,"Battlemaster Taross");
	set_boss_level(2417,1);
	alter_stat(2417,19,10);
	alter_stat(2417,29,10);
	set_new_abil(2417,15);
	
	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
		
	if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
		make_zone_hostile();
		im_hostile = 1;
		sf(22,9,1);
		}

	if (gf(22,9) == 0) {
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2376,"Good to see you.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2376,"Not much to offer.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2376,"Cramped, isn't it?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2376,"We've learned a lot.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2377,"Hssss.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2377,"I'm not enemy.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2377,"Come sit.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2378,"Fwoosh!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(2378,"Poof.");

		}

	//if (((is_combat()) && (tick_difference(last_abil,get_current_tick()) > 0)) || ((is_group()) && (tick_difference(last_abil,get_current_tick()) > 5))) {
	//	last_abil = get_current_tick();
	//	}
break;

beginstate 10;
	sf(22,0,1);
break;

beginstate 11;
	sf(22,1,1);
break;

beginstate 12;
	set_terrain_string_range("These traps have been temporarily deactivated.",1);
break;

beginstate 13;
break;

//	print_str("");
//	set_terrain_string_range(".",1);
//	set_terrain_string_range("The sign says - .",1);
