jared314

Untitled

Oct 1st, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. floorSize = 100
  2.  
  3. currentSlot = 2
  4.  
  5.  
  6. function PlaceTorch()
  7. turtle.select(1)
  8. turtle.turnRight()
  9. turtle.turnRight()
  10.  
  11. turtle.place()
  12.  
  13. turtle.turnRight()
  14. turtle.turnRight()
  15. turtle.select(currentSlot)
  16. end
  17.  
  18. function CheckSlotLevel()
  19. if (turtle.getItemCount() <= 0) then
  20. currentSlot = currentSlot + 1
  21. turtle.select(currentSlot)
  22. end
  23. end
  24.  
  25. function BuildRow(torch)
  26. for i=0,floorSize,1 do
  27. CheckSlotLevel()
  28. turtle.placeDown()
  29. if (torch and (i%5==0)) then
  30. PlaceTorch()
  31. end
  32. turtle.forward()
  33. end
  34. end
  35.  
  36. function Build()
  37. BuildRow(false)
  38. for i=0,floorSize,1 do
  39. torch = i%5==0
  40. BuildRow(torch)
  41. end
  42. end
  43.  
  44. turtle.select(currentSlot)
  45. Build()
Add Comment
Please, Sign In to add comment