Advertisement
hiphopcanine

Computercraft BuildTower Program (WIP)

Jan 17th, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. function BuildLayer()
  2.   for wall=1,4 do
  3.     turtle.forward()
  4.     turtle.place()
  5.     turtle.turnLeft()
  6.     turtle.forward()
  7.     turtle.turnRight()
  8.     turtle.place()
  9.     turtle.turnRight()
  10.     turtle.forward()
  11.     turtle.forward()
  12.     turtle.turnLeft()
  13.     turtle.place()
  14.     turtle.turnLeft()
  15.     turtle.forward()
  16.     turtle.turnRight()
  17.     turtle.back()
  18.     turtle.left()
  19.   end
  20. end
  21.  
  22. current=0
  23. print("Please input how high the tower should be")
  24. InputHeight = read()
  25. For inv=1,9 do
  26.   while turtle.getItemCount(inv) > 0 do
  27.     For height=current,InputHeight do
  28.       BuildLayer()
  29.       current=current+1
  30.     end
  31.   end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement