Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local build
- local ww
- local fuelLevel
- local DHXY
- local DHZ
- function building()
- term.clear()
- term.setCursorPos(1,1)
- term.write("What should i build? ")
- build = read()
- term.clear()
- term.setCursorPos(1,1)
- end
- function checkstone()
- turtle.getItemCount(3)
- ItemCount1 = turtle.getItemCount(3)
- turtle.getItemCount(4)
- ItemCount2 = turtle.getItemCount(4)
- turtle.getItemCount(5)
- ItemCount3 = turtle.getItemCount(5)
- turtle.getItemCount(6)
- ItemCount4 = turtle.getItemCount(6)
- turtle.getItemCount(7)
- ItemCount5 = turtle.getItemCount(7)
- turtle.getItemCount(8)
- ItemCount6 = turtle.getItemCount(8)
- turtle.getItemCount(9)
- ItemCount7 = turtle.getItemCount(9)
- turtle.getItemCount(10)
- ItemCount8 = turtle.getItemCount(10)
- if ItemCount1 > 1 then
- turtle.select(3)
- elseif ItemCount2 > 1 then
- turtle.select(4)
- elseif ItemCount3 > 1 then
- turtle.select(5)
- elseif ItemCount4 > 1 then
- turtle.select(6)
- elseif ItemCount5 > 1 then
- turtle.select(7)
- elseif ItemCount6 > 1 then
- turtle.select(8)
- elseif ItemCount7 > 1 then
- turtle.select(9)
- elseif ItemCount8 > 1 then
- turtle.select(10)
- else
- print("Out of Bricks")
- end
- end
- function checkFuel()
- if turtle.getFuelLevel() < 500 then
- print("poke")
- end
- end
- function list()
- term.clear()
- term.setCursorPos(1,1)
- print("Words are case sensitive")
- term.setCursorPos(1,3)
- print("walkway")
- print("direhouse")
- os.sleep(5)
- building()
- end
- function buildWW()
- turtle.forward()
- turtle.turnLeft()
- checkstone()
- turtle.placeDown()
- checkstone()
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- checkstone()
- turtle.placeDown()
- turtle.forward()
- checkstone()
- turtle.placeDown()
- checkstone()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- function walkway()
- term.clear()
- term.setCursorPos(1,1)
- term.write("How long should the walkway be? ")
- ww = read()
- term.clear()
- term.setCursorPos(1,1)
- print("Building walkway " ..ww.. " rows long")
- local rows = ww
- for i = 1,ww do
- checkFuel()
- buildWW()
- print(rows.. " rows left")
- rows = rows-1
- end
- end
- function buildDH()
- end
- function direhouse()
- term.clear()
- term.setCursorPos(1,1)
- term.write("How large should the house be? ")
- DHXY = read()
- term.setCursorPos(1,3)
- term.write("How tall should the house be? ")
- DHZ = read()
- os.sleep(3)
- term.clear()
- term.setCursorPos(1,1)
- print("Building house " ..DHXY.. "x" ..DHXY.. " and " ..DHZ.. " tall")
- end
- building()
- if build == "walkway" then
- walkway()
- elseif build == "direhouse" then
- direhouse()
- elseif build == "list" then
- list()
- else
- print("Input not accepted")
- os.sleep(3)
- building()
- end
Advertisement
Add Comment
Please, Sign In to add comment