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

	if (gf(8,8) > 1)
		erase_char(877);

	set_name(880,"Mummified Chitrach");
	set_name(881,"Mummified Chitrach");
	set_name(882,"Mummified Chitrach");
	set_name(883,"Mummified Chitrach");
	set_name(884,"Mummified Chitrach");
	set_level(880,1);
	set_level(881,1);
	set_level(882,1);
	set_level(883,1);
	set_level(884,1);
	
	add_range_to_group(885,892,14);
	set_name(30014,"Scavenger Rat");
	set_level(30014,28);
	set_resistance(30014,6,100);

	add_range_to_group(893,899,15);

	add_range_to_group(904,908,16);
	set_name(904,"Horde Warrior");
	set_name(905,"Horde Warrior");
	set_name(906,"Horde Cultist");
	set_name(907,"Horde Warlizard");
	set_name(908,"Horde Warlizard");
	set_level(907,26);
	set_level(908,26);
	
	set_crime_tolerance(max_crime);

	if (gf(8,9) > 1) {
		kill_object(1508,1);
		kill_object(1509,1);
		}
	
	if (gf(8,7) > 0)
		sf(8,12,1);
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
		
	if (((get_crime_level() >= max_crime) || (gf(8,12) > 0)) && (im_hostile == 0)) {
		sf(8,12,1);
		make_zone_hostile();
		im_hostile = 1;
		}

	if (gf(8,12) == 0) {
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(868,"I'm a chief!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(868,"We have traveled far!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(868,"I am dignified!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(869,"Pew! Pew!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(869,"That's a nice rock.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(869,"Did my trap explode?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(870,"All hail the dragon!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(870,"He will save us!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(870,"Hooray for Melanchion!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(871,"Kassshhhhh!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(871,"Kafwoooosh!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(871,"Ghhhhaaaahssssshhhhh!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(873,"Ahhh!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(873,"Ouch!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(873,"Stop it!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(873,"Eeek! A person!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(874 + get_ran(1,0,2),"Eeee!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(874 + get_ran(1,0,2),"Wheeee!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(874 + get_ran(1,0,2),"Bite! Bite!");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(874 + get_ran(1,0,2),"Who's that?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(874 + get_ran(1,0,2),"You're cute!");

		}

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

beginstate 20;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(561,5,2);
	// 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(571,5,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);
