Advertisement
guerre10

MarsHouse

Apr 14th, 2021
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. function RandomMats()
  2. currentslot=math.random(1,16)
  3.     turtle.select(currentslot)
  4.     while turtle.getItemCount(currentslot) == 0 do
  5.         currentslot=math.random(1,16)
  6.         turtle.select(currentslot)
  7.     end
  8. end
  9. function MarsHome(size)
  10.     Shapes.line(3)
  11.     RandomMats()
  12.     for loop=1, 4, do
  13.         for i=1, size do
  14.             RandomMats()
  15.             turtle.forward()
  16.             turtle.turnRight()
  17.             turtle.forward()
  18.             turtle.turnLeft()
  19.             turtle.placeDown()
  20.         end
  21.     turtle.forward()
  22.     turtle.turnRight()
  23.     end
  24. end
  25. function positionSelfOut()
  26.     turtle.up()
  27.     turtle.turnLeft()
  28.     turtle.forward()
  29.     turtle.turnRight()
  30. end
  31. function positionSelfIn()
  32.     turtle.up()
  33.     turtle.turnRight()
  34.     turtle.forward()
  35.     turtle.turnLeft()
  36. end
  37. for i=1,2 do
  38.     MarsHome(2)
  39.     turtle.up()
  40. end
  41. positionSelfOut()
  42. for i=1, 3 do
  43.     MarsHome(3)
  44.     turtle.up()
  45. end
  46. positionSelfOut()
  47. for i=1, 7 do
  48.     MarsHome(4)
  49. end
  50. PositionSelfIn()
  51. for i=1, 3 do
  52.     MarsHome(3)
  53.     turtle.up()
  54. end
  55. PositionSelfIn()
  56. for i=1,2 do
  57.     MarsHome(2)
  58.     turtle.up()
  59. end
  60. PositionSelfIn()
  61. for i=1,2 do
  62.     MarsHome(1)
  63.     turtle.up()
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement