Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-13-2013, 04:30 PM
i8bit i8bit is offline
Registered User
Join Date: Jul 2013
Posts: 146
i8bit is an unknown quantity at this point
Server reset

Is there a NPC command to wipe the whole server to start from scratch?
Reply With Quote
  #2  
Old 08-13-2013, 04:37 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
You would have to either contact someone in the PWA or do it manually. I know Tig and Xor used to be able to do it. I'm unsure if anyone else is able to but you can send an email to [email protected] and pray for a response.

edit: Another option would be using cbk1994's FTP Server if it still works as it may speed up the process, I've heard it doesn't but I have not tested it. I've provided the link below.

http://forums.graalonline.com/forums...hp?t=134261400
Reply With Quote
  #3  
Old 08-13-2013, 04:43 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Quote:
Originally Posted by Cubical View Post
You would have to either contact someone in the PWA or do it manually. I know Tig and Xor used to be able to do it. I'm unsure if anyone else is able to but you can send an email to [email protected] and pray for a response.
I don't see why he cant just remove all the files via the FTP. Then open folder options, and paste the default into it. At least a well organized server from the start would be that simple.

Might I ask what you need it completely reset for anyways?
Reply With Quote
  #4  
Old 08-13-2013, 04:54 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by scriptless View Post
I don't see why he cant just remove all the files via the FTP. Then open folder options, and paste the default into it. At least a well organized server from the start would be that simple.

Might I ask what you need it completely reset for anyways?
I mentioned that, I was just offering some alternative options that are less painful.
Reply With Quote
  #5  
Old 08-13-2013, 05:29 PM
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
FTP won't anymore in general, but won't work for this anyway since the accounts folder is protected from writing by scripts.

The best solution assuming you can't just get Stefan to wipe the accounts folder (which you probably don't want anyway since you lose rights, comments, online time, etc.):

Quote:
Originally Posted by cbk1994 View Post
PHP Code:
function resetAll() {
  
temp.folder.loadFolder("accounts/*"true);
  
  for (
temp.file folder) {
    if (!
file.ends(".txt")) {
      continue;
    }
    
    
file file.substring(0file.length() - 4); // remove extension
    
temp.tokens file.tokenize("/"); // split between slashes
    
    
sendtorc("/reset" SPC removeEscapesFromFileName(tokens[tokens.size() - 1]));
  }

I imagine something like this would work, but I've never tried anything like it. No rights should be needed; loadFolder works with no read rights as far as I know.
The NPC-server will actually need reset rights (not sure if I missed that or if npc-server rights hadn't yet been implemented when I wrote that post). I also fixed a couple of errors in the script but I might have missed more, make sure to test before using. I wrote that four years ago so I'm not confident it will behave appropriately with pc:## or Graal## accounts, but this approach is probably the best way to do a reset.
__________________
Reply With Quote
  #6  
Old 08-13-2013, 05:37 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
I think that he is talking about removing the code, levels, etc and restore it to default so it appears as new. You can always wipe player flags and weapons on login if he's worried about that.
Reply With Quote
  #7  
Old 08-13-2013, 05:42 PM
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 Cubical View Post
I think that he is talking about removing the code, levels, etc and restore it to default so it appears as new. You can always wipe player flags and weapons on login if he's worried about that.
Whoops, misunderstood the poster. Wiping from login is a bit messy, my approach is better. For the files, can't you just delete them using RC? I suppose you could delete them with a script if you want, just recurse through the levels directory and delete any files you find.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.