Jump to content

Recommended Posts

when I use my poss pet, instead of increasing my status it decreases. Help-me.


Being better than others is for those who are weak; what matters is to be true to yourself.         

 

Share this post


Link to post
Share on other sites

~up~ I'm having a similiar problem, but my stats are not decreasing. I'm getting only 1k extra damage from poss... Anyone could tell me where I have to edit for changing the given status? 

Thanks!

Share this post


Link to post
Share on other sites
4 hours ago, Ximboliex said:

Please post your scripts

 

Hello! Thanks for your reply :)

I'm not sure of what scripts you want, if you wanna check others, let me know!

Quote

--Fairy Body (Possession)-------------------------------------
function SkillCooldown_JLFT( sklv )
    local Cooldown = 180000
    return Cooldown
end
function SkillSp_JLFT ( sklv )                                        --Skill, Fairy body"的sp消耗公式
    local sp_reduce = 20
    return sp_reduce
end
function Skill_JLFT_BEGIN( role , sklv )
    local item_elf = GetChaItem(role , 2, 1)        
    local item_elf_type = GetItemType ( item_elf )            
    local item_elf_maxhp = GetItemAttr(item_elf,ITEMATTR_MAXURE)    
    local item_elf_hp = GetItemAttr(item_elf,ITEMATTR_URE)        
    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 )    
    
    if item_elf_type ~= 59 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 ) --Strengh Level of Pet
    local con = GetItemAttr( item_elf ,ITEMATTR_VAL_CON ) ---Level of Pet
    local agi = GetItemAttr( item_elf ,ITEMATTR_VAL_AGI ) --Agility Level of Pet
    local dex = GetItemAttr( item_elf ,ITEMATTR_VAL_DEX ) --Spirt Level of Pet
    local sta = GetItemAttr( item_elf ,ITEMATTR_VAL_STA ) --Accurcy Level of Pet
    local lv_JL = str + con + agi + dex + sta               --Total Pet Level

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 

    if Item_ID==231 then -- Fairy of Luck
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT1, statelv , statetime )
    
    elseif Item_ID==232 then -- Fairy of Strength
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT2, statelv , statetime )
    
    elseif Item_ID==233 then -- Fairy of Constitution
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT3, statelv , statetime )
    
    elseif Item_ID==234 then -- Fairy of Spirit
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT4, statelv , statetime )
    
    elseif Item_ID==235 then -- Fairy of Accuracy
    --RemoveStats(role)    
    AddState( ATKER , ATKER , STATE_JLFT5, statelv , statetime )
    
    elseif Item_ID==236 then -- Fairy of Agility
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT6, statelv , statetime )
    
    elseif Item_ID==237 then -- Fairy of Evil
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT7, statelv , statetime )
    
    elseif Item_ID==681 then -- Mordo 2
    RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime )
    
    elseif Item_ID==7126 then -- Angela 2
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime )
    
    elseif Item_ID==49 then -- Little Dragon
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime )
    
    elseif Item_ID==6947 then -- August Pet 1
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime )
    
    elseif Item_ID==6948 then -- August Pet 2
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime )
    
    elseif Item_ID==6949 then -- August Pet 3
    --RemoveStats(role)
    AddState( ATKER , ATKER , STATE_JLFT8, statelv , statetime )            
    
    elseif Item_ID==6950 then -- August Pet 4
    --RemoveStats(role)
    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 )

    if Get_Item_Type==59 then 
        local  Item_ID = GetItemID ( Item_bg )                 --Get ID
        local str = GetItemAttr( Item_bg ,ITEMATTR_VAL_STR ) --Strength
        local con = GetItemAttr( Item_bg ,ITEMATTR_VAL_CON ) --Constitution
        local agi = GetItemAttr( Item_bg ,ITEMATTR_VAL_AGI ) --Agility
        local dex = GetItemAttr( Item_bg ,ITEMATTR_VAL_DEX ) --Accuracy
        local sta = GetItemAttr( Item_bg ,ITEMATTR_VAL_STA ) --Spirit
        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 )
        local Part1 = 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)

            local star=0
            local statelv=lv_JL*0.025*(sklv+1)*0.05 -- lv*1/40*(skilllv+1)/2*0.1
            if Item_ID ==232 then -- Fairy of Strength
            --RemoveStats(role)
                local star = lv_JL
                SetCharaAttr(star ,role , ATTR_STATEV_STR)
            end
            if Item_ID ==233 then -- Fairy of Constitution
            --RemoveStats(role)
                local star = lv_JL
                SetCharaAttr(star ,role , ATTR_STATEV_CON)
            end
            if Item_ID ==234 then -- Fairy of Spirit
            --RemoveStats(role)
                local star = lv_JL
                SetCharaAttr(star ,role , ATTR_STATEV_STA)
            end
            if Item_ID ==235 then -- Fairy of Accuracy
            --RemoveStats(role)
                local star = lv_JL
                SetCharaAttr(star ,role , ATTR_STATEV_DEX)
            end
            if Item_ID ==236 then -- Fairy of Agility
            --RemoveStats(role)
                local star = lv_JL
                SetCharaAttr(star ,role , ATTR_STATEV_AGI)
            end
            if Item_ID ==237 then -- Fairy of Evil
            --RemoveStats(role)
                if str~=nil and str~=0 then
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end
            if Item_ID ==231 or  Item_ID ==681 then -- Fairy of Luck and Mordo Jr
            --RemoveStats(role)
                local star1 = GetChaAttr( role , ATTR_BMF )
                local star = GetChaAttr( role , ATTR_BMF )*lv_JL*0.02
                local star2=star+star1
                SetCharaAttr(star ,role , ATTR_STATEV_MF)
            end
            if Item_ID ==681 then -- Mordo Jr
            --RemoveStats(role)
                if str~=nil and str~=0 then
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end
            if Item_ID == 7126 then -- Angela Jr
            --RemoveStats(role)
                if str~=nil and str~=0 then
                    str = str
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    con = con
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    sta = sta
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    dex = dex
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    agi = agi
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end        
            if Item_ID == 49 then -- Little Dragon
            --RemoveStats(role)
                if str~=nil and str~=0 then
                    str = str
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    con = con
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    sta = sta
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    dex = dex
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    agi = agi
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end    
                if Item_ID == 6947 then -- August Pet 1
                --RemoveStats(role)
                if str~=nil and str~=0 then
                    str = str
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    con = con
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    sta = sta
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    dex = dex
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    agi = agi
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end
                if Item_ID == 6948 then -- August Pet 2
                --RemoveStats(role)
                if str~=nil and str~=0 then
                    str = str
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    con = con
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    sta = sta
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    dex = dex
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    agi = agi
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end
                if Item_ID == 6949 then -- August Pet 3
                --RemoveStats(role)
                if str~=nil and str~=0 then
                    str = str
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    con = con
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    sta = sta
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    dex = dex
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    agi = agi
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end
                        if Item_ID == 6950 then -- August Pet 4
                if str~=nil and str~=0 then
                    str = str
                    SetCharaAttr(str ,role , ATTR_STATEV_STR)
                end
                if con~=nil and con~=0 then
                    con = con
                    SetCharaAttr(con ,role , ATTR_STATEV_CON)
                end
                if sta~=nil and sta~=0 then
                    sta = sta
                    SetCharaAttr(sta ,role , ATTR_STATEV_STA)
                end
                if dex~=nil and dex~=0 then
                    dex = dex
                    SetCharaAttr(dex ,role , ATTR_STATEV_DEX)
                end
                if agi~=nil and agi~=0 then
                    agi = agi
                    SetCharaAttr(agi  ,role , ATTR_STATEV_AGI)
                end
            end
        end
    ALLExAttrSet(role)
