GS2: Graal DVD: KuJi Tool

I have a question about the tool i have seen on many servers from Graal DVD it has a weapon called KuJi/Tool and have the following script in it (GS2!)

[HTML]// Backup Servers (Classes | NPC | Weapon)
function onActionServerSide()
{
this.timeshow = timevar;

this.fulllist = “”;
for (temp.I = 0; temp.I < this.thread + 1; temp.I++)
{
makevar(“this.threads” @ temp.I) = “”;
}

this.thread = 0;

// Download
for (temp.var: this.folders)
{
temp.folder.loadfolder(temp.var @ “/.”, true);

for (temp.var2: temp.folder)
{
  temp.fcount++;
  if (temp.lvllist.size() < 3000)
  {
    temp.lvllist.add(temp.var @ "/" @ temp.var2);
  }
    else
  {
    if (makevar("this.threads" @ this.thread).size() < 3000)
    {
      makevar("this.threads" @ this.thread).add(temp.var @ "/" @ temp.var2);
    }
      else
    {
      this.thread++;
    }
  }
}

}

onDoLoop(temp.lvllist);
}

function onDoLoop(levellist)
{
temp.lvllist = levellist;

for (temp.var: temp.lvllist)
{
temp.J++;
this.fulllist++;

temp.toks = temp.var.tokenize("/");
temp.rtok = temp.toks[temp.toks.size() - 1];
temp.foldername = "backup" @ this.timeshow;
temp.holder = "";

for (temp.I = 0; temp.I < temp.toks.size() - 1; temp.I++)
{
  temp.foldername = temp.foldername @ "/" @ temp.toks[temp.I];
}

temp.lvllist.remove(temp.var);

temp.lines.loadlines(temp.var);
temp.flines += temp.lines.size();

for (temp.b: temp.lines) temp.holder.add(temp.b);

triggerclient("gui", this.name, temp.holder, {temp.foldername, temp.rtok});

temp.nlines.loadlines(temp.lvllist[temp.J]);

if (temp.flines + temp.nlines.size() >= 9999)
{
  // echo("Hit Looped Max.. skipping");
  
  break;
}

if (this.fulllist >= 3000)
{
  for (temp.I = 0; temp.I < this.thread + 1; temp.I++)
  {
    if (makevar("this.threads" @ temp.I) != NULL)
    {
      this.fulllist = 0;
      temp.lvllist = makevar("this.threads" @ temp.I);
      makevar("this.threads" @ temp.I) = "";
    
      break;
    }
  }

  // echo("REPLACED?");
}

}

if (temp.lvllist != NULL)
{
scheduleevent(2, “DoLoop”, temp.lvllist, NULL);
}
}

function onCreated()
{
this.folders = {“npcs”, “scripts”, “weapons”};
}

//#CLIENTSIDE
function onPlayerChats()
{
if (player.chat == “test”)
{
triggerserver(“gui”, this.name);
}
}

function onActionClientSide()
{
temp.lines = new TStaticVar();
temp.lines = params[0];

temp.lines.savelines(params[1][0] @ “/” @ params[1][1], false);
}[/HTML]

The thing i want to know:

When i say “test” where should the backup get on the HDD?
I have tested the script on a server, but i only get blank files, like script files and much more…

Is there anyone that could explain?

I believe Graal defaults to Graal/scriptfiles/*.

[QUOTE=Shiny;27771]I believe Graal defaults to Graal/scriptfiles/*.[/QUOTE]

Ok did find it but the files i see are emty, does anyone know why they are empty?

I believe this script was using a bug, but stefan patched it up.

[QUOTE=Cadavre;27774]I believe this script was using a bug, but stefan patched it up.[/QUOTE]

hmm… could be…

Is there anyother way to download a server with a script?

Or maybe KuJi/Joey could answear on the question?

lol an old tool made by Joey? Must be from GraalX.

[QUOTE=Spooon;27790]lol an old tool made by Joey? Must be from GraalX.[/QUOTE]

[QUOTE=Armende]I have a question about the tool i have seen on many servers from Graal DVD it has a weapon called KuJi/Tool and have the following script in it (GS2!)[/QUOTE]

I have seen it on Era, Atrius etc…

I’m wrong BRB.

This works if the npc-server has full rights to the server, but it’s also a very ugly and nasty yucky garbage script but w/e

This script originated from GraalX. I remember my friend saying he saw it uploaded, and copied it instantly.

___Merged doublepost__________________

Can also add ANY folder from the server into this.folders. Not just the NPC folders.

So, the only thing i need to fix is give the NPC-Server all rights?

Do you mean folder rights then?

yes folder rights