Sharshabel 8 Report post Posted July 1, 2022 (edited) any one have chest script function (this chest need spesific item on inventory to open) ? for example if i have 3 kals i can open the chest i tryed to study fairy coin chest but it`s hard a bit any hand here ! Edited July 1, 2022 by Sharshabel Quote Share this post Link to post Share on other sites
NabSlayer 12 Report post Posted July 1, 2022 (edited) just add this line in ur script local i= CheckBagItem( role, RequiredItemID ) if i <=0 then SystemNotice( role , "ANY FAIL MESSAGE") UseItemFailed ( role ) return LUA_FALSE end and don't forget add line with Deleting required item after open local s = DelBagItem ( role , ITEMTO_DELETE , 1 ) Edited July 1, 2022 by NabSlayer 1 Quote Share this post Link to post Share on other sites
Sharshabel 8 Report post Posted July 1, 2022 Can u give me full script Quote Share this post Link to post Share on other sites
JaR 7 Report post Posted July 2, 2022 try this function ItemUse_TryChest ( role , Item ) local Item_CanGet = GetChaFreeBagGridNum ( role ) if Item_CanGet < 4 then SystemNotice(role , "you need at least 4 slots to open Fairy Coin Chest") UseItemFailed ( role ) return end local Kals_Num = 0 if Kals_Num == 3 then local j = TakeItem ( role , 0 , 3457 , Kals_Num ) if j == 1 then GiveItem ( role , 0 , 1872 , 1 , 4 ) else UseItemFailed ( role ) SystemNotice( role, "Not enough Kal Runestone.") end else SystemNotice( role , "Not enough kal Runestone.") UseItemFailed ( role ) end end 1 Quote Share this post Link to post Share on other sites
Sharshabel 8 Report post Posted July 2, 2022 @NabSlayer Thank You Quote Share this post Link to post Share on other sites
Sharshabel 8 Report post Posted July 2, 2022 (edited) @NabSlayer can i know if i want make 3 diffrent items required ? i have tryed to double the line also tryed to make comma but not work Edited July 2, 2022 by Sharshabel Quote Share this post Link to post Share on other sites
NabSlayer 12 Report post Posted July 2, 2022 5 hours ago, Sharshabel said: @NabSlayer can i know if i want make 3 diffrent items required ? i have tryed to double the line also tryed to make comma but not work local first= CheckBagItem( role, RequiredItemID ) local second= CheckBagItem( role, RequiredSecondItemID ) local third= CheckBagItem( role, RequiredThirdItemID ) if first >=1 and second >= 1 and third >=1 then //success open chest else SystemNotice( role , "You don't have all required items" ) UseItemFailed ( role ) end didn't tested but should work, i said it using mobile phone 1 Quote Share this post Link to post Share on other sites
Sharshabel 8 Report post Posted July 2, 2022 its works but you need to edit the full triggers example local first= CheckBagItem( role, RequiredItemID ) if first >=1 first //success open chest else SystemNotice( role , "You don't have all required items" ) UseItemFailed ( role ) end local second= CheckBagItem( role, RequiredItemID ) if second>=1 //success open chest else SystemNotice( role , "You don't have all required items" ) UseItemFailed ( role ) end local third = CheckBagItem( role, RequiredItemID ) if third>=1 //success open chest else SystemNotice( role , "You don't have all required items" ) UseItemFailed ( role ) end its works on this way if first >=1 and second >= 1 and third >=1 then << this not working thank you bro Insert other media 1 Quote Share this post Link to post Share on other sites