Author Topic: ►►►[Tutorial] Making a weapon for Return to Blockland  (Read 20341 times)

Hmm, you took the spraycan item and replaced all the spraycan with your item's name, but left the .dts parts alone, then saved your edited paintcan with a different name, is that right? If so, overwrite these codes in the onCollision part, which is near the bottom

Code: [Select]
%isTrusted = checkSafe(%col,%obj.client);

if(%obj.client.isImprisoned)
{
messageClient(%client,'',"\c4No painting you imprisoned, no good, piece of poo!");
return;
}

if(%col.owner == %obj.client || (%col.owner.secure == 0 && %col.OwnerAway == 0)|| %isTrusted || %obj.client.isAdmin || %obj.client.isSuperAdmin)
{
if(%col.getClassName() $= "WheeledVehicle"|| %col.getClassName() $= "StaticShape" || %col.getClassName() $= "Player")
{
if(%col.getSkinName() !$= $legoColor[%obj.client.colorIndex])
{
%obj.client.Undo[0] = 1;
%obj.client.Undo[1] = %col;
%obj.client.Undo[2] = %col.getSkinName();
%col.setSkinName($legoColor[%obj.client.colorIndex]);
%col.SkinName = %col.getSkinName();
if(%col.Datablock $= "staticbrick2x2FX")
{
if(%col.FXMode $= 1)
{
%position = %col.flameEmitter.getTransform();
%col.flameEmitter.delete();
%testcolor = %obj.client.colorIndex;
if(%testcolor $= "11")
{
    %col.flameEmitter = new ParticleEmitterNode(brickFireNode) {
          position = %position;
          rotation = "1 0 0 0";
          scale = "1 1 1";
          dataBlock = "FireParticleEmitterNode";
              emitter = "FireParticleEmitter2";
          velocity = "1.0";
      };
}
else if(%testcolor $= "8")
{
    %col.flameEmitter = new ParticleEmitterNode(brickFireNode) {
          position = %position;
          rotation = "1 0 0 0";
          scale = "1 1 1";
          dataBlock = "FireParticleEmitterNode";
              emitter = "FireParticleEmitter3";
          velocity = "1.0";
      };
}
else if(%testcolor $= "14")
{
    %col.flameEmitter = new ParticleEmitterNode(brickFireNode) {
          position = %position;
          rotation = "1 0 0 0";
          scale = "1 1 1";
          dataBlock = "FireParticleEmitterNode";
              emitter = "FireParticleEmitter4";
          velocity = "1.0";
      };
}
else if(%testcolor $= "1")
{
    %col.flameEmitter = new ParticleEmitterNode(brickFireNode) {
          position = %position;
          rotation = "1 0 0 0";
          scale = "1 1 1";
          dataBlock = "FireParticleEmitterNode";
              emitter = "FireParticleEmitter5";
          velocity = "1.0";
      };
}
else
{
    %col.flameEmitter = new ParticleEmitterNode(brickFireNode) {
          position = %position;
          rotation = "1 0 0 0";
          scale = "1 1 1";
          dataBlock = "FireParticleEmitterNode";
              emitter = "FireParticleEmitter";
          velocity = "1.0";
      };
}
}

}
}
}
}
}

function checkSafe(%col,%client)
{
%isTrusted = 0;

for(%trusted = 0; %trusted < clientGroup.GetCount(); %trusted++)
{
//echo(clientGroup.GetCount());
%cl = clientGroup.getObject(%trusted);
//echo(%cl);
for(%safe = 0; %safe < %col.Owner.SafeListNum + 1; %safe++)
{
//echo(%col.Owner.SafeList[%safe]);
if(%col.Owner.SafeList[%safe] == %cl && %cl == %client)
{
%isTrusted = 1;
}
}

}
return %isTrusted;
}
function getFriends(%client, %person)
{
%isFriend = 0;

for(%friend = 0; %friend < %client.FriendListNum + 1; %friend++)
{
if(%client.FriendList[%friend] $= %person)
{
%isFriend = 1;
}
}
return %isFriend;
}
function getSafe(%client, %person)
{
%isSafe = 0;

for(%safe = 0; %safe < %client.SafeListNum + 1; %safe++)
{
if(%client.SafeList[%safe] $= %person)
{
%isSafe = 1;
}
}
return %isSafe;
With
Code: [Select]
%obj.setSkinName("<color>");Replace <color> with one of the following

red
blue
green
white
gray
black
orange
brown
tan
redLight
blueLight
greenLight
orange
brown
tan
tanLight
rainbow

There's more, i just forget 'em all

Hey I don't get you tutorial and how do i download those blockland versions i only have 1 how i get 2 3 and 4?
 :cookie: :cookieMonster: :panda: :iceCream: :nes:

I got stuck on step 9  :cookieMonster:

Hey I don't get you tutorial and how do i download those blockland versions i only have 1 how i get 2 3 and 4?
 :cookie: :cookieMonster: :panda: :iceCream: :nes:
What the  :nes: did you just say!? What do you mean blockland versions?

Badspot

  • Administrator
Someone update this tutorial for Retail Blockland please.

I may do it when i get a chance

Someone update this tutorial for Retail Blockland please.

on it, want me to post it in this thread or make new?

Make new and Badspot lock or delete this