// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,"");

	add_range_to_group(4212,4219,49);
	set_name(30049,"Horde Warlizard");
	set_name(4218,"Horde Lizardmaster");
	set_boss_level(4218,1);
	set_name(4219,"Horde Lizardmaster");
	set_boss_level(4219,1);
	set_aggression(30049,60);

	set_name(4220,"Horde Gate Guard");
	set_name(4221,"Horde Gate Guard");
	set_name(4222,"Horde Gate Guard");
	set_name(4223,"Horde Gate Guard");
	set_name(4224,"Horde Priestess");
	set_name(4225,"Horde Priestess");
	set_name(4226,"Horde Priestess");

	set_name(4227,"Commander Bhish'Ess");
	set_level(4227,36);
	set_boss_level(4227,2);
	set_new_abil(4427,16);
	set_attack_bonus(4227,20);
	alter_stat(4227,29,6);
	
	set_name(4228,"Commander's Puppy");
	set_level(4228,30);
	set_boss_level(4228,1);
	set_resistance(4228,1,100);
	set_name(4229,"Commander's Puppy");
	set_level(4229,30);
	set_boss_level(4229,1);
	set_resistance(4229,6,100);

	set_name(4230,"Battlemage Gliesss");
	set_level(4230,32);
	set_boss_level(4230,1);

	add_range_to_group(4233,4240,50);
		add_range_to_group(4241,4248,51);
		add_range_to_group(4249,4256,52);
	
	if (gf(170,6) > 0)
		erase_char(30050);
		
	spawn_creature(4258);
	spawn_creature(4259);
	add_range_to_group(4257,4260,53);
	set_boss_level(30053,2);
	set_level(30053,30);
	set_name(4259,"Horde Warlizard");
	set_name(4260,"Horde Warlizard");
	
	set_crime_tolerance(max_crime);

	sf(39,4,0);
	
	if (gf(39,10) > 0)
		kill_object(7057,1);
	if (gf(39,11) > 0)
		kill_object(7081,1);
		
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((did_alert == 0) && (gf(39,4) > 0)) {
		did_alert = 1;
		set_act_at_dist(30050,1);
		alert_char(30050);
		set_act_at_dist(30051,1);
		alert_char(30051);
		set_act_at_dist(30052,1);
		alert_char(30052);
		set_act_at_dist(30053,1);
		alert_char(30053);
		}
	
	if ((gf(39,4) > 0) && (party_dist_to_spot(766,158) > 10)) {
		if (char_ok(4261) == FALSE) {
			spawn_creature(4261);
			set_summon_level(4261,1);
			}
		if (char_ok(4262) == FALSE) {
			spawn_creature(4262);
			set_summon_level(4262,1);
			}
		if (char_ok(4263) == FALSE) {
			spawn_creature(4263);
			set_summon_level(4263,1);
			}
		if (char_ok(4264) == FALSE) {
			spawn_creature(4264);
			set_summon_level(4264,1);
			}
		}
		
	//if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
	//	make_zone_hostile();
	//	im_hostile = 1;
	//	}

	// if (gf(,) == 0) {
	//if (get_ran(1,0,100) < 10)
	//	give_char_text_bubble(,"");
	//	}

	//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;
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

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