fotostocker 33 Report post Posted May 12, 2022 Всем добрый вечер. столкнулся с такой проблемой когда фея аппает авто фрукт на лвл, статы не даются --- но после того как я меняю ее в инвентаре или телепортируюсь и перезахожу в игру статы добавляются. помогите с данной проблемой!!! Quote Share this post Link to post Share on other sites
small666 28 Report post Posted May 13, 2022 Привет. Что-то добовлял в функцию cha_timer? Проверь её похоже на неё в файле functions.lua Quote Share this post Link to post Share on other sites
fotostocker 33 Report post Posted May 14, 2022 В 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 Quote Share this post Link to post Share on other sites
V3ct0r 2,116 Report post Posted May 14, 2022 Привет, @fotostocker! Скорее всего проблема связана с тем, что новые параметры феи не синхронизируется автоматически с клиентом после повышения уровня. Можно попробовать добавить вызов функции SynChaKitbag() после повышения уровня феи: SystemNotice ( role , "Automatic Pet Lv Up successful." ) Lvup_Str_1 ( role , Item_Num , Item_bg1 ) --фрукт силы +2 SynChaKitbag(role, 13) И так для всех остальных фруктов . Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites