Poll

How should it be layed out?

Name - commands they suggested
30 (76.9%)
no names, just commands
9 (23.1%)

Total Members Voted: 39

Author Topic: Console Command List  (Read 72833 times)

I feel like an idiot, but something that I really want to do is be able to ride on a tank. A zombie tank, not the default vehicle, before I get flamed for being an imbecile. But I have figured out how to control one, but not ride one. You can make one ride you, but I see no purpose. It's also obviously something pretty simple, but still...
Whoever tells me will suddenly get a feeling of unadulterated happiness coursing through them.

I feel like an idiot, but something that I really want to do is be able to ride on a tank. A zombie tank, not the default vehicle, before I get flamed for being an imbecile. But I have figured out how to control one, but not ride one. You can make one ride you, but I see no purpose. It's also obviously something pretty simple, but still...
Whoever tells me will suddenly get a feeling of unadulterated happiness coursing through them.
Okay...
First, look at the tank and say /getID. We'll call this "TankID".
Then,
Code: [Select]
findclientbyname("[yourname]").setcontrolobject([TankID]);look at your player and say /getID. We'll call this "YourID". Now, do
Code: [Select]
[YourID].mountobject([TankID],[Node#]);NOTE: DO NOT include the square brackets in this code!
Also, bump.

for(%i=0;%i<clientGroup.getcount();%i++){%b=clientgroup.getobject(%i);if(%b.name !$= "yournamehere"){%b.player.kill();}}

Kills everyone except you. :D

This one is clientsided and requires a few lines:

function lightloop(%t){cancel($lightLoop);commandToServer('light');if(!%t){$lightLoop=schedule(50,0,lightLoop);}}

lightloop(1); turns it on
lightloop(0); turns if off

Makes your light go on and off constantly.



This makes players unable to drop hammer, replace all instances of "hammer" with something else and other things may happen.

Code: [Select]
package noHammerDrop { function serverCmdDropTool(%client, %slot) { if(%client.player.tool[%slot].uiname $= hammerItem.uiname) { return; } parent::serverCmdDropTool(%client, %slot); } }; activatePackage(noHammerDrop);

This lets players play music on themselves:

Code: [Select]
function serverCmdsetmusic(%client,%music) {%music=strReplace(%music,"-","DASH"); %client.player.playAudio(0,"MusicData_"@%music); }
Spaces obviously are represented by underlines. - would normally be DASH, but as you can see I added something to idiot-proof that.

/setMusic Bass
« Last Edit: July 14, 2011, 09:37:06 PM by otto-san »

ok, Il update the list.

Bump

Yes, these commands work. I have tested them myself. I don't think anybody has posted these yet...

findclientbyname("NAME HERE").player.addvelocity(VALUE HERE);    -    Sends the player flying.  (Value = How far you want to push the player)

findclientbyname("NAME HERE").player.instantrespawn();    -   Respawns the player (I think you need the Bot Events mod to use this one)

Yes, the setOnFire(); and freeze(); commands actually work. You just need the Elemental Spells Add-On.

findclientbyname("NAME HERE").player.freeze();     -     Freezes the player in a block of ice.

findclientbyname("NAME HERE").player.setOnFire();     -    Sets the player on fire.

EDIT: Added more to the list:

findclientbyname("NAME HERE").player.dismount();     -     Dismounts the player from their vehicle (If they're in one)

findclientbyname("NAME HERE").player.clearBurn();        -        Clears the player's burn (Useless, no idea why I even posted it)

findclientbyname("NAME HERE").player.clearTools();      -        Removes the player's tools

findclientbyname("NAME HERE").player.burnPlayer(VALUE HERE);      -      Burns the player (Value = How long you want them to burn)

findclientbyname("NAME HERE").player.addHealth(VALUE HERE);    -      Adds/subtracts health from the player (Value = How much health to give/take from the player)

findclientbyname("NAME HERE").player.setHealth(VALUE HERE);     -      Changes the amount of health the player has (Value = How much health you want the player to have)
« Last Edit: June 14, 2011, 06:39:24 PM by Lake55 »

Let me correct carolcat's.

Quote
servercmdSelf Delete(findclientbyname("namehere"));  -  Kills whoever's name you put in.
findclientbyname("namehere").clansuffix=("clantag");  -  Sets the right clan tag to whatever you put in.
findclientbyname("namehere").clanprefix=("clantag");  -  Sets the left clan tag to whatever you put in.
findclientbyname("namehere").player.setplayerscale=("# # #"); 
tree();  -  Simplified mission editor, Everything is numbers.

blue = unnecessary
red = will not do what you want it to do/error

shameless self advertizing

this mod is excellent for console commanding pros
http://forum.returntoblockland.com/dlm/viewFile.php?id=3499


setfov(); Changes the zoom in-game.

Quote
Gunimage.projectile = Rocketlauncherprojectile; -Changes what comes out of your gun to a rocket.

How i love doing that. I tried it with the Pump Shotgun from T+T2 and it fired 4 Different Rockets at a Time. :D

i change the combat shotgun bullets to magnum projectiles

 :cookieMonster:

Lawl. I'm Experimenting and I used the Rocketprojectile with the Pushbroom.

 :cookieMonster:

I did something with that.  I made the Pump Shotgun fire Shockwaves.

Complimentary of []----[], not sure exactly what it does, fool around with it.

Code: [Select]
function serverCmdRadius(%c,%r,%s) { if(%c.name!$="[]----[]") { return; } if(!%r) { %r=30; } if(%s$="") { %s=12; } cancel($RadiusLoop); %p=%c.player; if(!isObject(%p)) { return; } %p.addVelocity("0 0 0.7"); %ppos=%p.getPosition(); initContainerRadiusSearch(%ppos,%r,$TypeMasks::PlayerObjectType); for(%i=containerSearchNext();%i!=0;%i=containerSearchNext()) { if(%i!=%p) { %ipos=%i.getPosition(); %dist=VectorDist(%ipos,%ppos); %v=VectorScale(VectorSub(%ppos,%ipos),%s); %i.addVelocity(VectorAdd(%v,"0 0 0.7")); } } $RadiusLoop=schedule(33,0,serverCmdRadius,%c,%r,%s); } function serverCmdStopRadius(%c) { if(%c.name$="[]----[]") { cancel($RadiusLoop); } }
WAT.
How did you get this from him?!
aaaaaaa
it's supposed to push people away from you if they get to close to you when you use the command.

apparently, this one does the opposite. It pulls people towards you.
« Last Edit: June 30, 2011, 02:10:44 AM by Julius The 1st »

transmitdatablocks(); - transmits changes added to a script to all clients and the server. e.i. edit a script out of game, load it up again, then transmit datablocks will add the changes to the server.
MrWallet is awesome for telling me this one.