Jump to content
fotostocker

Фея не дает статы при авто фрукте

Recommended Posts

Всем добрый вечер. столкнулся с такой проблемой когда фея аппает авто фрукт на лвл, статы не даются --- но после того как я меняю ее  в инвентаре  или телепортируюсь и перезахожу в игру статы добавляются. помогите с данной проблемой!!!

Share this post


Link to post
Share on other sites

Привет. 

Что-то добовлял в функцию cha_timer? 

Проверь её похоже на неё в файле functions.lua

Share this post


Link to post
Share on other sites
В 13.05.2022 в 06:56, small666 сказал:

Привет. 

Что-то добовлял в функцию cha_timer? 

Проверь её похоже на неё в файле functions.lua

function cha_timer( role, freq, time )
    local resume_freq = 5
    local now_tick = GetChaParam( role, 1 )
    local is_role_living = -1
    SetChaParam( role, 1, now_tick + freq * time )
    
            --------------------------------------------------------------------- Авто Фрукт на лвл
   local Item_bg1 = GetChaItem ( role , 2 , 1  )                   -- Получение содержимого 2ой ячейки рюкзака
   local Get_Item_Type1 = GetItemType ( Item_bg1 ) 
   local ItemUse_siliao1 = GetChaItem ( role , 2 , 3  )            -- Получение содержимого 3ей ячейки рюкзака
   local ItemUse_siliao_ID1 = GetItemID ( ItemUse_siliao1 ) 
--------------------------------------------------------------------- 
   if Get_Item_Type1 == 59 then 
        local Elf_MEXP = GetItemAttr( Item_bg1 ,ITEMATTR_MAXENERGY ) 
        local Elf_EXP = GetItemAttr( Item_bg1 ,ITEMATTR_ENERGY ) 
        local Num_JLone = GetItemForgeParam ( Item_bg1 , 1 ) 
        local Part1_JLone = GetNum_Part1 ( Num_JLone ) 
        if Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==276 then --фрукт силы +2
         local j = TakeItem(  role,0,276,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Str_1 ( role , Item_Num , Item_bg1 ) --фрукт силы +2
         end 
        elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==277 then --фрукт ловкости +2
         local j = TakeItem(  role,0,277,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Agi_1 ( role , Item_Num , Item_bg1 ) --фрукт ловкости+2
         end 
        elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==278 then --фрукт духа +2
         local j = TakeItem(  role,0,278,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Dex_1 ( role , Item_Num , Item_bg1 ) --фрукт духа +2
         end 
        elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==279 then --фрукт телосложени +2
         local j = TakeItem(  role,0,279,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Con_1 ( role , Item_Num , Item_bg1 ) --фрукт телосложения+2
         end 
        elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==280 then --фрукт точности +2
         local j = TakeItem(  role,0,280,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Sta_1 ( role , Item_Num , Item_bg1 ) --фрукт точности +2
         end 
         
        elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==222 then --фрукт на 1 лвл 
         local j = TakeItem(  role,0,222,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Str ( role , Item_Num , Item_bg1 ) --фрукт на 1 лвл  
         end 
         elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==223 then --фрукт на 1 лвл 
         local j = TakeItem(  role,0,223,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Agi ( role , Item_Num , Item_bg1 ) --фрукт на 1 лвл  
         end 
         elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==224 then --фрукт на 1 лвл  
         local j = TakeItem(  role,0,224,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Dex ( role , Item_Num , Item_bg1 ) --фрукт на 1 лвл  
         end 
         elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==225 then --фрукт на 1 лвл 
         local j = TakeItem(  role,0,225,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Con ( role , Item_Num , Item_bg1 ) --фрукт на 1 лвл 
         end 
         elseif  Elf_EXP>=Elf_MEXP and ItemUse_siliao_ID1==226 then --фрукт на 1 лвл  
         local j = TakeItem(  role,0,226,1) 
         if j==0 then 
          SystemNotice ( role , "Deleting of Fruit failed!" ) 
         else 
          SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
          Lvup_Sta ( role , Item_Num , Item_bg1 ) --фрукт на 1 лвл  
         end 
        end 
        end

 

Share this post


Link to post
Share on other sites

Привет, @fotostocker!

 

Скорее всего проблема связана с тем, что новые параметры феи не синхронизируется автоматически с клиентом после повышения уровня. Можно попробовать добавить вызов функции SynChaKitbag() после повышения уровня феи:

SystemNotice ( role , "Automatic Pet Lv Up successful." ) 
Lvup_Str_1 ( role , Item_Num , Item_bg1 ) --фрукт силы +2
SynChaKitbag(role, 13)

И так для всех остальных фруктов .


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...