Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Server reset (https://forums.graalonline.com/forums/showthread.php?t=134268616)

i8bit 08-13-2013 04:30 PM

Server reset
 
Is there a NPC command to wipe the whole server to start from scratch?

Cubical 08-13-2013 04:37 PM

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

scriptless 08-13-2013 04:43 PM

Quote:

Originally Posted by Cubical (Post 1721691)
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?

Cubical 08-13-2013 04:54 PM

Quote:

Originally Posted by scriptless (Post 1721692)
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.

cbk1994 08-13-2013 05:29 PM

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 (Post 1457708)
PHP Code:

function resetAll() {
  
temp.folder.loadFolder("accounts/*", true);
  
  for (
temp.file : folder) {
    if (!
file.ends(".txt")) {
      continue;
    }
    
    
file = file.substring(0, file.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.

Cubical 08-13-2013 05:37 PM

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.

cbk1994 08-13-2013 05:42 PM

Quote:

Originally Posted by Cubical (Post 1721695)
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.


All times are GMT +2. The time now is 10:57 PM.

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