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

Need help with my 9x9 Direwolf20 House

Started by Ayce47, 31 December 2012 - 01:57 AM
Ayce47 #1
Posted 31 December 2012 - 02:57 AM
Hi guys! I've watched some of direwolfs tutorials about turtles and i realy wanted to make a 9x9 house. This is what i've coded but it has some bugs! Could someone help me?


function lineTwo()
for i= 1,9 do
	turtle.forward()
	turtle.digDown()
end
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end

function lineOne()	  
for i = 1,9 do
	turtle.forward()
	turtle.digDown()
end
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
end

lineOne()
lineTwo()
lineOne()
lineTwo()
lineOne()
lineTwo()
lineOne()
lineTwo()
lineOne()
turtle.turnRight()
for i = 1, 9 do
  turtle.forward()
end
turtle.turnLeft()
for i = 1, 9 do
turtle.forward()
end
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()

function floorLine()
  for i = 1, 9 do
	turtle.forward()
	turtle.placeDown()
  end
end

function cplFL()
floorLine()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end

function cplFR()
floorLine()
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
end

cplFL()
cplFR()
cplFL()
cplFR()
cplFL()
cplFR()
cplFL()
turtle.select(2)
cplFR()
cplFL()

turtle.back()
turtle.left()
turtle.forward()
turtle.right()


function wallLine()  
  for i = 1, 8 do
	turtle.forward()
	turtle.placeDown()
  end
end

function downwall()
for i = 1, 5 do
	turtle.down()
	end
end

function wall1()
for i = 1, 5 do
   turtle.up()
   wallLine()
   turtle.turnLeft()
   turtle.turnLeft()
   turtle.back()  
  end
downwall()  
turtle.turnLeft()
turtle.back()
end
function wall2()
for i = 1, 5 do
   turtle.up()
   wallLine()
   turtle.turnLeft()
   turtle.turnLeft()
   turtle.back()
  end
downwall()
turtle.turnLeft()
turtle.back()
end
function wall3()
for i = 1, 5 do
   turtle.up()
   wallLine()
   turtle.turnLeft()
   turtle.turnLeft()
   turtle.back()
  end
turtle.turnLeft()
turtle.back()
end

function wall4()
turtle.forward()
  for i = 1, 5 do
  turtle.up()
   for z = 1, 1 do
	turtle.placeDown()
	turtle.forward()
	turtle.placeDown()
	turtle.forward()
	turtle.placeDown()
	turtle.forward()
	turtle.placeDown()
	turtle.forward()
	turtle.placeDown()
	turtle.forward()
	turtle.placeDown()
	turtle.forward()
	turtle.placeDown()
	turtle.forward()
	turtle.placeDown() --only solution i found. try to do it youtself with a for loop and you'll see :P/>
   end
  turtle.turnLeft()
  turtle.turnLeft()
  end
end  


turtle.select(3) --I know i could've add those guys at the function but when i realised it, i've already added them here :P/>.
wall1()
turtle.select(4)
wall2()
turtle.select(5)
wall3()
turtle.select(6)
wall4()


turtle.back()
turtle.turnLeft()
turtle.forward()
turtle.turnRight()
function floorLine()
for i = 1, 7 do
	turtle.forward()
	turtle.placeDown()
   end
end

function cplFL()
floorLine()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
end

function cplFR()
floorLine()
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnRight()
end

turtle.select(7)
cplFL()
cplFR()
cplFL()
cplFR()
turtle.select(8)
cplFL()
cplFR()
cplFL()


turtle.select(10)
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()

for i = 1, 5 do
   turtle.down()
end

turtle.turnRight()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.down()
turtle.down()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.placeDown()

turtle.turnLeft()
turtle.forward()
turtle.down()
turtle.down()
turtle.down()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.dig()
turtle.up()
turtle.dig()


turtle.select(10)
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()

for i = 1, 5 do
   turtle.down()
end

turtle.turnRight()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.forward()
turtle.placeDown()
turtle.forward()
turtle.down()
turtle.down()
turtle.placeDown()
turtle.up()
turtle.placeDown()
turtle.up()
turtle.placeDown()

turtle.turnLeft()
turtle.forward()
turtle.down()
turtle.down()
turtle.down()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.dig()
turtle.up()
turtle.dig()
Edited by
todry #2
Posted 01 January 2013 - 03:25 PM
Wait a sec your trying to get turtles to build a 9x9 house why not build it be hand?
Doyle3694 #3
Posted 01 January 2013 - 04:08 PM
todry, why are you even here if you think stuff should be done by hand. Also, reported topic for being in wrong section, for further reference, the Ask a Pro section is more fiting for threads like this.
SuicidalSTDz #4
Posted 01 January 2013 - 05:38 PM
Your code is very sloppy, if you want I have a very nice 9x9 program. Put your building blocks in the first five slots and glass in the last slot.
Pastebin: 6Gmhm2ri
Lyqyd #5
Posted 01 January 2013 - 05:39 PM
Doyle, do not reply to threads you've reported. Report it and move on. Moved to Ask a Pro.
remiX #6
Posted 02 January 2013 - 02:11 AM
Can you please tell us the 'bugs' it gives? Does it at-least do something at all?