Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - BobAndRob

Pages: 1 2 [3] 4 5
31
Modification Help / Example: Spawning Vehicles
« on: August 26, 2009, 06:28:25 PM »
I wrote this small script not too long ago while having fun in my server, due to people praising it and asking "how did you do it" among other things, I have decided to post it here as a resource.

There is really no need for me to do this, however I always appreciate it when others share their work so I can read it and learn from it, now, I am returning the favor.

Code: [Select]
// This script is Copyright bobandrob.org, 2009
// This script is Licenced under the BSD Licence found at http://opensource.org/licenses/bsd-license.php

// Normally I would add code to enforce that the jeep and time bomb vehicle datablocks exist,
// however since this is just an example, I will not. Feel free to use your own vehicles instead.

function serverCmdRainBombs(%client, %amount) {
if(!%client.isSuperAdmin)
return;
if(%amount <= 0) {
messageClient(%client, '', "\c2Please specify a valid amount of time bombs.");
return;
}
for(%i = 0; %i < %amount; %i++)
newTimeBomb();
}

function newTimeBomb() {
%obj = new WheeledVehicle(rainBomb) {
dataBlock = "TimeBombCol";
};
rainBomb.setTransform(getRandom(-90, 85) SPC getRandom(-70, 100) SPC "100" SPC getRandom(0, 10) / 10 SPC getRandom(0, 10) / 10 SPC getRandom(0, 10) / 10 SPC getRandom(0, 10) / 10);
// The vales used above in getRandom() are just as they are due to the size of the "Afghanistan DM" build which is included in any default installation of Blockland.
rainBomb.setVelocity("0 0 -10");
rainBomb.istimebomb = 1;
rainBomb.Defusehealth = 1;
rainBomb.setShapeNameColor("1 0 0");
TimeBombTimer(%obj, 0, 0, ( $Pref::TimeBomb::TimeBombTime + 5 ) * 2);
return %obj;
}

function serverCmdScheduleRain(%client) {
if(!%client.isSuperAdmin)
return;
announce("[\c1Weather Man\c3]\c6: Oh no! Take cover cause it looks like it'll start raining \c2time bombs\c6!");
rainBomb();
}

function serverCmdCancelRain(%client) {
if(!%client.isSuperAdmin)
return;
announce("[\c1Weather Man\c3]\c6: It looks like the sky has cleared up.");
if(isEventPending($rainSch))
cancel($rainSch);
}

function rainBomb() {
if(isEventPending($rainSch))
cancel($rainSch);
newTimeBomb();
$rainSch = schedule(getRandom(2000, 5000), 0, rainBomb);
}

function serverCmdClearBombs(%client) {
if(!%client.isSuperAdmin)
return;
while(isObject(rainBomb))
rainBomb.delete();
}

function newjeep() {
%obj = new WheeledVehicle(rainjeep) {
dataBlock = "JeepVehicle";
};
rainjeep.setTransform(getRandom(-90, 85) SPC getRandom(-70, 100) SPC "100" SPC getRandom(0, 10) / 10 SPC getRandom(0, 10) / 10 SPC getRandom(0, 10) / 10 SPC getRandom(0, 10) / 10);
// The vales used above in getRandom() are just as they are due to the size of the "Afghanistan DM" build which is included in any default installation of Blockland. (Same as with the time bombs.)
rainjeep.setVelocity("0 0 -10");
rainjeep.isjeep = 1;
rainjeep.Defusehealth = 1;
rainjeep.setShapeNameColor("1 0 0");
jeepTimer(%obj, 0, 0, ( $Pref::jeep::jeepTime + 5 ) * 2);
return %obj;
}

function serverCmdRainjeeps(%client, %amount) {
if(!%client.isSuperAdmin)
return;
if(%amount <= 0) {
messageClient(%client, '', "\c2Please specify a valid amount of time jeeps.");
return;
}
for(%i = 0; %i < %amount; %i++)
newjeep();
}

function serverCmdClearJeeps(%client) {
if(!%client.isSuperAdmin)
return;
while(isObject(rainjeep))
rainjeep.delete();
}

This script was made quite quickly, originally it was made entirely in the console.

32
I was just reading through a few threads and I couldn't help but notice that SO MANY PEOPLE had an avatar that had a cookie monster in it!

I appear to have missed something.
Would anybody care to explain this new craze to me for I am extremely curious?

33
Gallery / Hammers of Doom
« on: August 02, 2009, 09:04:06 PM »
Today, as I was routinely hacking about in my server, I thought I might add new weapons to my DM.
But first I wanted to remove all the rocket launchers, and make sure I didn't miss any.

