View Single Post
  #3  
Old 06-23-2009, 01:09 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by fowlplay4 View Post
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).
__________________

Last edited by cbk1994; 06-23-2009 at 01:24 AM..
Reply With Quote