@LabelIndex 16853
@StringIndex 0
class 0 summon_magicalattack : default_npc {
parameter:
	int	DDMagic = 262209537;
	int	step1_action01 = -1;

handler:
	EventHandler CREATED() {
		myself::AddPetDefaultDesire_Follow(20.000000);
	}

	EventHandler NO_DESIRE() {
		myself::AddPetDefaultDesire_Follow(20.000000);
	}

	EventHandler MENU_SELECTED(talker,ask,reply,i0,c0,action_id) {
		if( action_id == step1_action01 ) {
			if( myself::Skill_GetConsumeMP(DDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic) == 0 ) {
				myself::AddUseSkillDesireEx(myself.master.target_id,DDMagic,0,reply,ask,1000000,0);
			} else if( myself::Skill_InReuseDelay(DDMagic) > 0 ) {
				myself::ShowSystemMessage(myself.sm.master,2396);
			} else if( myself::Skill_GetConsumeMP(DDMagic) >= myself.sm.mp ) {
				myself::ShowSystemMessage(myself.sm.master,2394);
			} else if( myself::Skill_GetConsumeHP(DDMagic) >= myself.sm.hp ) {
				myself::ShowSystemMessage(myself.sm.master,2395);
			}
		}
	}

}
