Mario 12 Report post Posted July 6, 2022 function Lv101GearChest( role, Item) local i= CheckBagItem( role, 18807 ) if i <=0 then SystemNotice( role , "It appears you do not have enough keys or you have the wrong keys ") UseItemFailed ( role ) return LUA_FALSE end local i = DelBagItem ( role , 18807 , 1 ) local Item_CanGet = GetChaFreeBagGridNum ( role ) if Item_CanGet <= 2 then SystemNotice(role ,"Insufficient inventory space. Unable to use V1 Gear Chest") UseItemFailed ( role ) return end local job = GetChaAttr(role, ATTR_JOB) local Item_CanGet = GetChaFreeBagGridNum ( role ) if Item_CanGet <= 2 then SystemNotice(role ,"Insufficient inventory space. Unable to use V1 Gear Chest") UseItemFailed ( role ) return end if job == 9 then--cruseder GiveItem ( role , 0 , 2331 , 2 , 6 ) elseif job == 14 then--sealmaster GiveItem ( role , 0 , 2343 , 1 , 6 ) elseif job == 16 then--voyger GiveItem ( role , 0 , 2336 , 1 , 6 ) elseif job == 12 then--Hunter GiveItem ( role , 0 , 2338 , 1 , 6 ) elseif job == 8 then--champ GiveItem ( role , 0 , 2333 , 1 , 6 ) elseif job == 13 then--cleric GiveItem ( role , 0 , 2341 , 1 , 6 ) else SystemNotice(role ,"Available for 2st Classes only!. Unable to open Chest") UseItemFailed ( role ) return end end every thing fine on this chest but if there is no space trigger fail it deletes the key , how i can prevent that ? how could i make this role >> local i = DelBagItem ( role , 18807 , 1 ) works only when spaces ok so if there is no space it should give massage with out deleteing this key any help ? Quote Share this post Link to post Share on other sites
V3ct0r 2,116 Report post Posted July 6, 2022 Hello @Mario, Move line: local i = DelBagItem ( role , 18807 , 1 ) to the end of the function: . . . else SystemNotice(role ,"Available for 2st Classes only!. Unable to open Chest") UseItemFailed ( role ) return end local i = DelBagItem ( role , 18807 , 1 ) 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
Mario 12 Report post Posted July 6, 2022 thank you , im looking for website editor if u could help ( payment ) service Quote Share this post Link to post Share on other sites
V3ct0r 2,116 Report post Posted July 21, 2022 Hello @Mario, Unfortunately, I don't provide any services at the moment. You can create a topic with your request here. 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