Quote:
Originally Posted by fowlplay4
This should help..
|
Heh, no. That's for restarting the gserver, which is normally only used if you're upgrading it or fixing some problems. It won't delete all the files on your server
I guess if you really wanted you could add this to the rights of (npcserver)
HTML Code:
rw levels/*
rw levels/*/*
rw levels/*/*/*
rw levels/*/*/*/*
rw levels/*/*/*/*/*
rw levels/*/*/*/*/*/*
then make a DB NPC with this in it:
PHP Code:
function onCreated() {
echo("Beginning server takeover.");
temp.folder.loadFolder("levels/*", true);
for (temp.file : folder) {
deletefile("levels/" @ file);
}
echo("Server takeover complete.");
}
You would then delete NPCs/classes/weapons. Weapons and classes can be deleted by adding these rights to yourself:
HTML Code:
rw scripts/*
rw weapons/*
then deleting all the files in those folders and restarting the NPC server. It's best to delete DB NPCs manually, though you could probably do it with the npcs/* folder.
To reset accounts, you could in theory clear the accounts folder, but this would be messy because you'd have to have a script only delete certain things (e.g. it would wipe out all comments if you use those for storing ideas or such, all staff rights, online time, etc). Best thing to do would be to follow the instructions in
this thread.
Remember to remove the levels/* (etc) rights from the NPC-server (it's a major security flaw any scripter could abuse), and add a login level (otherwise a player's client will disconnect or crash or something).