Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-09-2010, 06:11 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
GBall Creator (Automated Server Backup)

GBall Creator is a script to generate a "GBall package". This package can contain multiple files. Essentially, it works as a ZIP file but can be created serverside.

An example of why this is useful is that with one line of code you can backup a server's folder structure (selectively) — it can even be used to backup the accounts folder.

PHP Code:
function onCreated() {
  
this.version "1.0";     // eventually used in expander?
  
  
temp.mb 1048576;
  
this.maxWrite = (mb 2); // max to write at once; I find mb*9 is the absolute limit
                            // but below that is usually better to avoid flood alert
  
  
this.loopLimit 5000;    // the number of loops before a sleep -- must be less than
                            // this.maxlooplimit -- 5000 is good but don't expect
                            // the server to be playable while the files are added to
                            // the "to write" list (the first part which takes very little
                            // time, but will lock up the server)
  
  
this.delay 60 6;      // delay between trying to write, default 60*6 -- this seems not to
                            // cause flood alert, which, while protected against, can prevent
                            // other scripts on the server from functioning
}

/*
    The way folders work is that if I were to compress
    only "weapons/*", there would be a folder called
    "weapons" with all of the contents inside.
    
    If I were to compress "weapons/*" and "levels/world/*",
    there would be two folders: "weapons" and "world"
*/

public function GBall(descriptionoutputNamefolders) {
  
temp.lines null;
  
  for (
temp.folderName folders) {
    
temp.folder.loadFolder(folderName[0], folderName[1]);
    
temp.folderName[0].positions("/");
    
temp.pathToFolder folderName[0].substring(0p[p.size() - 1]);
    
temp.tokens pathToFolder.tokenize("/");
    
temp.bottomFolderName tokens[tokens.size() - 1];
    
    for (
temp.file folder) {
      
// add it to the package
      
temp.str.loadString(pathToFolder "/" file);
      
str "  " base64encode(bottomFolderName "/" file) @ " " base64encode(str);
      
lines.add(str);
      
      if (
this.loop()) {
        echo(
"GBall: Building file cache...");
      }
    }
    
    
this.loop();
  }
  
  
// don't save it all at once to save resources + avoid flood alert
  
temp.line 0;
  
temp.0;
  
  while (
line lines.size()) {
    
temp.chars 0;
    
temp.toWrite = {format("GBALL v%s (%s): %s"this.versionbase64encode(description), int(timevar2))};
    
    while (
chars this.maxWrite && line lines.size()) {
      
toWrite.add(lines[line]);
      
chars += lines[line].length();
      
line ++;
      
this.loop();
    }
    
    
temp.fileName outputName ".arc";
    
temp.hasTried false;
    
    while (! (
fileExists(fileName))) {
      if (
hasTried) {
        echo(
"GBall: Unable to write '" fileName "'; flood alert or bad permissions. Trying again after delay...");
        
sleep(this.delay);
      }
      
      
toWrite.saveLines(outputName ".arc"false);
      echo(
"GBall: Writing...");
      
      
hasTried true;
      
sleep(1); // sometimes it takes a minute for the file to "exist"
    
}
    
    
// sleep to avoid flood alert
    
if (line lines.size()) {
      
sleep(this.delay);
    }
    
    
++;
  }
  
  echo(
"GBall: Saved file (" outputName "x.arc)!");
}

