// TOWN SPECIAL ENCOUNTERS
//    Town 49: Fort Dolthar

beginzonescript;

variables;

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

body;

//12345 6

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,);
//	add_range_to_group(,,groupn);

	sf(49,20,1);
	
	set_aggression(30001,70);
	set_aggression(30002,70);
	set_aggression(30005,60);
	
	set_name(4934,"Shaper Thrivit");
	set_boss_level(4934,2);
	set_name(4935,"Frenzied Stalker");
	set_boss_level(4935,1);
	
	if (gf(49,11) > 0) {
		erase_char(30006);
		}
		
	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;

	if ((gf(49,21) == 0) && (party_within_dist(32,43,5))) {
		sf(49,21,1);
		sf(49,20,0);
		activate_hidden_group(12);
		ok_dlog(49,1);
		}
		
	if ((gf(49,24) == 0) && (get_terrain(0,23,31) == 0)) {
		set_terrain(0,23,31,143);
		set_terrain(0,24,31,143);
		
		}
	if ((gf(49,24) != 0) && (get_terrain(0,23,31) != 0)) {
		set_terrain(0,23,31,0);
		set_terrain(0,24,31,0);
		
		}
	clear_fields(19,12);	
	clear_fields(19,13);	
	clear_fields(19,14);	
break;

beginstate 10;
	if ((char_ok(4953)) && (get_attitude(4953) < 10)) {
		ok_dlog(20,3);
		set_attitude(30006,10);
		}
		
		
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 14;
break;

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

