TheSamurai 3 Report post Posted May 21, 2016 (edited) Can someone help me to have a npc that will give player a quest when the time is 1AM - 3AM abd 1PM to 3PM. I tried this but it seems its not working well, function NpcTime (role) local npc_time = os.date(%H) npc_time = to.number(npc_time) if npc_time =>13 and npc_time <15 then return LUA_TRUE end end I think ill not post the missionsdk scripts too since the one i posted is the main problem i think. I hope someone can help me thank you. Edited May 21, 2016 by TheSamurai Quote Share this post Link to post Share on other sites
MonkeyCode 453 Report post Posted May 21, 2016 I will write/release a set of handlers for these type of conditional functions soon. But by examining your code, couple things: os.date(%H) -> os.date("%H") to.number -> tonumber Quote Share this post Link to post Share on other sites
TheSamurai 3 Report post Posted May 21, 2016 Oh sorry i just mis type it an yea it suppose to be like that but still not working. Anyway, ill just wait for you to release what have you said Quote Share this post Link to post Share on other sites
Guest Report post Posted May 21, 2016 function NpcTime ( role ) local npc_time = os.date("%H") npc_time = tonumber(npc_time) if npc_time > 13 and npc_time < 15 then return LUA_TRUE end end Try this. Quote Share this post Link to post Share on other sites