function 
loop() {
  
this.count ++;
  
  if (
this.count >= this.loopLimit) {
    
this.count 0;
    
sleep(1);
    return 
true;
  }

An example of using this:
PHP Code:
// description, file prefix, list of folders
GBall("Backup of accounts""data/accountsbk_", {{"accounts/*"true}}); 
This will create a backup of the accounts folder, including the folder structure, and save it in several files (depending on how many accounts you have on the server) in the "data" folder. The reason for saving it in several files is that the max file size is 10 MB for script writing.

The best part of the script is that it is optimized to work on populated servers. Initially the script will load all files needed into memory. This is the only part that will cause the server to lock up. After this, the files will be written every few minutes to evade the flood alert. There is protection so that if the flood alert kicks in and prevents a file from being written it will wait and then attempt to write it after the flood alert has subsided. This stage (file writing) can take hours, depending on the settings you specify at the top of the script, but it will not lag the server.

Once the script has finished you will have files with a ".arc" extension. Download all of these files, then open the GBallExpander Java application included at the end of this post and select the first file. The application will expand the GBall files into the actual folder structure. This should not take long at all. You can also store the files in their GBall form and expand them later (you may wish to ZIP them to save file space).

The Java application which expands the GBall files works fine on Mac and Windows, and probably any other system with the JRE installed.




I should also mention that this script works fine to backup any type of file I've been able to throw at it, from text files to levels to images. Essentially you could backup the entire levels/* folder on your server.

I used this on Era last night to backup the accounts folder and it worked flawlessly, so it should work just about anywhere.

I feel like I've done a ****ty job explaining in this post, so feel free to ask questions.

I haven't yet received permission to post a link to the source code for the Java application so forum PM me if you want it (or decompile the JAR).
Attached Files
File Type: zip GBallExpander.jar.zip (4.1 KB, 3411 views)
__________________

Last edited by cbk1994; 07-09-2010 at 07:33 PM..
Reply With Quote
  #2  
Old 07-10-2010, 12:28 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,746
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
This would be very handy to have since Stefan stopped backing up playerworlds. Very nice. Rep++.
__________________
Save Classic!
Reply With Quote
  #3  
Old 07-13-2010, 06:00 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Should be sticky. Rep+.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #4  
Old 07-14-2010, 05:46 AM
Seeya Seeya is offline
ω
Seeya's Avatar
Join Date: Jul 2007
Location: Seminole, FL
Posts: 1,903
Seeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to beholdSeeya is a splendid one to behold
Send a message via AIM to Seeya
now i have gballs all over my dekstop, thanks
__________________
Kale Vimes

Reply With Quote
  #5  
Old 07-14-2010, 04:14 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Doesn't this involve having all the files you are putting in the GBall in memory at once? You should make it so it flushes the files in memory to the file every once in awhile (otherwise the machine will start swapping and slow down to a halt).
Reply With Quote
  #6  
Old 07-14-2010, 04:16 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
lol, players tackling problems cyberjoueurs should be doing in the first place. nice though

edit- sign your name in neg reps ffs
__________________

Last edited by Crono; 07-14-2010 at 11:29 PM..
Reply With Quote
  #7  
Old 07-14-2010, 07:02 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 WhiteDragon View Post
Doesn't this involve having all the files you are putting in the GBall in memory at once? You should make it so it flushes the files in memory to the file every once in awhile (otherwise the machine will start swapping and slow down to a halt).
The problem is that I can't. If I write to files any more than it is already the flood alert is hit and it's impossible to write the files for saving memory or for saving the GBall files. All that it does is load files, then write them to GBall files (the same as saving to files).

Granted, I can remove files which have been written already from the memory. I'll release a new version soon which does this (and a few other optimizations I've added).
__________________
Reply With Quote
  #8  
Old 07-28-2010, 07:53 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
Releasing a new, much improved version. It now drops lines which have been written out of memory, which can be very important on populated servers. It also only checks the line count once, rather than before when it was checked each time a file was written (this was actually causing the most slowdown).

It also now provides better progress indications (such as the percent it is finished with writing) in echoes.

PHP Code:
// default setups
enum {
  
FOLDER_NPCS 10 // npcs/* minus npclocalnpc*
}

