Posted 21 October 2014 - 09:23 PM
Hi Guys,
I have script a code for my turtles, to build in my house walls…
But how can i do it, when slot 1 with Item 64 = 0 then select the slot 2 with item 64 and when slot 2 = 0 then select slot 3 ?!
Hier is the Code:
Thank you !
I have script a code for my turtles, to build in my house walls…
But how can i do it, when slot 1 with Item 64 = 0 then select the slot 2 with item 64 and when slot 2 = 0 then select slot 3 ?!
Hier is the Code:
print("---------Mauern bauen----------")
print("Baumaterial in Slot 1,2,3 legen")
print("Kohle in Slot 16 legen")
print("--------------------------------")
a = 0
write("Wie breit soll die Mauer sein: ")
Breit = io.read()
write("Wie hoch soll die Mauer werden: ")
Hoch = io.read()
c = a+Breit
d = a+Hoch
d1 = a+Hoch
while c > 0 do
while d > 0 do
turtle.select(16)
turtle.refuel()
turtle.select(1)
if turtle.detect() then
turtle.dig()
end
turtle.place()
turtle.up()
d = (d - 1)
end
d = (d + d1)
while not turtle.detectDown() do
turtle.down()
end
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
c = (c - 1)
end
Thank you !