That was simple enough:
Code: [Select]
function rmItem(%brickOfGroup) {
   BrickGroup_8470.getObject(%brickOfGroup).setItem();
}

for(%i=0; %i<=BrickGroup_8470; %i++) { rmItem(%i); }

Note: I do all of this at my DM server at night while it is nearly empty because people get mad and leave, not to return the next day. However if you would still like to see stuff like this, the name of my server is "Bob & Rob - Host's Good Ol' DM" and its up 24/7 (for now at least).

But then I felt like having some more fun, I wanted to set an item on EVERY BRICK!
Code: [Select]
function addHammer(%brickOfGroup) {
   BrickGroup_8470.getObject(%brickOfGroup).setItem("hammerItem");
}

for(%i=0; %i<=BrickGroup_8470; %i++) { addHammer(%i); }
The following (as well as a bunch of lag) is the result:

34
General Discussion / Brick Dis-Ownership?
« on: July 05, 2009, 02:12:25 PM »
I host a DM for which I wrote scripts to handle evreything I would do myself so that it can be dedicated, except for one thing.

When people are in the DM while I am not there, all items are owned by me, and even with include all player's bricks, They still cannot pick them up. Also, when I am not there, people cannot blow up bricks.

These problems occur in every DM, not just mine, so it is not a bug with add-ons I have.

I turned on "Include all player's bricks" as well as the brick ownership timeout thing.

Neither have helped.

If anybody has any suggestions for me about this, please, lemme hear 'em.

Here is (roughly) my Minigame setup:
Code: [Select]
brickDamage= 1;
brickRespawnTime= 10000;
class=miniGameSO;
colorIdx= 0;
EnableBuilding= 0;
EnablePainting= 0;
enableWand= 0;
fallingDamage= 1;
inviteOnly= 0;
numMembers=1;
playerDataBlock= PlayerBobAndRobDM;
PlayersUseOwnBricks= 0;
Points_BreakBrick= 0;
Points_Die= -1;
Points_KillPlayer= 2;
Points_KillSelf= -1;
Points_PlantBrick= 0;
respawnTime= 0;
SelfDamage=1;
StartEquip0= 0;
StartEquip1= 0;
StartEquip2= 0;
StartEquip3= 0;
StartEquip4= 0;
StartEquipSpecial[0]= nametoid(mac10Item);
StartEquipSpecial[1]= nametoid(shotgunItem);
StartEquipSpecial[2]= nametoid(deagleItem);
StartEquipSpecial[3]= nametoid(altRifleItem);
StartEquipSpecial[4]= nametoid(FlakItem);
StartEquipSpecial[5]= nametoid(TimeBombItem);
StartEquipSpecial[6]= nametoid(TimeBombDefuserItem);
StartEquipSpecial[7]= nametoid(hegrenadeItem);
title = "Foo";
useAllPlayersBricks= 1;
useSpawnBricks= 1;
VehicleDamage= 1;
vehicleReSpawnTime= 5000;
weaponDamage= 1;

Note:
   StartEquipSpecial[ x ] is there because I have a special script to handle giving people items when they have more than 5 slots.

Thanks in advance.

35
General Discussion / Bad tree collision.
« on: June 11, 2009, 10:16:11 PM »
As illustrated by the following screenshots, the player collides with trees at un-natural places. There is a box at the trunk that is taller than the trunk, I find it quite odd.

The first image is showing the bad collision. The second image is showing the bounding box of the tree and the position of the player in the mission editor.

36
Maps / Bedroom Labeled
« on: June 11, 2009, 09:15:43 PM »
Bedroom Labeled
Oh No! Somebody took a sharpy to your bedroom!

Inspired by comments on my new grass texture.

Description
This map features labels of everything in the bedroom, spawning on the bed, and another surprise for you to discover.

The creation of this map was unintentional to begin with. One day, I was building on the bed, and I kept dieing and re-spawning on the floor. After jetting up to the bed again some 100 times it became annoying. So I decided it was time to learn how to use the mission editor so that I could move the spawnsphere from the floor to the bed.

The second part of this map, the labeling, started when I made a new grass texture as seen on the forums at:
http://forum.blockland.us/index.php?topic=71445

Due to the amount of positive feedback, and people's requests to label the rest of the bedroom, I created this map.

As for the surprise, I was playing around in the mission editor and realized I could put random stuff in the map. Hint: check the dresser.

-Credits-
Badspot (The original bedroom)
bob&rob (This map)
Amade   (A place to ask for help with anything)
People who posted in the "New Grass Texture" thread on the BL forums who gave me the idea to make this map.

Screenshots

