flamyman1412 4 Report post Posted July 13, 2019 How do I want to schedule the opening of the chaos, such as 10:00 am - 21:00 pm and start again at 10:00 am 14:00 pm 18:00 pm 21:00 pm Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted July 13, 2019 (edited) function can_open_entry_garner2( map ) -- Specific portal time to open local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 10 or hournum == 14 or hournum == 18 or hournum == 21 then -- (I would recommend change 21 to 22, just to keep it consistant.) return 1 else return 0 end end Edited July 14, 2019 by GOAT 1 Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 13, 2019 (edited) 35 minutes ago, GOAT said: function can_open_entry_garner2( map ) Specific portal time to open local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 10 or hournum == 14 or hournum == 18 or hournum == 21 then -- (I would recommend change 21 to 22, just to keep it consistant.) return 1 else return 0 end end Thank you very much. I will try it. 22 is the final round that opens the portal? Edited July 13, 2019 by flamyman1412 Quote Share this post Link to post Share on other sites
Дракан 39 Report post Posted July 13, 2019 2 часа назад, flamyman1412 сказал: Thank you very much. I will try it. 22 is the final round that opens the portal? yes 1 Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 13, 2019 17 minutes ago, Дракан said: yes Thank Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 14, 2019 (edited) 20 hours ago, GOAT said: function can_open_entry_garner2( map ) Specific portal time to open local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 10 or hournum == 14 or hournum == 18 or hournum == 21 then -- (I would recommend change 21 to 22, just to keep it consistant.) return 1 else return 0 end end I tested it and it can't be used.@GOAT Edited July 14, 2019 by flamyman1412 Quote Share this post Link to post Share on other sites
DangThao 80 Report post Posted July 14, 2019 make sure u do: function can_open_entry_garner2( map ) --Specific portal time to open local hour = os.date ("%H") instead of : function can_open_entry_garner2( map ) Specific portal time to open local hour = os.date ("%H") 2 Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted July 14, 2019 2 hours ago, flamyman1412 said: I tested it and it can't be used.@GOAT As @DangThao mention, comment the Specific portal time to open, my apologies. Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 14, 2019 2 hours ago, DangThao said: make sure u do: function can_open_entry_garner2( map ) --Specific portal time to open local hour = os.date ("%H") instead of : function can_open_entry_garner2( map ) Specific portal time to open local hour = os.date ("%H") Thank you. I will try testing again. Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 14, 2019 4 hours ago, DangThao said: make sure u do: function can_open_entry_garner2( map ) --Specific portal time to open local hour = os.date ("%H") instead of : function can_open_entry_garner2( map ) Specific portal time to open local hour = os.date ("%H") Error notification and when editing cannot use the command Portal is still open by normal hours every 2 hours. @DangThao Quote Share this post Link to post Share on other sites
d3ux 23 Report post Posted July 14, 2019 https://en.wikibooks.org/wiki/Lua_Programming/comment Quote Share this post Link to post Share on other sites
DangThao 80 Report post Posted July 14, 2019 10 hours ago, flamyman1412 said: Error notification and when editing cannot use the command Portal is still open by normal hours every 2 hours. @DangThao See the -- ? before the words specific portal time to open U need the -- in order to load it correctly or else lua gonna read the text specific portal time to open which will give u error 1 Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 15, 2019 11 hours ago, DangThao said: See the -- ? before the words specific portal time to open U need the -- in order to load it correctly or else lua gonna read the text specific portal time to open which will give u error Thank you for your advice But I can't do it. Sorry. Quote Share this post Link to post Share on other sites
Angelix 374 Report post Posted July 15, 2019 On 7/12/2019 at 8:45 PM, GOAT said: function can_open_entry_garner2( map ) -- Specific portal time to open local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 10 or hournum == 14 or hournum == 18 or hournum == 21 then -- (I would recommend change 21 to 22, just to keep it consistant.) return 1 else return 0 end end Just do this: function can_open_entry_garner2( map ) local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 10 or hournum == 14 or hournum == 18 or hournum == 21 then return 1 else return 0 end end @flamyman1412, remove the comments all together if you're having trouble. Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 16, 2019 4 hours ago, Angelix said: Just do this: function can_open_entry_garner2( map ) local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 10 or hournum == 14 or hournum == 18 or hournum == 21 then return 1 else return 0 end end @flamyman1412, remove the comments all together if you're having trouble. I've tried It's open, but it doesn't go as expected. It opens every 2 hours. And not closed at the specified time, such as opening 10am and closing at 12am Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted July 16, 2019 function init_entry(map) SetMapEntryMapName(map, "darkblue") SetMapEntryTime(map, "2006/10/18/14/0", "0/4/0", "0/0/30", "0/0/45") end function can_open_entry_garner2( map ) local hour = os.date ("%H") local hournum = tonumber(hour) if hournum == 10 or hournum == 14 or hournum == 18 or hournum == 22 then return 1 else return 0 end end Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 16, 2019 (edited) I can't access the game on the VPS but can access the game on the device at home. Connection failed @GOAT Sorry i can fix Edited July 16, 2019 by flamyman1412 Quote Share this post Link to post Share on other sites
flamyman1412 4 Report post Posted July 16, 2019 Can you talk to me in pm? @GOAT Quote Share this post Link to post Share on other sites