• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Can someone pls help me at possession

Initiate Mage
Joined
Feb 7, 2009
Messages
4
Reaction score
0
I have only one problem at my server, possession dont work. When i use possession ingame the optical effect is there, but the stats dont double.

Can someone please help me to fix this problem?
 
Newbie Spellweaver
Joined
Aug 18, 2008
Messages
16
Reaction score
0
This fix is by Lightblade and Oracle... this one fixes possesion bonus and also the bug that jr gives aditional stats when fed different fruits .. ex. ( 13str 1agi 1 acc 1con) this bug wont work with this fix


Find possession or fairy body in skilleffect.lua and replace it with this.

--Fairy Body -------------------------------------
function SkillCooldown_JLFT( sklv )
local Cooldown = 180000
return Cooldown
end

function SkillSp_JLFT ( sklv )
local sp_reduce = 20
return sp_reduce
end

function Skill_JLFT_BEGIN( role , sklv )
--SystemNotice ( role , "Skill_JLFT_BEGIN" )
local item_elf = GetChaItem(role , 2, 1) -- Pet Handle
local item_elf_type = GetItemType ( item_elf ) -- Pet Type
local item_elf_maxhp = GetItemAttr(item_elf,ITEMATTR_MAXURE) -- Max Stamina
local item_elf_hp = GetItemAttr(item_elf,ITEMATTR_URE) -- Current Stamina
local role_hp = GetChaAttr(role, ATTR_HP)
local role_mxhp = GetChaAttr(role, ATTR_MXHP)
local Num_JL = GetItemForgeParam ( item_elf , 1 )
local Part1 = GetNum_Part1 ( Num_JL )

-- Value Checks
--SystemNotice ( role , "item_elf_type == "..item_elf_type )
--SystemNotice ( role , "item_elf_hp == "..item_elf_hp )
--SystemNotice ( role , "Part1 == "..Part1 )
--SystemNotice ( role , "Num_JL == "..Num_JL )

if item_elf_type ~= 59 then -- or Part1~=1 then
SkillUnable(role)
SystemNotice ( role , "Current skill is only available if the new generation of pet is equipped!" )
return
end

local str = GetItemAttr( item_elf ,ITEMATTR_VAL_STR ) -- Str Lv
local con = GetItemAttr( item_elf ,ITEMATTR_VAL_CON ) -- Con Lv
local agi = GetItemAttr( item_elf ,ITEMATTR_VAL_AGI ) -- Agi Lv
local dex = GetItemAttr( item_elf ,ITEMATTR_VAL_DEX ) -- Spr Lv
local sta = GetItemAttr( item_elf ,ITEMATTR_VAL_STA ) -- Acc Lv
local lv_JL = str + con + agi + dex + sta ---- Total Lv of Pet

if item_elf_hp < 5000 then
SkillUnable ( role )
SystemNotice ( role , "Fairy needs to have at least 100 stamina to activate this skill!" )
return
end

item_elf_hp = item_elf_hp - (6 * lv_JL / sklv) * 50
SetItemAttr ( item_elf , ITEMATTR_URE , item_elf_hp )
end

function Skill_JLFT_End ( ATKER , DEFER , sklv )
local statelv = sklv
local statetime = 190 - sklv * 10
local item_elf = GetChaItem(ATKER , 2, 1) -- Pet Handle
local item_elf_type = GetItemType ( item_elf ) -- Pet Type
local Item_ID = GetItemID ( item_elf ) -- Pet ID
--SystemNotice ( ATKER , "Item_ID=="..Item_ID )

