// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();
	
	set_obj_act_at_dist(12635,1);
	set_obj_act_at_dist(12636,1);
	set_obj_act_at_dist(12721,1);
	
//	set_name(,"");

	add_range_to_group(7560,7565,37);
	set_aggression(30037,50);
	set_name(7565,"Basilisk");
	set_coloradj(7565,2);
	
	add_range_to_group(7566,7571,38);
	set_aggression(30038,50);
	set_name(7571,"Basilisk");
	set_coloradj(7571,2);

	set_name(7572,"Spark Lizard");
	set_boss_level(7572,1);
	set_aggression(7572,50);
	set_coloradj(7572,1026);
	set_name(7573,"Spark Lizard");
	set_boss_level(7573,1);
	set_aggression(7573,50);
	set_coloradj(7573,1026);
	set_name(7574,"Spark Lizard");
	set_boss_level(7574,1);
	set_aggression(7574,50);
	set_coloradj(7574,1026);
	set_name(7575,"Spark Lizard");
	set_boss_level(7575,1);
	set_aggression(7575,50);
	set_coloradj(7575,1026);
	
	set_name(7576,"Gremmin");
	
	sf(70,23,0);
	sf(70,24,0);

	set_name(7583,"Grim Trapper");
	set_name(7584,"Grim Trapper");

	set_name(7607,"Fiery Crocolisk");
	set_name(7608,"Fiery Crocolisk");
	set_name(7609,"Fiery Crocolisk");
	set_name(7610,"Fiery Crocolisk");
	set_name(7611,"Fiery Crocolisk");
	set_name(7612,"Fiery Crocolisk");
	set_level(7607,28);
	set_level(7608,28);
	set_level(7609,28);
	set_level(7610,28);
	set_level(7611,28);
	set_level(7612,28);

	set_name(7616,"Empire Dervish");
	set_level(7616,28);
	set_boss_level(7616,1);
	set_name(7617,"Empire Dervish");
	set_level(7617,28);
	set_boss_level(7617,1);
	set_aggression(7616,20);
	set_aggression(7617,20);

	set_name(7624,"Lightning Sentinel");
	set_name(7625,"Whirlwind Sentinel");
	set_level(7624,32);
	set_level(7625,32);
	set_boss_level(7624,1);
	set_boss_level(7625,1);

	set_name(7626,"Imprisoned Haakai");
	set_boss_level(7624,1);
	set_new_abil(7624,20);
	set_attack_bonus(7624,10);
	
	set_crime_tolerance(max_crime);

	if (gf(158,15) >= 9)
		sf(70,12,1);
		else erase_char(7627);
		
	if ((gf(70,10) > 0) && (gf(170,12) == 0))
		spawn_creature(7631);

	if (gf(70,9) == 0)
		sf(70,5,0);
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
		
	if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
		sf(70,22,1);
		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();
	//	}
break;

beginstate 10;
	sf(70,23,1);
break;

beginstate 11;
	sf(70,24,1);
break;

beginstate 12;
	if (gf(70,22) == 0) {
		change_crime_level(27,5);
		sf(70,22,1);
		make_zone_hostile();
		begin_talk_mode(12);
		}
break;

beginstate 13; // ambush ne
	if (gf(70,5) == 0) {
		sf(70,15,1);
		activate_hidden_group(37);
		begin_talk_mode(6);
		}
break;

beginstate 14; // ambush sw
	if (gf(70,5) == 0) {
		sf(70,14,1);
		activate_hidden_group(37);
		begin_talk_mode(6);
		}
break;

beginstate 15;
	if (((char_ok(7624)) && (get_attitude(7624) < 10)) || ((char_ok(7625)) && (get_attitude(7625) < 10))) {
		print_str_color("When you step onto the burnt area, you hear a soft chiming noise.",3);
		set_attitude(7624,10);
		set_attitude(7625,10);
		}
break;

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