This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cherrie's profile picture

Self-Building house

Started by Cherrie, 18 April 2012 - 02:45 PM
Cherrie #1
Posted 18 April 2012 - 04:45 PM
Hai, this is my very first turtle program (didn't write an computer ones, either), so like nothing much to expect I guess.
Constructive criticism is always very welcome.
I'm thinking about modifying it a little and making it a decent self-building house, all I got for now is a 10x10x9 (or 10) with square 4-layers base and a roof that goes 8x8->6x6->4x4->2x2. However, I'm not going to actually put too much effort into this one as I prefer focus on a portable house constructor+remover. (if u dont wanna be traced xD)
Instructions: Place 2 full stacks of the same block in turtle slots 1 and 2, same one in slots 3-4, and glass in slot 5, then launch.
(tbh the original purpose was to make like a guideline compilation for first-timers, by a first-timer)


print("Building house")
print("Ingredients must be in slots 1-5")

local function wall()
for i=1, 9 do
if windows==1 and (i==5 or i==6) then
turtle.select(5)
turtle.placeDown()
turtle.select(2)
elseif windows==2 and (i==5 or i==6) then
turtle.select(5)
turtle.placeDown()
turtle.select(3)
else
turtle.placeDown()
end
turtle.forward()
end
turtle.turnLeft()
end

--Each layer is 4x10
local function layer()
for k=1, 4 do
wall()
end
turtle.up()
end

--INITIATION + BASE LAYERS
turtle.up()
turtle.turnRight()
turtle.select(1)
layer()
wall()
wall()
turtle.select(2)
wall()
wall()
windows=1
turtle.up()
layer()
windows=2

--ROOF LAYERS
turtle.select(3)
layer()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
for z=1, 4 do
for i=1, 7 do
if turtle.getItemCount(3) == 0 then
turtle.select(4)
end
turtle.placeDown()
turtle.forward()
end
turtle.turnLeft()
end
turtle.up()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
for z=1, 4 do
for i=1, 5 do
turtle.placeDown()
turtle.forward()
end
turtle.turnLeft()
end
turtle.up()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
for z=1, 4 do
for i=1, 3 do
turtle.placeDown()
turtle.forward()
end
turtle.turnLeft()
end
turtle.up()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
for z=1, 4 do
for i=1, 1 do
turtle.placeDown()
turtle.forward()
end
turtle.turnLeft()
end
turtle.forward()
turtle.turnRight()
for z=1, 5 do
turtle.forward()
turtle.down()
end
turtle.down()
turtle.down()
turtle.down()
turtle.turnRight()
for z=1, 4 do
turtle.forward()
end
print("Mission copmleted.")


P.S. Topic number is 1337 >:)/>/>
Edited on 18 April 2012 - 04:00 PM
connor #2
Posted 19 April 2012 - 11:06 PM
do you want to help me on building a email network on my server you will get free accsess to the server
MathManiac #3
Posted 17 May 2012 - 12:09 AM
You should have it at the start do this:

print("Initialization")
print("Slot 1 - *** block") -- *** is a placeholder.
print("Slot 2 - *** block")
print("Slot 3 - *** block")
--and so on...
print("")
print("Place a stack of blocks in each corresponding slot.")
print("When done, press a key.")
os.pullEvent( "key" ) -- waits for user to press key.

So that it's more user-friendly.
neto333 #4
Posted 17 May 2012 - 12:36 AM
any picture?
Maarten551 #5
Posted 13 June 2012 - 03:12 PM
Seems nice for beginners project.

But try to make a new version of this, but this time use schematics.
And then save the schematic in an external file, for example : schematicsBestHouseEver.txt

And a picture would be nice.
Divide_By_0 #6
Posted 03 July 2012 - 07:55 PM
Seems nice for beginners project.

But try to make a new version of this, but this time use schematics.
And then save the schematic in an external file, for example : schematicsBestHouseEver.txt

And a picture would be nice.
Indeed/
craton #7
Posted 09 July 2012 - 08:51 PM
do you want to help me on building a email network on my server you will get free accsess to the server

i would like to help with that
Teraminer #8
Posted 14 July 2012 - 10:30 AM
NIce job but wtf is 1337?
iansan5653 #9
Posted 26 July 2012 - 03:06 AM
NIce job but wtf is 1337?

http://en.wikipedia.org/wiki/Leet
Teraminer #10
Posted 26 July 2012 - 11:12 AM
Thanks or maybe '|' ]-[ / || |< 5
iansan5653 #11
Posted 27 July 2012 - 03:12 AM
|| () |> |2 () |3 |_ 3 |/|