// .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(2268,2272,25);
	set_level(30025,20);
	set_name(2272,"Bulging Wyrmkin");
	set_aggression(30025,60);

	add_range_to_group(2277,2280,26);
	set_name(30026,"Freezing Wight");
	set_level(30026,24);
	set_new_abil(30026,14);
	
	set_name(2281,"Horde Demonmaster");
	set_name(2282,"Horde Demonmaster");

	add_range_to_group(2287,2292,27);
	set_name(30027,"Blind Burrower");
	set_aggression(30027,30);
	alter_stat(30027,19,10);
	alter_stat(30027,28,10);

	add_range_to_group(2293,2298,28);
	set_name(30028,"Blind Burrower");
	set_aggression(30028,30);
	alter_stat(30028,19,10);
	alter_stat(30028,28,10);
	
	set_name(2299,"Maddened Giant");
	set_boss_level(2299,1);
	set_new_abil(2299,12);
	
	sf(21,6,0);
	
	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();
		
		if ((gf(21,6) > 0) && (gf(21,6) < 100)) {
			inc_flag(21,6,1);
			
			if (gf(21,6) == 3) {
				print_str_color("You hear hissing and slithering in the shadows.",2);
				
				spawn_creature(2300);
				set_name(2300,"Vicious Crawler");
				set_level(2300,25);
				alter_stat(2300,19,10);
				alter_stat(2300,28,10);
				force_char_status(2300,24,10);
				
				spawn_creature(2301);
				set_name(2301,"Vicious Crawler");
				set_level(2301,25);
				alter_stat(2301,19,10);
				alter_stat(2301,28,10);
				force_char_status(2301,24,10);
				}
			if (gf(21,6) == 4) {
				print_str_color("You hear hissing and slithering in the shadows.",2);
				
				spawn_creature(2302);
				set_name(2302,"Mindless Crawler");
				set_level(2302,25);
				set_resistance(2302,7,90);
				alter_stat(2302,28,10);
				force_char_status(2302,24,10);
				
				spawn_creature(2303);
				set_name(2303,"Mindless Crawler");
				set_level(2303,25);
				alter_stat(2303,19,10);
				alter_stat(2303,28,10);
				force_char_status(2303,24,10);
				}
			
			if (gf(21,6) == 5) {
				print_str_color("You hear hissing and slithering in the shadows.",2);
				
				spawn_creature(2304);
				set_name(2304,"Vicious Crawler");
				set_level(2304,25);
				alter_stat(2304,19,10);
				alter_stat(2304,28,10);
				force_char_status(2304,24,10);
				
				spawn_creature(2305);
				set_name(2305,"Vicious Crawler");
				set_level(2305,25);
				alter_stat(2305,19,10);
				alter_stat(2305,28,10);
				force_char_status(2305,24,10);
				}
			if (gf(21,6) == 6) {
				print_str_color("You hear hissing and slithering in the shadows.",2);
				
				spawn_creature(2306);
				set_name(2306,"Mindless Crawler");
				set_level(2306,25);
				set_resistance(2306,7,90);
				alter_stat(2306,28,10);
				force_char_status(2306,24,10);
				
				spawn_creature(2307);
				set_name(2307,"Mindless Crawler");
				set_level(2307,25);
				alter_stat(2307,19,10);
				alter_stat(2307,28,10);
				force_char_status(2307,24,10);
				
				spawn_creature(2308);
				set_name(2308,"Crawling Horror");
				set_level(2308,25);
				alter_stat(2308,19,10);
				alter_stat(2308,28,10);
				force_char_status(2308,24,10);
				set_boss_level(2308,1);
				set_new_abil(2308,2);
				}
			}
		}
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);
