• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua How to exit server exe via lua.

Nothxbye

Banned User
Joined
Jan 22, 2012
Messages
1,124
Reaction score
173
Couldn't find anything. Is there any lua function to exit server exe if not maybe in source?

For example in OTClient the func looks like that "g_app.exit()"
 
This method works for lua scripts in a server? Like I could put that as a talkaction to make it exit the server?
 

Exactly like Codinablack said also I want to re-open server application to keep fresh process every x time instead of 200h uptime.

This method works for lua scripts in a server? Like I could put that as a talkaction to make it exit the server?
If you want it in lua just create your own function and inside put only this "exit(-1);"
 
Last edited:
Exactly like Codinablack said also I want to re-open server application to keep fresh process every x time instead of 200h uptime.


If you want it in lua just create your own function and inside put only this "exit(-1);"

Thank you! :D

@dominique120 I don't know if its a bug that needs reported on github or not, but yeah if you just use shutdown state on a timer, and then have a restarter, it won't work because the process never completely ended...

EDIT: Apparently I haven't tried to do that in a long time, because I just tried to do it and take a screenshot and apparently it has been fixed in the version I am using...
 
Thank you! :D

@dominique120 I don't know if its a bug that needs reported on github or not, but yeah if you just use shutdown state on a timer, and then have a restarter, it won't work because the process never completely ended...

EDIT: Apparently I haven't tried to do that in a long time, because I just tried to do it and take a screenshot and apparently it has been fixed in the version I am using...


I rarely use TFS on Windows that is why I was not sure about that, however I do remember that Dalkon submitted this patch so I assumed the problem was fixed. On Linux I used to close my server with the exact script I linked and had absolutely no problems.
 
Thank you! :D

@dominique120 I don't know if its a bug that needs reported on github or not, but yeah if you just use shutdown state on a timer, and then have a restarter, it won't work because the process never completely ended...

EDIT: Apparently I haven't tried to do that in a long time, because I just tried to do it and take a screenshot and apparently it has been fixed in the version I am using...
Try this one for me it works perfect:
http://otland.net/threads/server-restarter-pro-with-remote-connection.209848/
 
Back
Top