Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Len = 0
- local Wid = 0
- local i = 1
- local j = 1
- function MakeBlock() --function to make a block; we only want to use inventory from 1-15; 16 reserved for fuel
- --print(j)
- print(i)
- print(Len)
- -- if (getItemCount(j) ~= 0) and (j < 16) then --if inv. slot has items, AND not fuel slot 16 place block
- -- turtle.select(j)
- -- turtle.placeDown()
- -- else if j < 16 then -- if fail, ( out of blocks and not fuel slot 16, incr. to next slot
- -- j = j + 1 -- incr. j, go to next slot
- -- turtle.select(j)
- -- turtle.placeDown()
- -- end
- -- end
- end
- function MakeRow() --create function to build a row
- repeat
- turtle.digDown()
- MakeBlock()
- turtle.forward()
- i = i + 1
- until i == 3 --Len --and (j<=16)
- end
- --START OF PROGRAM program easy options menu; captures length & width variables
- write("Enter wall length and width\n")
- write("enter length:")
- Len = read()
- write("enter width:")
- Wid = read()
- print("creating floor "..Len.." x "..Wid)
- print("making new row...")
- MakeRow()
- print("Complete!")
- --rise up 1 level; for now keep it so its at foot level
- --turtle.up()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement