// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,"");

	add_range_to_group(5414,5417,13);
	set_aggression(50013,50);
	add_range_to_group(5418,5421,14);
	set_aggression(50014,50);
	add_range_to_group(5422,5426,15);
	set_aggression(50015,50);
	
	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()) > 5))) {
		last_abil = get_current_tick();

		counter = counter + 1;
		if (counter == 10) {
			counter = 0;
			if (gf(50,5) == 0)
				sf(50,5,1);
				else sf(50,5,0);
			}
		}
break;

beginstate 10;
break;

beginstate 11;
	sf(50,0,1);
break;

beginstate 12;
	sf(50,1,1);
break;

beginstate 13;
break;


beginstate 21;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(525,230,4);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 22;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(525,227,0);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 23;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(541,242,0);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 24;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(540,244,4);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 25;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(550,244,2);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 26;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(552,245,6);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 27;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(567,250,2);
	// direction - 0,1 - north 2,3 - west 4,5 - south 6,7 - east
break;

beginstate 28;
	if (is_combat() == FALSE)
		print_str_color("You climb the stairs.",2);
	change_level(568,250,6);
	// 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);
