Jump to content
Sign in to follow this  
small666

петомцы 2,0

Recommended Posts

доброго времяни суток . у меня не работают петомцы в сервере 2,0 в 4-й слот ложу она появляется но жизнь 15/15 не расходует  ...... кто может подсказать как поправить ........ за время жизни эта функция отвечает в файле Functions.lua ?

 

function TakePetEndure( role , now_tick)
    local State_Gbhl = GetChaStateLv ( role, STATE_Gbhl )
    local State_Lbhl = GetChaStateLv ( role, STATE_Lbhl )
    local State_Lbhl = GetChaStateLv ( role, STATE_BHLHP )
    if State_Gbhl ~= 0 then
        return
    end
    if State_Lbhl ~= 0 then
        return
    end
    if State_Lbhl == 10 then
        return
    end
    local Item = GetChaItem ( role , 2 , 3 )
    local Item_type = GetItemType(Item)
    local Item_ID = GetItemID ( Item )
    if Item_type == 77 then
        local Item_ure = GetItemAttr( Item ,ITEMATTR_URE )       --体力
        if Item_ure > 0 then
            Num = Item_ure - 5
            SetItemAttr ( Item , ITEMATTR_URE , Num )
        elseif Item_ure <= 0 then
            local ItemName = GetItemName ( Item_ID )
            RemoveChaItem( role , Item_ID , 0 , 2 , 3 , 2 , 1 )  
            CALCULATE_FUNCTIONS_LUA_000722 = GetResString("CALCULATE_FUNCTIONS_LUA_000722")
            SystemNotice (role,ItemName..CALCULATE_FUNCTIONS_LUA_000722)
        end
    else
        return
    end
end

 

cap00000.png

Edited by small666

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.

Sign in to follow this  

×
×
  • Create New...