// .txt

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 5;
short last_abil;
short counter = 0;
short did_att = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,"");

	add_range_to_group(4644,4648,7);

	set_level(30007,22);
	set_name(4644,"Roark");
	set_boss_level(4644,2);
	set_name(4645,"Geoff");
	set_boss_level(4645,1);
	set_name(4646,"Ellanna");
	set_boss_level(4646,1);
	set_name(4647,"Heraman");
	set_boss_level(4647,1);
	set_name(4648,"Sharon");
	set_boss_level(4648,1);
	if (gf(43,3) > 0)
		erase_char(30007);
		
	set_crime_tolerance(max_crime);

	sf(43,8,0);
	sf(43,9,0);

	add_range_to_group(4657,4661,8);
	set_aggression(30008,50);
	
	set_name(4667,"Seductive Banshee");
	set_name(4668,"Seductive Banshee");
	set_coloradj(4667,1);
	set_coloradj(4668,1);
	set_name(4669,"Wailing Banshee");
	set_name(4670,"Wailing Banshee");
	set_coloradj(4669,2);
	set_coloradj(4670,2);
	break;

beginstate EXIT_STATE;

break;

beginstate START_STATE;
	if (did_att == 0) {
		if ((char_ok(4644) == FALSE) || (get_attitude(4644) >= 10)) 
			did_att = 1;
		if ((char_ok(4645) == FALSE) || (get_attitude(4645) >= 10)) 
			did_att = 1;
		if ((char_ok(4646) == FALSE) || (get_attitude(4646) >= 10)) 
			did_att = 1;
		if ((char_ok(4647) == FALSE) || (get_attitude(4647) >= 10)) 
			did_att = 1;
		if ((char_ok(4648) == FALSE) || (get_attitude(4648) >= 10)) 
			did_att = 1;
		if (did_att > 0) {
			set_attitude(30007,10);
			alert_char(30007);
			}
		}
	if ((gf(43,4) > 0) && (gf(43,5) == 0) && (char_ok(4644))) {
		sf(43,5,1);
		talk_no_exit(30);
		}
		
	if ((get_crime_level() >= max_crime) && (im_hostile == 0)) {
		make_zone_hostile();
		im_hostile = 1;
		}

	// worms
	if (get_ran(1,0,100) == 50)
		sf(43,8,0);
	if (get_ran(1,0,100) == 50)
		sf(43,9,0);
	if ((get_quest_status(190) == 2) && (on_which_layer() == 0)) {
		if ((gf(43,8) == 0) && (party_dist_to_spot(89,238) <= 4)) {
			sf(43,8,1);
			if (party_has_item(196)) {
				spawn_creature(4649);
				spawn_creature(4650);
				spawn_creature(4651);
				spawn_creature(4652);
				begin_talk_mode(6);
				}
				else if (gf(43,10) == 0) {
					sf(43,10,1);
					begin_talk_mode(5);
					}
					else {
						print_str_color("The worms come to the surface of the water and sniff.",3);
						print_str_color("  They don't smell anything they like, so they swim away.",3);
						}
			}

		if ((gf(43,9) == 0) && (party_dist_to_spot(101,208) <= 4)) {
			sf(43,9,1);
			if (party_has_item(196)) {
				spawn_creature(4653);
				spawn_creature(4654);
				spawn_creature(4655);
				spawn_creature(4656);
				begin_talk_mode(6);
				}
				else if (gf(43,10) == 0) {
					sf(43,10,1);
					begin_talk_mode(5);
					}
					else {
						print_str_color("The worms come to the surface of the water and sniff.",3);
						print_str_color("  They don't smell anything they like, so they swim away.",3);
						}
			}
		}

	if ( (char_ok(4644)) && (get_attitude(4644) < 10)) {
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4644,"We keep to ourselves.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4644,"We side with Spire.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4644,"Bargha has gone mad.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4644,"No food for you.");
		}

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