@LabelIndex 57396
@StringIndex 7204
class 0 undead_bandmaster : default_npc {
parameter:
	string	dmgzone1 = "25_15_frintessaE_02";
	string	dmgzone2 = "25_15_frintessaE_03";
	string	dmgzone3 = "25_15_frintessaE_04";
	int	Shoutman = 0;

handler:
	EventHandler CREATED() {
		if( Shoutman == 1 ) {
			myself::Shout(gg::MakeFString(1010644,"","","","",""));
		}
		myself::AddDoNothingDesire(5,5);
		myself.i_ai0 = 1;
		gg::Area_SetOnOff(dmgzone1,1);
		gg::Area_SetOnOff(dmgzone2,1);
		gg::Area_SetOnOff(dmgzone3,1);
		super;
	}

	EventHandler ATTACKED(attacker,damage,i0) {
		if( gg::Rand(100) < 33 ) {
			i0 = gg::GetIndexFromCreature(attacker);
			myself::BroadcastScriptEventEx(0,10033,i0,1500);
		}
	}

	EventHandler SCRIPT_EVENT(script_event_arg1,script_event_arg2,i0,c0) {
		if( script_event_arg1 == 10032 ) {
			if( script_event_arg2 == 0 ) {
				myself.i_ai0 = script_event_arg2;
			} else if( script_event_arg2 == 2 ) {
				myself.i_ai0 = script_event_arg2;
			} else if( script_event_arg2 == 4 ) {
				myself.i_ai0 = script_event_arg2;
			} else if( script_event_arg2 == 6 ) {
				myself.i_ai0 = script_event_arg2;
			}
		}
		if( script_event_arg2 == 10042 ) {
			if( Shoutman == 1 ) {
				myself::Shout(gg::MakeFString(1010645,"","","","",""));
			}
		}
		if( script_event_arg2 == 10043 ) {
			if( Shoutman == 1 ) {
				myself::Shout(gg::MakeFString(1010646,"","","","",""));
			}
		}
	}

	EventHandler MY_DYING(i0,maker0) {
		if( myself.i_ai0 == 0 ) {
			myself::DropItem1(myself.sm,8192,1);
		} else if( myself.i_ai0 == 2 ) {
			myself::DropItem1(myself.sm,8192,1);
		} else if( myself.i_ai0 == 4 ) {
			myself::DropItem1(myself.sm,8192,1);
		} else if( myself.i_ai0 == 6 ) {
			myself::DropItem1(myself.sm,8192,1);
		}
	}

}
