// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,"");

	set_aggression(5184,70);
	set_aggression(5185,70);
	set_aggression(5186,70);
	set_aggression(5187,70);

	add_range_to_group(5188,5194,1);
	set_name(5192,"Vicious Watchwolf");
	set_level(5192,22);
	set_name(5193,"Vicious Watchwolf");
	set_level(5193,22);
	set_name(5194,"Vicious Watchwolf");
	set_level(5194,22);
	set_aggression(30001,70);

	add_range_to_group(5195,5199,2);
	set_name(5197,"Vicious Watchwolf");
	set_level(5197,22);
	set_name(5198,"Vicious Watchwolf");
	set_level(5198,22);
	set_name(5199,"Inferno Watchwolf");
	set_coloradj(5199,256);
	set_level(5199,22);
	set_aggression(30002,70);

	add_range_to_group(5204,5209,3);
	set_name(5208,"Inferno Watchwolf");
	set_coloradj(5208,256);
	set_level(5208,22);
	set_name(5209,"Inferno Watchwolf");
	set_coloradj(5209,256);
	set_level(5209,22);
	
	set_name(5216,"Deadeye Slinger");
	set_attack_bonus(5216,15);
	set_new_abil(5216,20);
	set_name(5217,"Deadeye Slinger");
	set_attack_bonus(5217,15);
	set_new_abil(5217,20);
	set_name(5218,"Deadeye Slinger");
	set_attack_bonus(5218,15);
	set_new_abil(5218,20);
	set_name(5219,"Deadeye Slinger");
	set_attack_bonus(5219,15);
	set_new_abil(5219,20);

	set_name(5221,"Inferno Watchwolf");
	set_coloradj(5221,256);
	set_level(5221,22);
	set_name(5222,"Inferno Watchwolf");
	set_coloradj(5222,256);
	set_level(5222,22);
	
	set_name(5225,"Headman Glathnok");
	set_boss_level(5225,1);
	set_new_abil(5225,15);
	alter_stat(5225,29,8);

	add_range_to_group(5238,5242,4);
	set_name(30004,"Pet Rockhound");
	set_level(30004,28);
	set_attack_bonus(30004,10);
	change_max_health(30004,100);
	set_resistance(30004,7,75);
	
	set_crime_tolerance(max_crime);

	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(,"");
	//	}

	if (((is_combat()) && (tick_difference(last_abil,get_current_tick()) > 0)) || ((is_group()) && (tick_difference(last_abil,get_current_tick()) > 1))) {
		last_abil = get_current_tick();
		
		if (gf(48,8) == 1) {
			counter = counter + 1;
			if (counter == 2) {
				sf(48,8,2);
				activate_hidden_group(1);
				begin_talk_mode(11);
				}
			}
		}
break;

beginstate 10;
	if (set_att == 0) {
		set_att = 1;
		
		set_attitude(30004,10);
		set_act_at_dist(30004,1);
		}
break;

beginstate 11;
	set_terrain_string_range("The sign has been used for stone-throwing practice. It's unreadable.",1);
break;

beginstate 12;
break;

beginstate 13;
break;


beginstate 20;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(443,244,4);
	// 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(443,247,0);
	// 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);