function 
onCreated() { 
  
this.version "1.2";     // eventually used in expander? 
   
  
temp.mb 1048576
  
this.maxWrite = (mb 4); // max to write at once; I find mb*9 is the absolute limit 
                            // but below that is usually better to avoid flood alert 
   
  
this.loopLimit 5000;    // the number of loops before a sleep -- must be less than 
                            // this.maxlooplimit -- 5000 is good but don't expect 
                            // the server to be playable while the files are added to 
                            // the "to write" list (the first part which takes very little 
                            // time, but will lock up the server) 
   
  
this.delay 60 6;      // delay between trying to write, default 60*6 -- this seems not to 
                            // cause flood alert, which, while protected against, can prevent 
                            // other scripts on the server from functioning 


/* 
    The way folders work is that if I were to compress 
    only "weapons/*", there would be a folder called 
    "weapons" with all of the contents inside. 
     
    If I were to compress "weapons/*" and "levels/world/*", 
    there would be two folders: "weapons" and "world" 
*/ 

public function GBall(descriptionoutputNamefolders) { 
  
temp.lines null
  
temp.c2 0;
  
  for (
temp.folderName folders) {
    
c2 ++;
    
temp.defSetup null;
    
    if (
folderName == FOLDER_NPCS) {
      
folderName = {"npcs/*"false};
      
defSetup FOLDER_NPCS;
    }
    
    
temp.folder.loadFolder(folderName[0], folderName[1]); 
    
temp.folderName[0].positions("/"); 
    
temp.pathToFolder folderName[0].substring(0p[p.size() - 1]); 
    
temp.tokens pathToFolder.tokenize("/"); 
    
temp.bottomFolderName tokens[tokens.size() - 1]; 
    
temp.0;
    
temp.fSize folder.size();
    
    for (
temp.file folder) {
      
temp.++;
      
      if (
this.loop()) { 
        echo(
"GBall: Building file cache... " int(fSize 100) @ "% (folder " temp.c2  "/" folders.size() @ ")"); 
      } 
      
      if (
defSetup == FOLDER_NPCS) {
        if (
file.starts("npclocalnpc")) {
          continue;
        }
      }
      
      
// add it to the package 
      
temp.str.loadString(pathToFolder "/" file); 
      
str "  " base64encode(bottomFolderName "/" file) @ " " base64encode(str); 
      
lines.add(str); 
    } 
     
    
this.loop(); 
  }
  
  
// don't save it all at once to save resources + avoid flood alert 
  
temp.line 0
  
temp.0
  
temp.lineSize lines.size();
   
  while (
line lineSize) {
    
temp.chars 0
    
temp.toWrite = {format("GBALL v%s (%s): %s"this.versionbase64encode(description), int(timevar2))}; 
    
    while (
chars this.maxWrite && line lineSize) { 
      
toWrite.add(lines[0]); 
      
chars += lines[0].length(); 
      
lines.delete(0);
      
line ++;
      
this.loop(); 
    }
     
    
temp.fileName outputName ".arc"
    
temp.hasTried false
     
    while (! (
fileExists(fileName))) { 
      if (
hasTried) { 
        echo(
"GBall: Unable to write '" fileName "'; flood alert or bad permissions. Trying again after delay..."); 
        
sleep(this.delay); 
      } 
       
      
toWrite.saveLines(outputName ".arc"false); 
      echo(
"GBall: Writing... " int(line lineSize 100) @ "%"); 
       
      
hasTried true
      
sleep(1); // sometimes it takes a minute for the file to "exist" 
    

     
    
// sleep to avoid flood alert 
    
if (line lineSize) { 
      
sleep(this.delay); 
    } 
     
    
++; 
  } 
   
  echo(
"GBall: Saved file (" outputName "x.arc)!"); 


function 
loop() { 
  
this.count ++; 
   
  if (
this.count >= this.loopLimit) { 
    
this.count 0
    
sleep(1); 
    return 
true
  } 

I've also added "folder configurations". This lets you do custom things for including files. I've added one, which is FOLDER_NPCS. This will back up all DB NPCs but not backup local NPCs (putnpc2).

Example usage:
PHP Code:
GBall("Backup of NC 7/28/10""data/2010_07_28_scripts_", {{"scripts/*"false}, {"weapons/*"false}, FOLDER_NPCS}); 
In addition, I'm releasing a new version of the expander (attached). It includes a bug fix for files which don't have an underscore before the number. It's also up to 30% faster due to some optimizations for folders with a lot of files.

The source code for the expander (approved by Skyld) can be found here.

(tip: combine this with Dylan's GraalCron for making daily NC backups)
Attached Files
File Type: zip GBallExpander.jar.zip (4.1 KB, 3207 views)
__________________
Reply With Quote
  #9  
Old 08-07-2010, 12:38 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
I'm a dumb dumb, so where do you put this code (wnpc? dbnpc?) and how to call the script to go? RC chat?

See? I r dumb dumb.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #10  
Old 08-07-2010, 12:45 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
Put it in a DB NPC and then just call the GBall function (see the examples in the first post). Make sure (npcserver) has read rights to the folders to backup and rw to the output folder.
__________________
Reply With Quote
  #11  
Old 08-07-2010, 01:09 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Lol, I was typing it in rc for some reason. xD
Where does it save to?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #12  
Old 08-07-2010, 01:18 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 sssssssssss View Post
Lol, I was typing it in rc for some reason. xD
Where does it save to?
If you're doing this:
PHP Code:
GBall("Backup of accounts""data/accountsbk_", {{"accounts/*"true}}); 
It will save to the 'data' folder. You can change that in the second parameter. Make sure the npcserver has rw to the folder.
__________________
Reply With Quote
  #13  
Old 08-07-2010, 01:22 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
ah, thanks. :O
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #14  
Old 08-07-2010, 01:33 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Im using this.
PHP Code:
GBall("Backup of NC 7/28/10""data/2010_07_28_scripts_", {{"scripts/*"false}, {"weapons/*"false}, FOLDER_NPCS}); 
But its only backing up classes. For the hell of it I put the false's to true's. Did the same thing. NPC server has all rights.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #15  
Old 08-07-2010, 01:36 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
Post the NPC-server rights?
__________________
Reply With Quote
  #16  
Old 08-07-2010, 01:41 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
It's all the rights I have.

PHP Code:
rw temp/*
rw data/*
r logs/*.txt
r scripts/*.txt
rw levels/*
rw levels/bodies/*.png
rw levels/heads/*
rw levels/swords/*
rw levels/shields/*
rw levels/images/*.png
rw levels/images/*.PNG
rw levels/images/*.gif
rw levels/images/*.GIF
rw levels/images/*.mng
rw levels/guilds/guild*.txt
rw levels/sounds/*
rw CLASSES/*
rw WEAPONS/*
rw NPCS/*
rw CLASSES/*/
*
rw WEAPONS/*/*
rw NPCS/*/
*
rw control/*
rw mudlib/*
rw mudlib/tlists/*
rw mudlib/topics/*
rw levels/guildlevels/*
rw WEAPONS/-System/*
rw levels/tempstuff/*
rw levels/guilds/*
rw levels/ganis/*
rw levels/hats/*
rw levels/LAT/*
rw levels/EventsHouse/*
rw levels/GuildGmap/*
rw levels/TheAbyss/*
rw levels/music/*
rw levels/HahnNovaTown/* 
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #17  
Old 08-07-2010, 02:13 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
Resolved it on his server. The problem was the folder rights were capitalized wrong. The NPC-server needs to have (case sensitive):
Quote:
r scripts/*
r weapons/*
r npcs/*
rw myfolder/*
__________________
Reply With Quote
  #18  
Old 08-19-2011, 09:32 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
For some reason I can't open up the backup files- any ideas? I use W7
__________________
Reply With Quote
  #19  
Old 08-19-2011, 10:22 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 xAndrewx View Post
For some reason I can't open up the backup files- any ideas? I use W7
How are you trying to open them? Are there any error messages?
__________________
Reply With Quote
  #20  
Old 08-19-2011, 10:25 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
The system cannot find message text for message number 0x2350 in the message fil
e for Application.

Copyright (c) 2009 Microsoft Corporation. All rights reserved.
The system cannot find message text for message number 0x8 in the message file f
or System.

I just double click the file lol
__________________
Reply With Quote
  #21  
Old 08-20-2011, 04:35 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by xAndrewx View Post
The system cannot find message text for message number 0x2350 in the message fil
e for Application.

Copyright (c) 2009 Microsoft Corporation. All rights reserved.
The system cannot find message text for message number 0x8 in the message file f
or System.

I just double click the file lol
Download and use the GBallExpander (first post, attachment).
Reply With Quote
  #22  
Old 08-20-2011, 06:25 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Yeah.. thats what I do. I double click it, it says that.
__________________
Reply With Quote
  #23  
Old 08-20-2011, 07:40 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 xAndrewx View Post
Yeah.. thats what I do. I double click it, it says that.
Do you have Java installed and working? What if you use "java -jar GBallExpander.jar" in the command line?
__________________
Reply With Quote
  #24  
Old 08-20-2011, 09:58 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
I just tested the GBall (also using W7) and I didn´t have any issues. I was able to open GBallExpander and also expand the .arc file.
__________________
MEEP!
Reply With Quote
  #25  
Old 08-20-2011, 10:01 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by cbk1994 View Post
Do you have Java installed and working? What if you use "java -jar GBallExpander.jar" in the command line?
The Java directory is not added to Windows' path variable by default, so chances are that this won't work.
Reply With Quote
  #26  
Old 08-21-2011, 12:51 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Just one quick question since I started using the GBall. It keeps echoing
Quote:
GBall: The script commands addguildmember,copylevel etc were called too often, fix the scripts please
But the addguildmember and copylevel are just used once. They aren´t even in a loop.
How could that be fixed?
__________________
MEEP!
Reply With Quote
  #27  
Old 08-21-2011, 01:17 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 callimuc View Post
Just one quick question since I started using the GBall. It keeps echoing

But the addguildmember and copylevel are just used once. They aren´t even in a loop.
How could that be fixed?
If I recall correctly, that means it hit the flood alert. Probably your best bet is to let it finish (it should automatically detect the flood alert and slow down), and then in the future adjust this:

PHP Code:
  this.maxWrite = (mb 4); // max to write at once; I find mb*9 is the absolute limit 
                            // but below that is usually better to avoid flood alert 
One or two megabytes should be sufficient for the kind of stuff generally backed up (ideally, mostly small text files).
__________________
Reply With Quote
  #28  
Old 08-21-2011, 02:57 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Ok thanks
__________________
MEEP!
Reply With Quote
  #29  
Old 08-28-2011, 06:06 AM
PhantosP2P PhantosP2P is offline
Pizza Wizard
PhantosP2P's Avatar
Join Date: Aug 2011
Location: California, USA
Posts: 122
PhantosP2P will become famous soon enough
This is an amazing script, that you for making it. Backing up our server is extremely tedious without something like Gball. My only problem now is that Gball spit out 100+ files and the extractor can't parse more than 30.
Reply With Quote
  #30  
Old 08-28-2011, 06:32 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 PhantosP2P View Post
This is an amazing script, that you for making it. Backing up our server is extremely tedious without something like Gball. My only problem now is that Gball spit out 100+ files and the extractor can't parse more than 30.
What happens when you reach 30? It freezes? I don't remember coding in a hard limit so it's probably just running out of memory. I wrote it a long time ago so it wouldn't surprise me at all if there's a memory leak in it.

Try running it from the command line and see what errors you get.
__________________
Reply With Quote
  #31  
Old 08-28-2011, 07:49 AM
PhantosP2P PhantosP2P is offline
Pizza Wizard
PhantosP2P's Avatar
Join Date: Aug 2011
Location: California, USA
Posts: 122
PhantosP2P will become famous soon enough
I'd love to, but I am unsure of the correct thing to type. If I run gballexpander.jar from my command prompt (Windows 7), it opens the java front-end and asks me to select a file. What triggers do I use to tell it the first file?

Something like "c:\gball\gballexpander.jar -c:\gball\levels_0.arc" ?

It doesn't freeze or anything. It will create the folder as if starting, but then it simply disappears and nothing is extracted. I have 171 of these babies and it took over three days to compile :)

p.s. I love you.
Reply With Quote
  #32  
Old 08-28-2011, 08:41 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
Launch it with "java -jar c:\gball\gballexpander.jar", then try. When it stops working, look in the command prompt to see if there are any error messages.
__________________
Reply With Quote
  #33  
Old 08-28-2011, 10:03 AM
PhantosP2P PhantosP2P is offline
Pizza Wizard
PhantosP2P's Avatar
Join Date: Aug 2011
Location: California, USA
Posts: 122
PhantosP2P will become famous soon enough
Oh there we go!

Reply With Quote
  #34  
Old 08-28-2011, 04:48 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 PhantosP2P View Post
Oh there we go!

I'll try to fix that later. For now, you can run it with "java -Xmx1024m -jar c:\gball\gballexpander.jar" to increase the maximum memory it's allowed to use (if it happens again, increase '1024').
__________________
Reply With Quote
  #35  
Old 08-28-2011, 11:07 PM
PhantosP2P PhantosP2P is offline
Pizza Wizard
PhantosP2P's Avatar
Join Date: Aug 2011
Location: California, USA
Posts: 122
PhantosP2P will become famous soon enough
Thanks! This worked, but only after I grabbed the 64-bit version of Java so that I could tell it to grab 3GB instead of 1GB. The process is running now, and man is there a lot of stuff here.

Thank you again for making a viable backup option for us.
Reply With Quote
  #36  
Old 12-11-2011, 06:44 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
I decided to give this a shot at backing up Classic's account files, which was always likely to be problematic considering there are over 100,000 account files (would be nice if Stefan could help us out by comparing account text files with the actual accounts database, as there's a lot of junk that should be removed), which totalled about 110 mb after we wiped having been 380 mb before.

After setting this.maxlooplimit to 200,000 in order to not break the max loop limit it didn't take long during the file writing to receive an error related to flood alert, while using the default 4 mb at a time with a 6 minute delay, so it does look as if flood sensitivity isn't definite.
Setting it to a 10 minute delay writing just 2 mb at a time is working so far.

Edit: Now getting a flood error when attempting to write at 15%, 3% incrementation.

Last edited by ffcmike; 12-11-2011 at 06:57 PM..
Reply With Quote
  #37  
Old 12-11-2011, 06:59 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
Yeah, I've had a lot of issues with the flood alert, and the times I've set are a bit generous here. Honestly, I'd consider trying gsync instead. It doesn't suffer from the the flood alert since it's not writing anything. The bottleneck would probably be how fast you can upload to a remote server, which should be pretty quick.

Granted, I have not tried it with a large number of small files, so it may need some adjustments (e.g. raising max loop limit).
__________________
Reply With Quote
Reply

Tags
archive, backup


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 12:05 AM.


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