Advertisement
MrTurtle

Pyramid Builder

May 26th, 2014
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.12 KB | None | 0 0
  1. print("Loading Robust Turtle API...")
  2. local load = os.loadAPI("t")
  3. if load then
  4.   print("Robust Turtle API loaded.")
  5. else
  6.  print("Robust Turtle API not found in the root directory with filename t")
  7.  print("Attempting to download as t from pastebin...")
  8.  os.sleep(2)
  9.  local response = http.get("http://pastebin.com/raw.php?i= e0UksEtT")
  10.  if response then
  11.     print("Great Success.")    
  12.     local data = response.readAll()
  13.     response.close()
  14.     local file = fs.open("t", "w")
  15.     file.write(data)
  16.     file.close()
  17.     print("Downloaded as t")
  18.     load = os.loadAPI("t")
  19.     if load then
  20.      print("Robust Turtle API installed & loaded.")
  21.     end
  22.  else
  23.     print( "Download Failed. Please Install Manually." )
  24.     return
  25.  end
  26. end
  27.  
  28.  
  29. --pyramid builder turtle. does not hollow it out.
  30.  
  31.  
  32. term.clear()
  33. term.setCursorPos(1,1)
  34. print([[Place Blocks starting in slot 1.
  35. How tall will the pyramid be?]])
  36. local size = 2*t.readNum()
  37. for a=size,1, -2 do
  38.   for b=1,4 do
  39.     t.forward()
  40.     t.placeRow("down", "forward", a, 1,8)
  41.     t.right()
  42.   end
  43.   t.up()
  44.   t.strafeRight()
  45.   t.forward()
  46. end
  47. t.placeDown(1,8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement