Code: Select all
Effect_list = {
EFFECT_FLEE,
EFFECT_HASTE,
EFFECT_BLAZE_SPIKES,
EFFECT_ICE_SPIKES,
EFFECT_BLINK,
EFFECT_STONESKIN,
EFFECT_SHOCK_SPIKES,
EFFECT_AQUAVEIL,
EFFECT_PROTECT,
EFFECT_SHELL,
EFFECT_REGEN,
EFFECT_REFRESH,
EFFECT_BOOST,
EFFECT_BERSERK,
EFFECT_DEFENDER,
EFFECT_AGGRESSOR,
EFFECT_FOCUS,
EFFECT_DODGE,
EFFECT_SOULEATER,
EFFECT_LAST_RESORT,
EFFECT_COPY_IMAGE,
EFFECT_THIRD_EYE,
EFFECT_WARCRY,
EFFECT_HOLY_CIRCLE,
EFFECT_ARCANE_CIRCLE,
EFFECT_STR_BOOST,
EFFECT_DEX_BOOST,
EFFECT_VIT_BOOST,
EFFECT_AGI_BOOST,
EFFECT_INT_BOOST,
EFFECT_MND_BOOST,
EFFECT_CHR_BOOST,
EFFECT_MAX_HP_BOOST,
EFFECT_MAX_MP_BOOST,
EFFECT_ACCURACY_BOOST,
EFFECT_ATTACK_BOOST,
EFFECT_EVASION_BOOST,
EFFECT_DEFENSE_BOOST,
EFFECT_ENFIRE,
EFFECT_ENBLIZZARD,
EFFECT_ENAERO,
EFFECT_ENSTONE,
EFFECT_ENTHUNDER,
EFFECT_ENWATER,
EFFECT_BARFIRE,
EFFECT_BARBLIZZARD,
EFFECT_BARAERO,
EFFECT_BARSTONE,
EFFECT_BARTHUNDER,
EFFECT_BARWATER,
EFFECT_BARSLEEP,
EFFECT_BARPOISON,
EFFECT_BARPARALYZE,
EFFECT_BARBLIND,
EFFECT_BARSILENCE,
EFFECT_BARPETRIFY,
EFFECT_BARVIRUS,
-- EFFECT_RERAISE, -- Causes server to crash
EFFECT_PHALANX,
EFFECT_WARDING_CIRCLE,
EFFECT_ANCIENT_CIRCLE,
EFFECT_STR_BOOST_II,
EFFECT_DEX_BOOST_II,
EFFECT_VIT_BOOST_II,
EFFECT_AGI_BOOST_II,
EFFECT_INT_BOOST_II,
EFFECT_MND_BOOST_II,
EFFECT_CHR_BOOST_II,
EFFECT_PHYSICAL_SHIELD,
EFFECT_ARROW_SHIELD,
EFFECT_MAGIC_SHIELD,
EFFECT_SHINING_RUBY,
EFFECT_POTENCY,
EFFECT_REGAIN,
EFFECT_PAX,
EFFECT_INTENSION,
EFFECT_QUICKENING,
EFFECT_SUBLIMATION_ACTIVATED,
EFFECT_SUBLIMATION_COMPLETE,
EFFECT_MAGIC_ATK_BOOST,
EFFECT_MAGIC_DEF_BOOST,
EFFECT_PAEON,
EFFECT_BALLAD,
EFFECT_MINNE,
EFFECT_MINUET,
EFFECT_MADRIGAL,
EFFECT_PRELUDE,
EFFECT_MAMBO,
EFFECT_AUBADE,
EFFECT_PASTORAL,
EFFECT_HUM,
EFFECT_FANTASIA,
EFFECT_OPERETTA,
EFFECT_CAPRICCIO,
EFFECT_SERENADE,
EFFECT_ROUND,
EFFECT_GAVOTTE,
EFFECT_FUGUE,
EFFECT_RHAPSODY,
EFFECT_ARIA,
EFFECT_MARCH,
EFFECT_ETUDE,
EFFECT_CAROL,
-- EFFECT_HYMNUS, -- Causes server to crash
EFFECT_MAZURKA,
EFFECT_SIRVENTE,
EFFECT_DIRGE,
EFFECT_SCHERZO,
EFFECT_FIGHTERS_ROLL,
EFFECT_MONKS_ROLL,
EFFECT_HEALERS_ROLL,
EFFECT_WIZARDS_ROLL,
EFFECT_WARLOCKS_ROLL,
EFFECT_ROGUES_ROLL,
EFFECT_GALLANTS_ROLL,
EFFECT_CHAOS_ROLL,
EFFECT_BEAST_ROLL,
EFFECT_CHORAL_ROLL,
EFFECT_HUNTERS_ROLL,
EFFECT_SAMURAI_ROLL,
EFFECT_NINJA_ROLL,
EFFECT_DRACHEN_ROLL,
EFFECT_EVOKERS_ROLL,
EFFECT_MAGUSS_ROLL,
EFFECT_CORSAIRS_ROLL,
EFFECT_PUPPET_ROLL,
EFFECT_DANCERS_ROLL,
EFFECT_SCHOLARS_ROLL,
EFFECT_BOLTERS_ROLL,
EFFECT_CASTERS_ROLL,
EFFECT_COURSERS_ROLL,
EFFECT_BLITZERS_ROLL,
EFFECT_TACTICIANS_ROLL,
EFFECT_ALLIES_ROLL,
EFFECT_MISERS_ROLL,
EFFECT_COMPANIONS_ROLL,
EFFECT_AVENGERS_ROLL,
EFFECT_HASSO,
EFFECT_SEIGAN,
EFFECT_DRAIN_SAMBA,
EFFECT_ASPIR_SAMBA,
EFFECT_HASTE_SAMBA
}
local counter = player:getMerit(MERIT_EMPATHY);
for i, Buff in ipairs(Effect_list) do
local emp = player:getStatusEffect(Buff);
local emp_pet = pet:getStatusEffect(Buff);
if (emp ~= nil and emp_pet == nil) then
--print('Copied Buff');
local effectId = emp:getType();
local power = emp:getPower();
local tick = emp:getTick();
local duration = emp:getDuration();
local subId = emp:getSubType();
local subpower = emp:getSubPower();
local tier = emp:getTier();
pet:addStatusEffect(effectId, power, tick, duration, subId, subpower, tier);
local startTime = emp:getStartTime();
local newEffect = pet:getStatusEffect(effectId);
newEffect:setStartTime(startTime);
counter = counter - 5;
if (counter == 0) then
break;
end
end
end
Tested Boost/Focus/Dodge/En-/Spikes/Stoneskin/Regen and few other buffs, Hasso applied a STR/Acc boost but according to wiki it should do nothing, Seigan + Third Eye both transferred but had no effect while Third Eye on it's own worked. Haste transferred but doesn't seem to be working (pet:getStat(MOD_HASTE_MAGIC) returns nil and I don't see any difference in attack speed with hasso/haste/march). Currently doesn't transfer two different tiers of same type of song as they are considered the same effect, tried comparing the tiers but it only detects the first applied song. Removed Reraise and Hymnus even though they are suppose to transfer as they crash the server when the wyvern dies.
EDIT:: Fixed the buff duration issue, getDuration(); was returning a value 1000 times higher than the actual duration, it's working now (including StartTime so they wear off at same time).