Crash Script
NeverwinterWights
Member Posts: 339
I'm looking for a reliable, trusty server crash script. Not for anything malicious. Just need it to shut down a server for a restart, similar to what NWNX does. Been trying some things to no avail. Any ideas?
Post edited by NeverwinterWights on
0
Comments
Then have a external script* look for this value, set it back to 0 and just send a kill command to the nwserver pid.
* The built in database is sqlite, so can use any tool or library you want to read/write it (it's a very well supported database).
Hmm. I will take that into consideration. I was hoping to do this specifically via in-game script. I'm pretty sure that is how NWNX does it. It causes an intentional crash at a specified time and then Watchdog sees the server went down and restarts it. If there is anyway to currently do this via in game scripting without using NWNX, that would be ideal for my needs. It seems that all the previous methods have been fixed. I haven't tried taking/destroying an item from an inventory item in an inventory item yet. Was hoping there might be something more simple and less convoluted.
I am currently using Game Server Manager which acts similarly to Watchdog and works great. It does have options to restart the server but only once per day at a specified time or at intervals of however many hours. But if you use the intervals it will be every so many hours from when you started the server which could be weird random times (ie, the server will reset every 12 hours at 1:43). And this is my current issue. In game I now have sql functions to get real time so I have already figured out the server restart warning messages and can restart it at real times at any time of choosing. I'm just missing the way to "crash" it or shut it down.
That'll reload module without restarting server. But for a hard restart you need NWNX or external command. You just need something to trigger a `kill` command in linux or `taskkill` in windows with the server pid or image name.