// .txt

beginzonescript;

variables;

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

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

	set_name(4968,"Almara-Drayssa");
	set_name(4969,"Meeam-Drayssa");
	set_name(4970,"Quessik-Drayssa");
	
	add_range_to_group(4971,4978,7);
	set_name(30007,"Dragon Worshipper");
	set_level(30007,32);
	set_attack_bonus(30007,50);
	alter_stat(30007,19,10);	
	alter_stat(30007,20,10);

	add_range_to_group(4979,4982,8);
	set_name(30008,"Ogre Worker");
	set_level(30008,32);
	set_attack_bonus(30008,50);
	alter_stat(30008,19,10);	
	alter_stat(30008,20,10);

	add_range_to_group(4983,4990,9);
	set_name(30009,"Obedient Reptile");
	set_level(30009,32);
	set_attack_bonus(30009,50);
	alter_stat(30009,19,10);	
	alter_stat(30009,20,10);

	if (has_spec_item(5) == 0) {
		set_attitude(4968,10);
		set_attitude(4969,10);
		set_attitude(4970,10);
		set_attitude(30007,10);
		set_attitude(30008,10);
		set_attitude(30009,10);
		}


//	add_range_to_group(,,groupn);

	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;
		sf(46,5,1);
		}

	if ((gf(46,5) == 0) && (has_spec_item(5) > 0)) {
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4968,"What?");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4968,"Yes.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4968,"Hmmm.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4968,"The dragon is wise.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4969,"Mrrrr.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4969,"I can purchase.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4970,"I can restore you.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4970,"All hail Melanchion.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4970,"He brings peace.");
		if (get_ran(1,0,100) < 10)
			give_char_text_bubble(4970,"He will sustain us all.");

		}

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