// .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(9836,"Jiggling Mass");
	set_name(9837,"Jiggling Mass");
	set_name(9838,"Jiggling Mass");
	set_aggression(9836,40);
	set_aggression(9837,40);
	set_aggression(9838,40);

	add_range_to_group(9839,9845,7);
	set_name(30007,"Ogre Servant");
	set_name(9846,"Giant Taskmaster");
	set_name(9847,"Giant Taskmaster");
	set_name(9848,"Tharvil Bonegnaw");
	set_boss_level(9848,1);
	if (gf(91,5) > 0) {
		erase_char(30007);
		erase_char(9846);
		erase_char(9847);
		erase_char(9848);
		}

	add_range_to_group(9849,9856,8);
	add_range_to_group(9857,9864,9);
	add_range_to_group(9865,9872,10);
	add_range_to_group(9873,9880,11);
	add_range_to_group(9881,9886,12);
	
	sf(91,4,0);
//	add_range_to_group(,,groupn);

	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((set_att == 0) && (gf(91,5) > 0)) {
		set_att = 1;
		set_act_at_dist(30007,1);
		set_attitude(30007,10);
		alert_char(30007);
		}
	
	
	//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;
	if ((set_att == 0) && (num_chars_in_group(7) > 0)) {
		set_att = 1;
		set_act_at_dist(30007,1);
		set_attitude(30007,10);
		alert_char(30007);
		if ((char_ok(9845)) && (get_attitude(9845) < 10))
			print_str_color("You've gone too far. The ogres snarl and charge!",3);
		}
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
	sf(91,4,1);
break;

beginstate 14;
	if (gf(91,8) == 0) {
		sf(91,8,1);
		if (has_spec_item(13) == 0)
			activate_hidden_group(7);
		begin_talk_mode(6);
		}
break;
//	print_str("");
//	set_terrain_string_range(".",1);
//	set_terrain_string_range("The sign says - .",1);
