FapFap 13 Report post Posted August 28, 2018 wondering is anyone had this problem before, when trying to make 110%, when i fail the system removes 2x Strenghening Crystals instead of 1 , how to fix this bug? Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted August 29, 2018 @FapFap, do you see any messages in the system chat after you perform apparel strengthening? Look for them in file forge.lua and you will find code that removes Strengthening Crystals. 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
FapFap 13 Report post Posted August 29, 2018 19 minutes ago, V3ct0r said: @FapFap, do you see any messages in the system chat after you perform apparel strengthening? Look for them in file forge.lua and you will find code that removes Strengthening Crystals. the message in system says it failed but it takes 2 crystal instead of 1 when it fails, if success its taking just one, i tried to use clean function's from pko1.38 files and pko 1.36 but still takes 2 crystals when fails Quote Share this post Link to post Share on other sites
FapFap 13 Report post Posted August 30, 2018 Bump Quote Share this post Link to post Share on other sites
Inuarashi 5 Report post Posted August 30, 2018 59 minutes ago, FapFap said: Bump its probably in your scripts, could you post the function for us to see? Quote Share this post Link to post Share on other sites
FapFap 13 Report post Posted August 30, 2018 @Inuarashi function can_beuplv_item_main ( Table ) local role = 0 local ItemBag = {} local ItemCount = {} local ItemBagCount = {} local Get_Count = 4 local ItemReadCount = 0 local ItemReadNow = 1 local ItemReadNext = 0 local ItemBag_Now = 0 local ItemCount_Now = 0 local ItemBagCount_Num = 0 role , ItemBag , ItemCount , ItemBagCount , ItemBag_Now , ItemCount_Now , ItemBagCount_Num = Read_Table ( Table ) local ItemBagCount_beuplv = ItemBagCount [1] local ItemBag_beuplv = ItemBag [1] local ItemNum_beuplv = ItemCount [1] local Item_beuplv = GetChaItem ( role , 2 , ItemBag_beuplv ) local Item_beuplv_Type = GetItemType ( Item_beuplv ) local Item_beuplv_ID = GetItemID ( Item_beuplv ) local Item_ScItem = GetChaItem ( role , 2 , ItemBag [0] ) local Item_YxItem = GetChaItem ( role , 2 , ItemBag [2] ) local Item_ScItem_ID = GetItemID ( Item_ScItem ) local Item_YxItem_ID = GetItemID ( Item_YxItem ) local Item_ScItem_Type = GetItemType ( Item_ScItem ) local Item_YxItem_Type = GetItemType ( Item_YxItem ) local Item_beuplv_Lv = Get_Itembeuplv_Lv ( Item_beuplv ) local ItemAttr_Val_Fusionid = GetItemAttr ( Item_beuplv , ITEMATTR_VAL_FUSIONID ) local ItemID_Waiguan = GetItemAttr ( Item_beuplv , ITEMATTR_MAXURE ) if Item_beuplv_ID < 5001 or Item_beuplv_ID > 7000 then SystemNotice( role ,"non fusion item ") return 0 end if ItemAttr_Val_Fusionid == 0 then SystemNotice( role , "Item cannot be upgraded as item has not undergo fusion") return 0 end local oldcrystal = 456; local newcrystal = 7597; if Item_beuplv_Lv >= MaxLv_Eff then -- Apparel Upgrade SystemNotice( role ,"Item level limit max. Unable to level again") return 0 end if ItemBagCount_beuplv ~= 1 then SystemNotice( role , "Strengthening item level slot illegal ") return 0 end if Item_ScItem_Type ~= 62 then SystemNotice( role , "Invalid Strengthening scroll type ") return 0 end if Item_YxItem_Type ~= 63 then SystemNotice( role , "Strengthening gem type illegal ") return 0 end if ItemNum_beuplv ~= 1 then SystemNotice( role , "Illegal force item upgrade number") return 0 end if ItemCount [0] ~= 1 or ItemCount [2] ~= 1 or ItemBagCount [0] ~= 1 or ItemBagCount [2] ~= 1 then SystemNotice ( role ,"Item mall items or game items error") return 0 end local Money_Need = getupgrade_money_main ( Table ) local Money_Have = GetChaAttr ( role , ATTR_GD ) if Money_Need > Money_Have then SystemNotice( role ,"Insufficient gold. Unable to level up equipment") return 0 end return 1 end --开始强化升级 function begin_upgrade_item (...) local Check_Canbeuplv = 0 Check_Canbeuplv = can_beuplv_item_main ( arg ) if Check_Canbeuplv == 0 then return 0 end local role = 0 local ItemBag = {} local ItemCount = {} local ItemBagCount = {} local Get_Count = 4 local ItemReadCount = 0 local ItemReadNow = 1 local ItemReadNext = 0 local ItemBag_Num = 0 local ItemCount_Num = 0 local ItemBagCount_Num = 0 role , ItemBag , ItemCount , ItemBagCount , ItemBag_Num , ItemCount_Num , ItemBagCount_Num = Read_Table ( arg ) local ItemBag_beuplv = ItemBag [1] local Item_beuplv = GetChaItem ( role , 2 , ItemBag_beuplv ) local Item_ScItem = GetChaItem ( role , 2 , ItemBag [0] ) local Item_YxItem = GetChaItem ( role , 2 , ItemBag [2] ) local Item_ScItem_ID = GetItemID ( Item_ScItem ) local Item_YxItem_ID = GetItemID ( Item_YxItem ) local Item_beuplv_Lv = Get_Itembeuplv_Lv ( Item_beuplv ) local R1 = 0 local R2 = 0 R1 = RemoveChaItem ( role , Item_ScItem_ID , 1 , 2 , ItemBag [0] , 2 , 1 , 0 ) R2 = RemoveChaItem ( role , Item_YxItem_ID , 1 , 2 , ItemBag [2] , 2 , 1 , 0 ) if R1 == 0 or R2 == 0 then LG( "beuplv" , "Delete item failed" ) end local Money_Need = getupgrade_money_main ( arg ) local Money_Have = GetChaAttr ( role , ATTR_GD ) Money_Have = Money_Have - Money_Need SetCharaAttr ( Money_Have , role , ATTR_GD ) ALLExAttrSet( role ) local a = Check_CG_beuplv ( Item_beuplv_Lv ) if a == 0 then R1 = RemoveChaItem ( role , Item_ScItem_ID , 1 , 2 , ItemBag [0] , 2 , 1 , 0 ) R2 = RemoveChaItem ( role , Item_YxItem_ID , 1 , 2 , ItemBag [2] , 2 , 1 , 0 ) if R1 == 0 or R2 == 0 then LG( "beuplv" , "Delete item failed" ) end local cha_name = GetChaDefaultName ( role ) LG( "JingLian_ShiBai" , "Player "..cha_name.." Strengthening has failed" ) SystemNotice( role , "Sorry, Strengthening has failed. Some items have disappeared!") return end local LvUpgrade = 1 if Item_YxItem_ID == 7596 then LvUpgrade = MaxLv_Eff - Item_beuplv_Lv; else if Instant110Eff ~= nil and Instant110Eff == true then LvUpgrade = MaxLv_Eff - Item_beuplv_Lv; end end Item_beuplv_Lv = Item_beuplv_Lv + LvUpgrade; SetChaKitbagChange( role , 1 ) Set_Itembeuplv_Lv ( Item_beuplv , Item_beuplv_Lv ) SynChaKitbag( role, 4 ) local LvD = GetItemAttr( Item_beuplv , ITEMATTR_VAL_LEVEL ) SynChaKitbag(role,13) SystemNotice( role , "Level up successful") local cha_name = GetChaDefaultName ( role ) LG( "JingLian_ShiBai" , "Player ["..cha_name.."] Strengthening successful" ) return 1 end Quote Share this post Link to post Share on other sites
FapFap 13 Report post Posted October 6, 2018 BUMP, i tried using Clean files and the problem is that it still takes 2x Crystals when you fail upgrade, "It only takes 2 crystals when crystals are stackedable" if not stacked it only takes 1 on fail.. Is there a way to fix it so it can take 1 Strengthening Crystal when you fail, even if crystals are stacked? Quote Share this post Link to post Share on other sites
FapFap 13 Report post Posted October 8, 2018 BUMP Quote Share this post Link to post Share on other sites
FapFap 13 Report post Posted October 9, 2018 BUMP Quote Share this post Link to post Share on other sites
Angelix 374 Report post Posted October 22, 2018 The code takes 2 crystals when it fails, get this piece of code: local a = Check_CG_beuplv ( Item_beuplv_Lv ) if a == 0 then R1 = RemoveChaItem ( role , Item_ScItem_ID , 1 , 2 , ItemBag [0] , 2 , 1 , 0 ) R2 = RemoveChaItem ( role , Item_YxItem_ID , 1 , 2 , ItemBag [2] , 2 , 1 , 0 ) if R1 == 0 or R2 == 0 then LG( "beuplv" , "Delete item failed" ) end local cha_name = GetChaDefaultName ( role ) LG( "JingLian_ShiBai" , "Player "..cha_name.." Strengthening has failed" ) SystemNotice( role , "Sorry, Strengthening has failed. Some items have disappeared!") return end And remove this: R1 = RemoveChaItem ( role , Item_ScItem_ID , 1 , 2 , ItemBag [0] , 2 , 1 , 0 ) R2 = RemoveChaItem ( role , Item_YxItem_ID , 1 , 2 , ItemBag [2] , 2 , 1 , 0 ) Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted October 22, 2018 Quote and remove this: this too: if R1 == 0 or R2 == 0 then LG( "beuplv" , "Delete item failed" ) end 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
FapFap 13 Report post Posted October 22, 2018 (edited) @Angelix @V3ct0r ty Edited October 22, 2018 by FapFap Quote Share this post Link to post Share on other sites