// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	add_range_to_group(17175,17182,49);
	set_name(17182,"Shaman Bonesnap");
	change_max_health(17182,50);

	add_range_to_group(17199,17294,50);
	set_level(30050,5);
	
	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((did_spawn == 0) && (get_quest_status(152) == 2) && (gf(159,0) == 0) && (gf(159,1) == 0) && (char_ok(17197) == FALSE)) {
		did_spawn = 1;
		spawn_creature(17197);
		}
		
	//if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
	//	make_zone_hostile();
	//	im_hostile = 1;
	//	}



	//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;
	set_terrain_string_range("It looks like someone was recently ambushed at this small camp.",1);
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 20;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(370,727,0);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 21;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(370,730,4);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

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