// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	set_name(14155,"Private Deneray");
	set_name(14156,"Grounds Guard");
	set_name(14157,"Grounds Guard");

	set_name(14158,"Death Worshipper");
	set_level(14158,22);
	
	set_name(14159,"Quickghast");
	set_level(14159,20);
	set_new_abil(14159,20);
	set_name(14160,"Quickghast");
	set_level(14160,20);
	set_new_abil(14160,20);
	set_name(14161,"Quickghast");
	set_level(14161,20);
	set_new_abil(14161,20);

	set_name(14167,"Ruby Skeleton");
	set_level(14167,7);
	set_coloradj(14167,256);
	

	add_range_to_group(14171,14176,14);
	set_name(30014,"Grave Robber");
	set_name(14176,"Hathirax");
	set_level(30014,5);
	set_boss_level(14176,1);
	
	set_crime_tolerance(max_crime);

	sf(131,8,0);
	sf(131,9,0);
	
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
		
	//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(14155,"Shudder.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14155,"What was that?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14155,"I heard something.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(14155,"Did that bone move?");
	//	}

	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();
		
		if (gf(131,8) > 0) {
			inc_flag(131,8,-1);
			if (gf(131,8) == 0)
				begin_talk_mode(31);
			}
			
		}
break;

beginstate 10;
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 14;
	set_terrain_string_range("The sign says - Memorial Hall.",1);
break;


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