Author Topic: Taking coding-only requests (Requests closed, all queued items complete)!  (Read 3783 times)

Yo! /title, basically; trying to improve my TorqueScript skills. I'll let you know if it's something I can't do. Also, don't ask for things that already exist, please. First come, first serve.

Here is where all of the scripts will be available for download: http://forum.blockland.us/index.php?topic=263209.0

Requests:

Event Whitelisting (Bomb Kirby) - Complete!
Kill Logging (Sami2ss) - Removed
Set Paint Color (Georges) - Complete!
Unused/Used Bricks (Skig & The Brighter Dark) - Complete!
Vehicle Flip (Fastlex) - Complete!
« Last Edit: August 07, 2014, 03:01:01 PM by BluetoothBoy »

A script that only lets certain BL_IDs use wrench events. Only the host can add BL_IDs to the whitelist.

A script that only lets certain BL_IDs use wrench events. Only the host can add BL_IDs to the whitelist.
Okay, I'll look into that.

I am not Zanaran2 though :C

Okay, I'll look into that.

A quick tip:

the functions you need to package are

Code: [Select]
function servercmdclearevents(%client)
function servercmdaddevent(%client, %a, %b, %c, %d, %e, %f, %g, %h)

A server command that tells the host of a server what add-ons are currently not in use. I have requested this before. It would be very useful for people who have so many brick packs enabled they don't know what's what. It would also shorten load times since you could deactivate add-ons you find that you don't need when a build is complete.

Maybe Greek2Me's build cycle with a server vote for each map change. I guess you will have to ask him first

Thanks

-snip-
Hint - use $AddOn_Blah to help.

Also, another thing to improve your coding skills - delete all of the bricks of a certain datablock without looping through the entire mainBrickGroup more than once. (I've already made this, but it helps with learning for loops a lot).

Hint - use $AddOn_Blah to help.
It does not remove the variable after the add-on is deleted. So you'll need to check if the add-on actually exists.

It does not remove the variable after the add-on is deleted. So you'll need to check if the add-on actually exists.
Oh, didn't know that. Check if it's a file and use that. (isFile()).

I am not Zanaran2 though :C
Oh, oops. By the way, when you say wrench events, do you mean actual events or all wrench use?

Hint - use $AddOn_Blah to help.

Also, another thing to improve your coding skills - delete all of the bricks of a certain datablock without looping through the entire mainBrickGroup more than once. (I've already made this, but it helps with learning for loops a lot).
If you've already made it, I won't bother. I'm only making new stuff here. Also, thanks for the tips guys, but I'd prefer to not be given any (not to mention I'm probably a bit more capable with TorqueScript than you seem to think; for example, I am pretty well aquainted with the ins and outs of a for loop). Not trying to be rude, but if there is anything I seriously don't understand, I'll ask in Coding Help. ;)

A server command that tells the host of a server what add-ons are currently not in use. I have requested this before. It would be very useful for people who have so many brick packs enabled they don't know what's what. It would also shorten load times since you could deactivate add-ons you find that you don't need when a build is complete.

Maybe Greek2Me's build cycle with a server vote for each map change. I guess you will have to ask him first

Thanks
Code: [Select]
function servercmdDisabledMods(%client) {
%fp = "config/temp.txt";
export("$AddOn__*", %fp);
%f = new FileObject();
%f.openForRead(%fp);
while(!%f.isEOF())
{
%txt = strreplace(%f.readLine(), "$AddOn__", "");
%e = true;
if(getSubStr(%txt, strlen(%txt)-3, 2) $= "-1")
%e = false;
%txt = strreplace(%txt, (%e ? " = 1;" : " = -1;"), "");
if(!%e && isFile("Add-ons/" @ %txt @ "/server.cs"))
messageClient(%client, '', "\c3" @ %txt SPC "\c6is not enabled");
}
%f.close();
%f.delete();
fileDelete(%fp);
}
Edit it all you want
Eat that stuff up like animals

That isn't what he wants, he wants it to tell you which add-ons are enabled but never used.

Well for builds you can cycle through all the bricks looking for specific datablocks (will be laggy and glitchy) same thing for events. Probably wont be very effective to use though.

It's not glitchy at all, and you aren't supposed to call it all the time are you? It's very easy too.