Mario 12 Report post Posted July 14, 2022 any one can throw to me Fairy Coin Chest func ,, i had download the old files but unfortunly the chest deleted after first open im looking for function that not delete the main chest Quote Share this post Link to post Share on other sites
Mario 12 Report post Posted July 14, 2022 any body Quote Share this post Link to post Share on other sites
Mario 12 Report post Posted July 14, 2022 @Angelix any help Quote Share this post Link to post Share on other sites
Mario 12 Report post Posted July 14, 2022 @e1mer Quote Share this post Link to post Share on other sites
NabSlayer 12 Report post Posted July 15, 2022 it's so hard download any clean files and just search for it inside? function ItemUse_YingbiBox ( role , Item ) local map_name_role = GetChaMapName ( role ) if map_name_role == "darkblue" then local lv = GetChaAttr ( role , ATTR_LV ) if lv >= 10 then local Item_CanGet = GetChaFreeBagGridNum ( role ) if Item_CanGet < 4 then SystemNotice(role ,"开启精灵硬币宝箱至少需要4个格子") UseItemFailed ( role ) return end local ChaName = GetChaDefaultName(role) if PlayUseBox1[ChaName] == nil then PlayUseBox1[ChaName] = 0 end local Use_Num = PlayUseBox1[ChaName] local now_day= os.date("%d") -------------日 local now_month= os.date("%m") -------------月 now_month= tonumber(now_month) -------------月 now_day = tonumber(now_day) -------------日 local Date = JNSTime_Flag[now_month]+now_day local Yingbi_Num = 0 if Use_Num == 0 then local Time = 1 Use_Num = Date * 10 + Time Yingbi_Num = 20 local j = TakeItem ( role , 0 , 855 , Yingbi_Num ) if j == 1 then PlayUseBox1[ChaName] = Use_Num GiveBragiItem ( role , 1 ) GiveItem ( role , 0 , 1872 , 1 , 4 ) else UseItemFailed ( role ) SystemNotice( role, "精灵硬币不足") end else local Date_Box = math.floor ( Use_Num / 10 ) local a = Date - Date_Box local Time = Use_Num - Date_Box * 10 --SystemNotice ( role , "a="..a) if a == 0 then Use_Num = Use_Num +1 local time_new = Time + 1 if time_new >= 1 and time_new <= 3 then Yingbi_Num = (time_new*5) + 15 --SystemNotice ( role , "Round"..time_new.."次开箱子,花费"..Yingbi_Num.."个硬币,品质为1") local j = TakeItem ( role , 0 , 855 , Yingbi_Num ) if j == 1 then GiveBragiItem ( role , 1 ) PlayUseBox1[ChaName] = Use_Num GiveItem ( role , 0 , 1872 , 1 , 4 ) else UseItemFailed ( role ) SystemNotice( role, "精灵硬币不足") end elseif time_new >= 4 and time_new <= 6 then Yingbi_Num = Time * 15 --SystemNotice ( role , "Round"..time_new.."次开箱子,花费"..Yingbi_Num.."个硬币,品质为2") local j = TakeItem ( role , 0 , 855 , Yingbi_Num ) if j == 1 then GiveBragiItem ( role , 2 ) PlayUseBox1[ChaName] = Use_Num GiveItem ( role , 0 , 1872 , 1 , 4 ) else UseItemFailed ( role ) SystemNotice( role, "精灵硬币不足") end else Yingbi_Num = 99 --SystemNotice ( role , "Round"..time_new.."次开箱子,花费"..Yingbi_Num.."个硬币,品质为3") local j = TakeItem ( role , 0 , 855 , Yingbi_Num ) if j == 1 then GiveBragiItem ( role , 3 ) PlayUseBox1[ChaName] = Use_Num GiveItem ( role , 0 , 1872 , 1 , 4 ) else UseItemFailed ( role ) SystemNotice( role, "精灵硬币不足") end end elseif a == -1 then UseItemFailed ( role ) SystemNotice ( role , "你今天已经开过10个精灵硬币宝箱了") else local Time = 1 Use_Num = Date * 10 + Time Yingbi_Num = 20 --SystemNotice ( role , "Round"..Time.."开箱子,花费"..Yingbi_Num.."个硬币") local j = TakeItem ( role , 0 , 855 , Yingbi_Num ) if j == 1 then PlayUseBox1[ChaName] = Use_Num GiveBragiItem ( role ) GiveItem ( role , 0 , 1872 , 1 , 4 ) else UseItemFailed ( role ) SystemNotice( role, "精灵硬币不足") end end end else SystemNotice( role , "等级不到10,无法使用该道具") UseItemFailed ( role ) end else SystemNotice( role , "该道具只能在深蓝群岛地图使用") UseItemFailed ( role ) end end Quote Share this post Link to post Share on other sites
Mario 12 Report post Posted July 15, 2022 dude i used it and not work its got deleted after first open Quote Share this post Link to post Share on other sites
Angelix 374 Report post Posted July 18, 2022 On 7/14/2022 at 12:32 PM, Mario said: @Angelix any help If people don't answer your thread, it means they either don't want to help or they don't know how to help, so stop tagging people at random. It's annoying. Quote Share this post Link to post Share on other sites
V3ct0r 2,116 Report post Posted July 21, 2022 Hello @Mario, Try call UseItemFailed(role) function at the end of the your item usage function. This function should prevent the item deletion. function ItemUse_XXXXXXX(role, Item) -- The main code here UseItemFailed(role) 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