Author Topic: (Post Small Scripts To Play With Here)  (Read 3164 times)

Well Just post small scripts here for us "newbs on scripting" so we can figure it out Please do not post things you do not want other people to edit! Thank You

Come on. Look at ANY script. ANYTHING. The too far bypass; the hide player names script; the decollisioner; anything with a special function.

Are they easy to script?

Depending on how much you know and the complexity of the script, maybe.

Hmm Well its quite "hard" for me but whenever i edit a script it overwrites it?

Here you go: Decollisioner with comments to explain stuff.

Code: [Select]
function DeColProjectile::onCollision(%this,%obj,%col,%fade,%pos,%normal) //when the arrow hits something
{
if($Pref::server::Coladmin){ //if your preferences say you can
if(%obj.client.isadmin || %obj.client.issuperadmin){ //if you're an admin or superadmin
}else{
return;
}
}
if(%col.getclassname() $= "fxDTSBrick") //if the thing you hit is a brick
{
%trust = getTrustLevel(%obj.client, %col); //find out if you trust the brick's owner
if(%trust == 2 || %obj.client.issuperadmin){  //if you have full trust or are a super admin
if(%col.Colset == 0) //if the brick does collide
{
%col.setColliding(0); //make it not collide
messageClient(%obj.client,'',"Brick no longer collides!"); //tell them this
%col.Colset = 1; //set a variable to remember that
}else{
%col.setColliding(1);
%col.Colset = 0;
messageClient(%obj.client,'',"Brick now collides!"); //do the opposite
}
}else{
commandToClient(%obj.client, 'centerPrint', "" @ %col.client.name @ " does not trust you enough to do that."); //if you can't do this, tell them that
}
}
}

Everything after // is a comment.

That's all I'm helping you with.

Also, you have to change datablock names. If you change the bow to shoot lazers but it's still called 'bow', it'll overwrite it.

Thank You Falcon Your the best  :cookieMonster:


I shouldn't have to help you any more; I gave you advice. Go download some scripts.

Heres one :cookieMonster:
Code: [Select]
function serverCmdAltf4(%Client) //toggle by pressing altf4
{
%Player = %Client.player; //just some basic stuff needed
%Health = 10000  //makes player have 10k health
};

Yeah, Lord Iron have fun with my script.

Actually, Bling, that'd be /AltF4  :cookieMonster:

Heres one :cookieMonster:
Code: [Select]
function serverCmdAltf4(%Client) //toggle by pressing altf4
{
%Player = %Client.player; //just some basic stuff needed
%Health = 10000; //makes player have 10k health
};
forgot a semi colon

Yeah, Lord Iron have fun with my script.

Warning - while you were reading 10 new replies have been posted. You may wish to review your post.

You idiots do realise that altf4 command won't actually do anything, right?

Thats why I left out the /...