// .txt

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 5;
short last_abil;
short counter = 0;
short flip_state = 0;
short sum = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	set_name(16208,"Hossni");
	set_name(16209,"Captain Skye");
	set_name(16211,"Portal Guard");
	set_name(16214,"Avernite Refugee");
	set_name(16215,"Avernite Refugee");
	set_name(16216,"Avernite Refugee");
	set_name(16217,"Avernite Refugee");
//	add_range_to_group(,,groupn);

	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if ((flip_state == 0) && (gf(170,1) >= 12)) {
		flip_state = 1;
		spawn_creature(16210);
		set_name(16210,"Murdock");
		
		erase_char(16214);
		erase_char(16215);
		erase_char(16216);
		erase_char(16217);
		}
	if ((sum == 0) && (gf(164,3) == 2)) {
		sum = 1;
		spawn_creature(16218);
		set_name(16218,"Cackling Demon");
		set_level(16218,14);
		set_boss_level(16218,2);
		}
		
	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(16208,"Ahssss.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16208,"I like soldiersss.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16208,"I buy and sell.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16208,"Isss better to sell.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16209,"Curse this heat.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16209,"The humming never stops.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16209,"Watch for refugees.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16209,"Greetings, soldier.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16210,"Just leave me.");
	if (get_ran(1,0,100) < 10)
		give_char_text_bubble(16210,"Don't worry about me.");

	//	}

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