----------------------------------- -- onMobFight Action ----------------------------------- function onMobFight(mob,target) local Wings = mob:getLocalVar("Wings"); local popTime = mob:getLocalVar("lastPetPop"); if (os.time() - popTime > 300) then local alreadyPopped = false; for Helper = mob:getID()+1, mob:getID()+2 do if (alreadyPopped == true) then break; else if (GetMobAction(Helper) == ACTION_NONE or GetMobAction(Helper) == ACTION_SPAWN) then SpawnMob(Helper, 300):updateEnmity(target); mob:setLocalVar("lastPetPop", os.time()); alreadyPopped = true; end end end end if (mob:getBattleTime() - mob:getLocalVar("Wings") > 180) then if (mob:AnimationSub() == 1) then if (GetMobAction(Helper) == ACTION_NONE or GetMobAction(Helper) == ACTION_SPAWN) then mob:useMobAbility(1026); mob:setLocalVar("Wings", mob:getBattleTime()); end elseif (mob:AnimationSub() == 2) then mob:AnimationSub(1); -- fly mob:addStatusEffectEx(EFFECT_ALL_MISS, 0, 1, 0, 0); mob:SetMobSkillAttack(true); mob:setLocalVar("Wings", mob:getBattleTime()); elseif (mob:AnimationSub() == 0) then mob:AnimationSub(1); -- fly mob:addStatusEffectEx(EFFECT_ALL_MISS, 0, 1, 0, 0); mob:SetMobSkillAttack(true); mob:setLocalVar("Wings", mob:getBattleTime()); end end end;