Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Loading Robust Turtle API...")
- local load = os.loadAPI("t")
- if load then
- print("Robust Turtle API loaded.")
- else
- print("Robust Turtle API not found in the root directory with filename t")
- print("Attempting to download as t from pastebin...")
- os.sleep(2)
- local response = http.get("http://pastebin.com/raw.php?i= e0UksEtT")
- if response then
- print("Great Success.")
- local data = response.readAll()
- response.close()
- local file = fs.open("t", "w")
- file.write(data)
- file.close()
- print("Downloaded as t")
- load = os.loadAPI("t")
- if load then
- print("Robust Turtle API installed & loaded.")
- end
- else
- print( "Download Failed. Please Install Manually." )
- return
- end
- end
- --haus/tower/skyscraper builder turtle. does not hollow it out.
- term.clear()
- term.setCursorPos(1,1)
- local haus={}
- local floor={}
- print("Haus Builder Turtle.")
- print("length?")
- local length = t.readNum()
- print("width?")
- local width = t.readNum()
- print("height of each floor?")
- local height = t.readNum()
- print("number of floors? FYI: max build height is y=256")
- local floors = t.readNum()
- print("first slot of wall material?")
- haus[1] = t.readNum()
- print("last slot of wall material? enter same number as the first slot if using only 1 stack.")
- haus[2] = t.readNum()
- print("first slot of roof/floor material?")
- floor[1] = t.readNum()
- print("last slot of roof/floor material? enter same number as the first slot if using only 1 stack.")
- floor[2] = t.readNum()
- function roof()
- local alternate = "right"
- for i =1, width do
- t.placeRow("down", "forward", length, floor[1], floor[2])
- if alternate == "right" and i~=width then
- t.right()
- t.forward()
- t.right()
- alternate = "left"
- elseif alternate == "left" and i~=width then
- t.left()
- t.forward()
- t.left()
- alternate = "right"
- end
- if alternate == "left" and i==width then
- t.right()
- t.forward(width-1)
- t.right()
- elseif alternate == "right" and i==width then
- t.strafeLeft(width-1)
- t.back(length-1)
- end
- end
- end
- roof()
- t.up()
- for i=1, floors do
- for i=1, height do
- for i=1,2 do
- t.placeRow("down", "forward", length, haus[1],haus[2])
- t.right()
- t.placeRow("down", "forward", width, haus[1],haus[2])
- t.right()
- end
- t.up()
- end
- roof()
- t.up()
- end
- t.back()
- t.down((height+1)*floors)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement