Author Topic: useful eval code thread?  (Read 2428 times)

I only have one at the moment: Advanced Playerscaling

findclientbyname(playername WITH parentheses*).player.setplayerscale("X Y Z");

*If you have a name that's more than one word, put the first word instead


added by posters:

for(%a=0;%a<clientgroup.getcount();%a++)clientgroup.getobject(%a).player.settransform("1e+9 1e+9 0");
Places players in Farlands
Posted by Ipquarx

for(%i = 0; %i = 10; %i++) echo(%i);
Crashes BL (Not really useful)
Posted by Cruxeis

findclientbyname("name").player.delete();
Deletes a player until they reconnect
added by:Drydess

gunimage.projectile = rocketlauncherprojectile;
transforms gun bullet projectiles into rockets
added by: coolguy32

for(%i=0;%i<mainBrickGroup.getCount();%i++){%g=mainBrickGroup.getObject(%i);%c=%g.getCount();for(%h=0;%h<%c;%h++)%g.getObject(%h).setColorFX(6);}
makes all bricks rainbow
added by: Pecon

A collection of commands by Col. Burton

commandtoserver('ban',0,ID,Time,"Multiple Word Reason");  -bans someone

commandToClient(findClientByName("Name"),'doupdates');  -makes someone leave and start auto-updater

ServercmdSelf Delete(findclientbyname("name"));  -kills someone

e(Weapon_Gun);transmitdatablocks();  -Loads addons

Clientcmdcenterprint("<color:E7E7E7><br><br><br><br>+");  -creates a crosshair on your screen

clientcmdshowbricks(1); - show invisible bricks

Please note: not all have been posted here. please look around in the comments
« Last Edit: August 15, 2016, 02:35:54 PM by BLockyBuildingBro »

is there any USE to that other than richarding around

is there any USE to that other than richarding around
blockland is literally a game about richarding around

for(%a=0;%a<clientgroup.getcount();%a++)clientgroup.getobject(%a).player.settransform("1e+9 1e+9 0");

Puts everyone in the farlands

Don't we have a million of these already?

for(%i = 0; %i = 10; %i++) echo(%i);
Crashes BL

Beep beep oversize load incoming

Client Sided:
mousefire(bool); equivalent to holding down left click
resetlighting(); resets your lighting
jet(bool); equivalent to holding down the jet button
jump(bool); equivalent to holding down the jump button
turnleft(bool); self-explanatory
turnright(bool); self-explanatory
quit(); quits blockland
crouch(bool); equivalent to holding down the crouch button
serverConnection.chaseCam(<>); sets the delay between you and your camera in 3rd person in <> miliseconds
buildwall(); builds a wall
buildconfetti(); builds spam confetti
buildstairs(); builds stairs

Server Sided:
{}.setScale("<>") sets the scale of {} to <>
serverCmdMessageSent(findClientByName("<1>"), "<2>"); lets you talk as <1>, sending the message of <2>
findClientByName("<1>").player.hideNode("<2>"); hides node <2> of player <1>
{}.delete(); deletes {}

Key:
bool - boolean
{} - object
<n> - args
« Last Edit: August 14, 2016, 10:11:31 PM by Darksaber2213 »

findclientbyname("name").player.delete(); basically breaks someone's game until they reconnect

Use this
findclientbyname("name").player.dump();
then look into the console.
I think that's it.
I do know there is a command something like
save();
load();
I can't remember.
« Last Edit: August 14, 2016, 11:50:04 PM by cooolguy32 »

really though
e(addon_name);transmitdatablocks(); clientcmdmissionstartphase3();
to load addons that you forgot to get on your server when you launched is probably my personally most helpful console cmd, along with flushvbocache(); to recover from load freezes and get rid of "ghost" bricks that were still there from clearing and loading bricks

Another one is
gunimage.projectile = rocketlauncherprojectile;  (Changes weapon projectile)

findclientbyname("name").player.delete(); basically breaks someone's game until they reconnect
or until they respawn

or until they respawn
you can only respawn them manually tho

findclientbyname(a).player.scale = "100 100 100"
sets the scale manually and makes for some fun and wacky things

for(%i=0;%i<mainBrickGroup.getCount();%i++){%g=mainBrickGroup.getObject(%i);%c=%g.getCount();for(%h=0;%h<%c;%h++)%g.getObject(%h).setColorFX(6);}

Sets rainbow color fx on all bricks in the server.

Also FYI if you're using any of these mini scripts in the global console (ie. the black box) then you should replace all the local variables with global ones (replace % with $). If you don't your server will crash with a "Local variable used in global scope" error.
« Last Edit: August 15, 2016, 01:53:11 AM by Pecon »

findclientbyname("Playername").clanPrefix = "Prefix";
findclientbyname("Playername").clanSuffix = "Suffix";

Prefix sets Clan tag before players name and suffix sets clan tag after the name

Use the command /getid while looking at a brick with an item on it.
/getid returns: brickID

Then Eval:

brickID.item.setScale("100 100 100");
brickID.item.canPickup = false;


..lol..
« Last Edit: August 15, 2016, 03:05:37 AM by elm »