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?