// .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(5836,5843,1);
	add_range_to_group(5844,5851,2);
	add_range_to_group(5852,5859,3);

	spawn_creature(5860);
	spawn_creature(5861);
	add_range_to_group(5860,5863,4);
	set_boss_level(30004,2);
	set_level(30004,30);
	set_name(5863,"Horde Warlizard");
	set_name(5862,"Horde Warlizard");


	add_range_to_group(5868,5872,5);
	set_level(30005,30);
	set_boss_level(30005,-1);
	set_name(30005,"Seething Cavebat");
	
	set_crime_tolerance(max_crime);

	sf(54,6,0);
	
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((did_alert == 0) && (gf(54,6) > 0)) {
		did_alert = 1;
		set_act_at_dist(30001,1);
		alert_char(30001);
		set_act_at_dist(30002,1);
		alert_char(30002);
		set_act_at_dist(30003,1);
		alert_char(30003);
		set_act_at_dist(30004,1);
		alert_char(30004);
		}

	if ((gf(54,6) > 0) && (party_dist_to_spot(800,194) > 10)) {
		if (char_ok(5864) == FALSE) {
			spawn_creature(5864);
			set_summon_level(5864,1);
			}
		if (char_ok(5865) == FALSE) {
			spawn_creature(5865);
			set_summon_level(5865,1);
			}
		if (char_ok(5866) == FALSE) {
			spawn_creature(5866);
			set_summon_level(5866,1);
			}
		if (char_ok(5867) == FALSE) {
			spawn_creature(5867);
			set_summon_level(5867,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);