Download
Map_Bedroom_Labeled.zip (Last Updated: Thu Jun 11, 2009 6:13 pm)

Installation
Put Map_Bedroom_Labeled.zip into the Add-Ons folder in your Blockland folder.

Click Here to view this file on the RTB Download Manager

37
General Discussion / Shrunk Bedroom Interior
« on: June 11, 2009, 01:49:59 PM »
I was playing around in the mission editor, and wondered what would happen if I shrunk the bedroom to blockhead size, and this is what I got.

This is probably nothing new to a few of you, but I found it unexpected, you might too.

38
Modification Help / Setting Brick Inventories?
« on: June 10, 2009, 10:48:09 PM »
I know I can set my ghost brick to a brick in my inventory, that is simple.

However how do I set bricks in my inventory. (Don't say, "press b and then click on a brick," this is through a script, not my mouse.)

Also, how can I get the size of the brick data blocks before I set them in my inventory.

All of the above is assuming I am a client and do not have console access to the server, nor will I always have admin on any given server. (I don't think admin or not would make a difference though.)

I know this is possible because the client gets this data from the server in order to display it in the gui.

Any help would be greatly appreciated.

39
General Discussion / New Grass Texture
« on: June 10, 2009, 06:23:25 PM »
I was bored, so I made a new grass texture. I'm not quite sure what made me decide to make it spell "GRASS" maybe because I couldn't think of something better to make it. I'm not quite sure why I changed the grass as opposed to something else, whatever.

It gives more visibility, so it's better in DMs, and it labels itself. (It is literally grass.)

40
Off Topic / Pi posts per day!
« on: June 10, 2009, 05:34:34 PM »
I just looked at my profile, and I saw this:

41
General Discussion / Interior Shadows On Map Repeat
« on: June 10, 2009, 01:10:31 PM »
Today, I decided to see if the terrain around the bedroom repeated or not. It does, but weirdly.

There are shadows for interiors that do not exist, I assume this is because, when you light the mission, it lights the terrain, and when you repeat the terrain, it also repeats the shadows because they have become "branded" onto the terrain.

Also, on my way to find out if the terrain repeated or not, I realized that, when crouching, jets do not come from your feet, but some place... else.

Both things described above are illustrated in the following screen shots.

42
Gallery / BLPAG (Block-Land-Pixel-Art-Generator) [New Images]
« on: June 09, 2009, 04:51:55 PM »
One day, I saw my friend Chammy making pixel art, and he was spending sooo much time doing it, and I said: "Gee, I could write a script to do that 100 times faster." So that's exactly what I did.

He made me the OpenBSD mascot, because I like OpenBSD, so I decided to make him a Windows logo, because he uses Windows, and here is the result... Its not complete because i reached the 128000 brick limit with it.

More information can be found here.

The Windows Logo


The BSD Daemon


A Smaller More Complete Windows Logo


EDIT: Here is another image.
San Francisco Skyline Blockland Pixel Art


EDIT: And another.
PuffyTron (The OpenBSD Mascot Puffy In His Current Theme Of Tron)

43
A picture is worth a thousand words, I wonder if that still applies when you have a picture of words...

44
Drama / "Banned For Truth"
« on: May 16, 2009, 05:55:58 PM »
[6:34pm] BobAndRob: why hello there, blid 12249 is now banned from my (and a few other) servers for reason: quote from your ban "bitch"
[6:34pm] MrBlue_Man_: ...
[6:34pm] MrBlue_Man_: because your a smart alic
[6:39pm] BobAndRob: I am right, and to save your (lack of) reputation you ban me for pointing out a publicly known fact.
[6:40pm] BobAndRob: your server name says something about area 51 being clasified
[6:40pm] MrBlue_Man_: ........no1 likes a smart alitc
[6:41pm] BobAndRob: all i did was chat a link to an article in the LA Times about the DEclassification of area 51.
[6:41pm] BobAndRob: that link was:
[6:41pm] BobAndRob: http://www.latimes.com/features/la-mag-april052009-backstory,0,3355162.story
[6:41pm] MrBlue_Man_: you have no imanjination just do what server does jeez
[6:43pm] BobAndRob: I have no imagination? oh really... Allright, you can have your oppinion, and you are voicing it now, I had my fact (not just oppinion) and you blame me for it. Nice.
[6:43pm] MrBlue_Man_: .......quit bothering me im trying make my base
[6:43pm] BobAndRob: I will put this on the forums now.

45
Drama / Description of the console!
« on: May 08, 2009, 11:54:35 AM »
A picture says a thousand words, I wonder if that applies when the picture is of words.


Then later:

Pages: 1 2 [3] 4 5