gunnapong 14 Report post Posted August 9, 2021 I want to create a timed quest for the quest to be available during this time. Can do a quest for 15 minutes and then the quest disappears, can't be done. sorry for my english Help me plz Tank. Quote Share this post Link to post Share on other sites
gunnapong 14 Report post Posted August 9, 2021 Help me plz Quote Share this post Link to post Share on other sites
1g0rS1lv4 68 Report post Posted August 9, 2021 function CheckTime ( Player ) local Now_Week = os.date("%w") local Now_Hour = os.date("%H") Now_Week = tonumber(Now_Week) Now_Hour = tonumber(Now_Hour) if Now_Week == 6 or Now_Week == 0 then if Now_Hour >= 9 and Now_Hour < 12 then return LUA_TRUE elseif Now_Hour >= 21 then return LUA_TRUE end end end you can use the CheckTime condition MissionSdk.lua elseif conditions[i].func ==CheckTime then PRINT( "ConditionsTest: CheckTime, p1 =, p2 =", conditions[i].p1) local ret = CheckTime( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckTime = false" ) return LUA_FALSE end way of use. MisBeginCondition(CheckTime) Quote Being better than others is for those who are weak; what matters is to be true to yourself. Share this post Link to post Share on other sites
gunnapong 14 Report post Posted August 9, 2021 4 minutes ago, 1g0rS1lv4 said: function CheckTime ( Player ) local Now_Week = os.date("%w") local Now_Hour = os.date("%H") Now_Week = tonumber(Now_Week) Now_Hour = tonumber(Now_Hour) if Now_Week == 6 or Now_Week == 0 then if Now_Hour >= 9 and Now_Hour < 12 then return LUA_TRUE elseif Now_Hour >= 21 then return LUA_TRUE end end end you can use the CheckTime condition MissionSdk.lua elseif conditions[i].func ==CheckTime then PRINT( "ConditionsTest: CheckTime, p1 =, p2 =", conditions[i].p1) local ret = CheckTime( character, conditions[i].p1 ) if ret ~= LUA_TRUE then PRINT( "ConditionsTest:CheckTime = false" ) return LUA_FALSE end way of use. MisBeginCondition(CheckTime) function CheckTime ( Player ) where to put? Quote Share this post Link to post Share on other sites
1g0rS1lv4 68 Report post Posted August 9, 2021 3 hours ago, gunnapong said: function CheckTime ( Player ) where to put? functions.lua Quote Being better than others is for those who are weak; what matters is to be true to yourself. Share this post Link to post Share on other sites
1g0rS1lv4 68 Report post Posted August 9, 2021 make sure the code doesn't already exist in your files. Quote Being better than others is for those who are weak; what matters is to be true to yourself. Share this post Link to post Share on other sites
gunnapong 14 Report post Posted August 9, 2021 6 hours ago, 1g0rS1lv4 said: make sure the code doesn't already exist in your files. MisBeginCondition(CheckTime) Checktime --What number should we enter? Quote Share this post Link to post Share on other sites
gunnapong 14 Report post Posted August 10, 2021 function CheckTime ( role ) <<<<< I only found this Quote Share this post Link to post Share on other sites
gunnapong 14 Report post Posted August 29, 2021 Up Quote Share this post Link to post Share on other sites
Graf 210 Report post Posted September 1, 2021 @gunnapong Need create this function Quote Share this post Link to post Share on other sites
gunnapong 14 Report post Posted September 2, 2021 14 hours ago, Graf said: @gunnapong Need create this function Where function ? Quote Share this post Link to post Share on other sites
gunnapong 14 Report post Posted October 23, 2021 On 1/9/2564 at 18 นาฬิกา 52 นาที, Graf said: @gunnapong ต้องสร้างฟังก์ชั่นนี้ Where ? Quote Share this post Link to post Share on other sites
V3ct0r 2,117 Report post Posted November 9, 2021 On 10/23/2021 at 3:44 PM, gunnapong said: Where ? You can place it in functions.lua, for example. 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