// .txt

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 3;
short last_abil;
short counter = 0;
short erased = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	set_name(16308,"Carole");
	set_name(16309,"Sergeant Mrrerum");
	set_name(16310,"Cundo");
	if (gf(151,1) > 0)
		erase_char(16310);
		
	set_name(16311,"Portal Road Guard");
	set_name(16312,"Portal Road Guard");
	set_name(16313,"Portal Road Guard");
	set_name(16314,"Portal Road Guard");


	add_range_to_group(16315,16321,31);
	set_name(30031,"Avernite Refugee");
	add_range_to_group(16322,16326,32);
	set_name(30032,"Avernite Refugee");

	add_range_to_group(16327,16331,33);
	
	set_name(16332,"Watchrat");
	set_name(16333,"Watchrat");
	set_name(16334,"Watchrat");
	set_name(16335,"Watchrat");
	
	set_name(16336,"Chief Gank");
	set_level(16336,14);
	set_boss_level(16336,1);
	set_level(16341,14);
	set_level(16342,14);
	set_level(16343,14);
	set_level(16344,14);
	set_level(16345,14);
	set_name(16341,"Big Goblin Warrior");
	set_name(16342,"Big Goblin Warrior");
	set_name(16343,"Big Goblin");
	set_name(16344,"Big Goblin");
	set_name(16345,"Big Goblin");
	
	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((erased == 0) && (gf(170,1) >= 12)) {
		erased = 1;
		erase_char(30031);
		erase_char(30032);
		}
		
	if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
		make_zone_hostile(); 
		im_hostile = 1;
		//erase_char(30000);
		begin_talk_mode(299);
		}

	// if (gf(,) == 0) {
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16308,"No food to spare.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16308,"My head aches.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16308,"The humming ... Always humming.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16309,"Mrrrr.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16309,"No lotteries.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16309,"We're closed.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16310,"Lizards are so fast.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16310,"A nice, juicy lizard ...");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16310,"Where's my special roll?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16315 + get_ran(1,0,6),"No more lotteries.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16315 + get_ran(1,0,6),"Have to move on.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16315 + get_ran(1,0,6),"No room at the inn.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16315 + get_ran(1,0,6),"The horde is coming!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16315 + get_ran(1,0,6),"Soldiers are no good.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16322 + get_ran(1,0,4),"Have to go soon.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16322 + get_ran(1,0,4),"Not much food here.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16322 + get_ran(1,0,4),"I'll draw white soon!");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16322 + get_ran(1,0,4),"How is the portal?");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16322 + get_ran(1,0,4),"Shhh. There's a soldier.");
	//	}

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

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