// .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(15012,15015,7);
	set_name(30007,"Dancing Bones");
	set_level(30007,15);
	set_char_unkillable(30007,1);
	set_attack_bonus(30007,8);
	set_aggression(30007,40);

	set_name(15016,"Dancing Bones");
	set_boss_level(15016,2);
	set_level(15016,15);
	set_attack_bonus(15016,8);
	set_coloradj(15016,512);

	add_range_to_group(15017,15022,8);
	set_level(30008,15);
	set_aggression(30008,60);

	set_name(15023,"Avernite Soldier");
	set_name(15024,"Avernite Soldier");
	set_name(15025,"Avernite Soldier");

	set_name(15030,"Avram");
	set_name(15031,"Asmara");
	
	set_crime_tolerance(max_crime);

	
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if (gf(139,1) > 0)
		set_char_unkillable(30007,0);
		
	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(15030,"Come back!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(15030,"Stop it!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(15030,"Where did it go?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(15031,"Welcome!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(15031,"Meat, fresh and dried.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(15031,"Glad to see you.");

	//	}

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