Author Topic: Marble Man's Datablock Saver  (Read 2109 times)

I am not sure if this is considered an illegal add-on. I used to have it and never had any problems with it since Marble Man made it before he went crazy and put bad stuff into codes. Anyway, somehow it got deleted and I want it back. If someone wants to PM it to me that would be great. Thanks

I think this was accomplished by using a fileobject and reading datablock.fileName to read BLB files, but I'm not sure.

Why do you need this ??

EDIT: BLB, not BLS... forget me
« Last Edit: June 19, 2014, 03:42:45 PM by Subpixel »

I think this was accomplished by using a fileobject and reading datablock.fileName to read BLS files, but I'm not sure.

Why do you need this ??
I see. I just need to use it to find some of the script for an add-on. Also so I can see a list of add-ons on other servers (it was client-sided for those who don't know)

Does anyone have this? It would be a big help

I think this was accomplished by using a fileobject and reading datablock.fileName to read BLS files, but I'm not sure.

Why do you need this ??
I don't believe the .blb is accessible even with a file object, I've tried this before and I couldn't find it.
Also .dts, .wav, .ogg, etc can't be copied because of blank spaces or what ever those are called, and fileCopy don't work with those files.

I see. I just need to use it to find some of the script for an add-on. Also so I can see a list of add-ons on other servers (it was client-sided for those who don't know)
If you could tell me what part of the script you need, I could probably recreate it.
Also, to list all the add-ons you could just loop through the serverConnection and get all the filePaths.
Or you could just use the findFirstFile and findNextFile functions to see all the folders created.
I think they are picked up with these functions.

EDIT: BLB, not BLS... forget me
« Last Edit: June 19, 2014, 03:47:56 PM by Pah1023 »

I don't believe the .bls is accessible even with a file object, I've tried this before and I couldn't find it.
Yes it is. This is how my client sided obj exporter rips custom brick models from the game to properly export saves from other servers.

I see. I just need to use it to find some of the script for an add-on. Also so I can see a list of add-ons on other servers (it was client-sided for those who don't know)
Accessing scripts on the server from the client side on the other hand is not possible.
« Last Edit: June 19, 2014, 03:35:38 PM by Zeblote »

Yes it is. This is how my client sided obj exporter rips custom brick models from the game to properly export saves from other servers.
Really? I've tried a couple of times before and never had any luck.

Accessing scripts on the server from the client side on the other hand is not possible.
He is wanting a piece of the actual client sided script I believe, not a script from the server.

Really? I've tried a couple of times before and never had any luck.
I don't know what you did wrong, but for me it works. You can look at how my script does it if you still care about that. https://dl.dropboxusercontent.com/u/143512782/bl/Script_BuildToObj.zip

He is wanting a piece of the actual client sided script I believe, not a script from the server.
He wants a client sided script that steals server scripts.

I don't believe the .blb is accessible even with a file object, I've tried this before and I couldn't find it.
Yes it is.

==>%fo = new FileObject(); %fo.openForRead("Add-Ons/Brick_CRUX/64x18x3.blb"); while(!%fo.isEOF()) { %line = %fo.readLine(); echo(%line); }
64 18 3
BRICK


Yes it is.

==>%fo = new FileObject(); %fo.openForRead("Add-Ons/Brick_CRUX/64x18x3.blb"); while(!%fo.isEOF()) { %line = %fo.readLine(); echo(%line); }
64 18 3
BRICK


We're talking about reading blb files of 'private' bricks in other servers that you don't have locally.

Yes it is.

==>%fo = new FileObject(); %fo.openForRead("Add-Ons/Brick_CRUX/64x18x3.blb"); while(!%fo.isEOF()) { %line = %fo.readLine(); echo(%line); }
64 18 3
BRICK


I might want to make myself more clear, I meant a .blb that is on the server side, downloaded by the client.
Like when you load models and stuff.

He wants a client sided script that steals server scripts.
It sounds like it could be any of the two, lets wait till he gets back on and see.

We're talking about reading blb files of 'private' bricks in other servers that you don't have locally.

Would this work?

Code: [Select]
function saveServerBrick(%uiName, %outputFile)
{
for(%a = 0; %a < getDatablockGroupSize(); %a++)
{
%db = getDatablock(%a);
if(%db.uiName !$= %uiName)
{
continue;
}

%inputFile = %db.fileName;
if(%inputFile $= "")
{
return false;
}

%input = new FileObject();
%input.openForRead(%inputFile);

%output = new FileObject();
%output.openForWrite(%outputFile);

while(!%input.isEOF())
{
%output.writeLine(%input.readLine());
}

%output.close();
%output.delete();

%input.close();
%input.delete();

if(getFileContents(%outputFile) !$= "")
{
return true;
}

return false;
}
}
« Last Edit: June 19, 2014, 07:46:03 PM by Subpixel »

Would this work?

If you're running it on the client? No.

If you're running it on the client? No.
Yes it does, if you replace the datablockgroup with getdatablockgroupsize() and getdatablock(id).
« Last Edit: June 19, 2014, 07:17:46 PM by Zeblote »

Oh good, nice to see this thread getting some attention.

It would have to be client-sided for what I need it for. Marble Man's copied the script of add-ons into a .txt folder if that clears anything up. I don't know if you want to call it stealing scripts, but that is basically what it is I guess. It might be a good idea to just PM it to me if someone has Marble Man's or wants to make a new one. Much appreciated guys

Also, to list all the add-ons you could just loop through the serverConnection and get all the filePaths.
Or you could just use the findFirstFile and findNextFile functions to see all the folders created.
I think they are picked up with these functions.
Could you explain this further please?