end

 

Share this post


Link to post
Share on other sites

You are setting attrv attributes to equal fairy level, which overwrites attrv attributes from other things, such as uns85 ring glow etc. This could be the problem.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, Billy said:

You are setting attrv attributes to equal fairy level, which overwrites attrv attributes from other things, such as uns85 ring glow etc. This could be the problem.

When using effects like those and possession, you'll always get decreasing stats. Since possession always sets attributes to 0 when finished and other effects just remove their X bonus since it's static, it will remove them even if you don't have them, resulting in negative stats.

  • Like 1

Share this post


Link to post
Share on other sites
47 minutes ago, Angelix said:

When using effects like those and possession, you'll always get decreasing stats. Since possession always sets attributes to 0 when finished and other effects just remove their X bonus since it's static, it will remove them even if you don't have them, resulting in negative stats.

Not always, since you can add the amount from poss to your current attrv and record the amount you added. Then when poss is removed check the recorded value and set attrv to attrv - recorded value.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Billy said:

Not always, since you can add the amount from poss to your current attrv and record the amount you added. Then when poss is removed check the recorded value and set attrv to attrv - recorded value.

Yes, but there's a catch with that. First of, the way the game currently handles the possession effect is that it removes completely ANY stats (STATEV) regardless whether it was given from possession or any other effect. Second, it could semi work the way you say it, but what if a player has level 30 fairy and uses poss and gains an additional 30 points and you record 30 points, then if player switches fairy to a level 40 and teleport or uses portal, the player will get the effect of the level 40 fairy, yet when the possession finishes, it will only take 30 points since you only recorded that and not the refresh player got from teleport.

 

Give it a try, use possession on a level 30 fairy, switch to 40 and then teleport, your stats will get refresh according to the current fairy.

  • Like 1

Share this post


Link to post
Share on other sites

@Angelix

 

 

Before changing maps, GS runs the remove state function, so it removes the amount added then runs the add function again (for the new fairy).  

 

 

(mouse is slightly desynced on video for some reason, idk why)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for all the feedback! I managed to fix it with you guys answers :)

It was an effect that was bugging it.

Btw, I didn't know about this poss "bug", I'll check it out.

Have a nice day! ~Faller.

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, Brothers said:

Is there also an option to make Novice poss drop no SP when using?

Resouce\script\calculate\skilleffect.lua

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

 

Edited by Dan~

Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
9 hours ago, Dan~ said:

Resouce\script\calculate\skilleffect.lua

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

 

Yea i've found that before, changed 20 -> 0, nothing happend.

It still takes a lot stamina to use Novice poss.

Edited by Brothers

Share this post


Link to post
Share on other sites
6 hours ago, Brothers said:

Yea i've found that before, changed 20 -> 0, nothing happend.

It still takes a lot stamina to use Novice poss.

If you are talking about stamina then.

This needs to be edited.

if item_elf_hp < 5000 then
        SkillUnable ( role ) 
        SystemNotice ( role , "Fairy does not have enough stamina to activate skill!" ) 
        return 
    end

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

 


Nissan-GT-R.gif

Share this post


Link to post
Share on other sites
On 11/30/2018 at 6:37 PM, FruitJuice said:

If you are talking about stamina then.


This needs to be edited.

if item_elf_hp < 5000 then
        SkillUnable ( role ) 
        SystemNotice ( role , "Fairy does not have enough stamina to activate skill!" ) 
        return 
    end

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

 

That code means that if the stamina is less than 5000, the skill could not be used. I have the problem that whenever the skill is used the message of lack of stamina comes out and I think that I should cancel this line or decrease the value. It would be correct?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...