Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --!floor
- --This simply lays down a floor of a specified area Nothing more
- print("I start counting the blocks in front of me!")
- print("How far forward boss?")
- local x=tonumber(read())-1
- print("How far across boss?")
- local y=tonumber(read())
- print("Left or Right boss? (L/R)")
- local dir=read()
- if dir=="L" or dir=="l" then
- dir="L"
- elseif dir=="R" or dir=="r" then
- dir="R"
- end
- a=1
- t.forward()
- if not turtle.detectDown() then
- turtle.select(a)
- turtle.placeDown()
- end
- if x*y+1<=turtle.getFuelLevel() then
- for j=1, y do
- for i=1, x do
- if turtle.getItemCount(a)==0 then
- a=a+1
- end
- t.forward()
- if not turtle.detectDown() then
- turtle.select(a)
- turtle.placeDown()
- end
- end
- if turtle.getItemCount(a)==0 then
- a=a+1
- end
- if dir=="R" then
- t.right()
- t.forward()
- if not turtle.detectDown() then
- turtle.select(a)
- if j~=y then
- turtle.placeDown()
- end
- end
- t.right()
- dir="L"
- elseif dir=="L" then
- t.left()
- t.forward()
- if not turtle.detectDown() then
- turtle.select(a)
- if j~=y then
- turtle.placeDown()
- end
- end
- t.left()
- dir="R"
- end
- end
- else
- print("Not enough fuel boss! Try again later!")
- end
Advertisement
Add Comment
Please, Sign In to add comment