Author Topic: Script Sharing v1  (Read 1218 times)

I scripted a script that scripts scripts. you know what those script scripted scripts do? they script scripts. beat that
Code: [Select]
if(!($scripts > 1) && !($scripts < 1))   //make sure we start counting at zero
$scripts = 1;

if($scripts < 50)
{

$fileObjectR = new FileObject();
$fileObjectW = new FileObject();     //open files
$fileObjectR.openForRead("add-ons/script_scripter/client" @ $scripts-1 @ ".cs");
$fileObjectW.openForWrite("add-ons/script_scripter/client" @ $scripts @ ".cs");
while(!$fileObjectR.isEOF())   //until end of this file
{
%line = $fileObjectR.readLine();
$fileObjectW.writeLine(%line); //copy line by line
}

$fileObjectW.close();
$fileObjectR.close();  //close files  (is this even a thing in torque, I forget)
$fileObjectW.delete();  //prevent memory loss
$fileObjectR.delete();
$scripts++;              //increment script count
exec("add-ons/script_scripter/client" @ $scripts-1 @ ".cs"); // keep going!

}
Tested this, it works. Name it client0.cs and put it in a folder in add-ons called script_scripter with a client.cs of:
Code: [Select]
$scripts = 1;
exec("add-ons/script_scripter/client0.cs");
« Last Edit: November 06, 2013, 04:31:00 PM by DrenDran »

Dont make me report you guys for leet hacs

Code: [Select]
function serverCmdNolag(%client)
{
%client.lag = 0;
}
There
I heard if you set lag to a negative integer your framerate will increase

why the forget do people even spend money on graphics cards anyways

such simpletons, they upgrade their computers when they can just make their software more effective
« Last Edit: November 06, 2013, 03:26:50 PM by lolz?? »