if Item_ID==231 then
--SystemNotice ( ATKER , "Fairy of Luck == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT7, statelv , statetime )

elseif Item_ID==232 then
--SystemNotice ( ATKER , "Fairy of Strength == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT2, statelv , statetime )

elseif Item_ID==233 then
--SystemNotice ( ATKER , "Fairy of Constitution == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT3, statelv , statetime )

elseif Item_ID==234 then
--SystemNotice ( ATKER , "Fairy of Spirit == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT4, statelv , statetime )

elseif Item_ID==235 then
--SystemNotice ( ATKER , "Fairy of Accuracy == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT5, statelv , statetime )

elseif Item_ID==236 then
--SystemNotice ( ATKER , "Fairy of Agility == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT6, statelv , statetime )

elseif Item_ID==237 then
--SystemNotice ( ATKER , "Fairy of Evil == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT7, statelv , statetime )

elseif Item_ID==681 then
--SystemNotice ( ATKER , "Mordo Junior == "..Item_ID )
AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime )
end
end

function State_JLFT_Add ( role , sklv )
local Item_bg = GetChaItem ( role , 2 , 1 )
local Get_Item_Type = GetItemType ( Item_bg )
--SystemNotice ( role , "Get_Item_Type == "..Get_Item_Type )

if Get_Item_Type == 59 then
local Item_ID = GetItemID ( Item_bg )
local str = GetItemAttr( Item_bg ,ITEMATTR_VAL_STR )
local con = GetItemAttr( Item_bg ,ITEMATTR_VAL_CON )
local agi = GetItemAttr( Item_bg ,ITEMATTR_VAL_AGI )
local dex = GetItemAttr( Item_bg ,ITEMATTR_VAL_DEX )
local sta = GetItemAttr( Item_bg ,ITEMATTR_VAL_STA )
local URE = GetItemAttr( Item_bg ,ITEMATTR_URE )
local MAXURE = GetItemAttr( Item_bg ,ITEMATTR_MAXURE )

local lv_JL = str + con + agi + dex + sta
local Num_JL = GetItemForgeParam ( Item_bg , 1 )

-- No idea Wtf these are for
local Part1 = 1 --GetNum_Part1 ( Num_JL )
local Part2 = GetNum_Part2 ( Num_JL )
local Part3 = GetNum_Part3 ( Num_JL )
local Part4 = GetNum_Part4 ( Num_JL )
local Part5 = GetNum_Part5 ( Num_JL )
local Part6 = GetNum_Part6 ( Num_JL )
local Part7 = GetNum_Part7 ( Num_JL )

--SystemNotice ( role , "State_JLFT_Add_URE == "..URE )
--SystemNotice ( role , "State_JLFT_Add_Part1 == "..Part1 )

if Part1 == 1 then
local star = 0

-- Effect increase by skill level
local statelv = lv_JL * 0.025 * (sklv + 1) * 0.05 ----lv*1/40*(skilllv+1)/2*0.1

if Item_ID ==232 then
--local star = GetChaAttr( role , ATTR_BSTR )*statelv
local star = lv_JL
SetCharaAttr(star, role, ATTR_STATEV_STR)
end

if Item_ID ==233 then
--local star = GetChaAttr( role , ATTR_BCON )*statelv
local star = lv_JL
SetCharaAttr(star, role, ATTR_STATEV_CON)
end

if Item_ID ==234 then
--local star = GetChaAttr( role , ATTR_BDEX )*statelv
local star = lv_JL
SetCharaAttr(star, role, ATTR_STATEV_STA)
end

if Item_ID ==235 then
--local star = GetChaAttr( role , ATTR_BSTA )*statelv
local star = lv_JL
SetCharaAttr(star, role, ATTR_STATEV_DEX)
end

if Item_ID ==236 then
--local star = GetChaAttr( role , ATTR_BAGI )*statelv
local star = lv_JL
SetCharaAttr(star ,role , ATTR_STATEV_AGI)
end

--if Item_ID == 231 or Item_ID == 681 then
--local star = lv_JL
--local star = GetChaAttr( role, ATTR_LUK ) * lv_JL * 0.02
--SetCharaAtrr(star, role, ATTR_STATEV_LUK)
--end

--if Item_ID == 237 or Item_ID == 681 then
--local star = lv_JL
--local star = GetChaAttr( role, ATTR_BMF ) * lv_JL * 0.02
--SetCharaAttr(star ,role , ATTR_STATEV_MF)
--end

if Item_ID == 681 or Item_ID == 231 or Item_ID == 237 then
if str~=nil and str~=0 then
local star = str
SetCharaAttr(star ,role , ATTR_STATEV_STR)
end
if con~=nil and con~=0 then
local star = con
SetCharaAttr(star ,role , ATTR_STATEV_CON)
end
if sta~=nil and sta~=0 then
local star = sta
SetCharaAttr(star ,role , ATTR_STATEV_STA)
end
if dex~=nil and dex~=0 then
local star = dex
SetCharaAttr(star ,role , ATTR_STATEV_DEX)
end
if agi~=nil and agi~=0 then
local star = agi
SetCharaAttr(star ,role , ATTR_STATEV_AGI)
end
--URE=URE-4500
end
--SetItemAttr ( Item_bg , ITEMATTR_URE , URE )
end
ALLExAttrSet(role)
end

function State_JLFT_Rem ( role , sklv )
SetCharaAttr(0 ,role , ATTR_STATEV_STR)
SetCharaAttr(0 ,role , ATTR_STATEV_CON)
SetCharaAttr(0 ,role , ATTR_STATEV_STA)
SetCharaAttr(0 ,role , ATTR_STATEV_DEX)
SetCharaAttr(0 ,role , ATTR_STATEV_AGI)
SetCharaAttr(0 ,role , ATTR_STATEV_MF)
SetCharaAttr(0 ,role , ATTR_STATEV_LUK)
ALLExAttrSet(role)
end
 
Back
Top