Advertisement
Guest User

startup

a guest
Jan 18th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.58 KB | None | 0 0
  1. while true do
  2. --Check signal
  3.  
  4. if rs.getInput("top") then
  5. print("Redstone signal is on")
  6. print("Toggle to enable spawns")
  7. sleep(3)
  8. else
  9.  
  10. --Turtle Check has enough parts
  11. turtle.select(1)
  12.   if turtle.getItemCount() > 9 then
  13.   print("Turtle has ", turtle.getItemCount(), " heads")
  14.   turtle.select(2)
  15.     if turtle.getItemCount() > 12 then
  16.     print("Turtle has ", turtle.getItemCount(), " Sand")
  17.     turtle.select(3)
  18.       if turtle.getItemCount() > 16 then
  19.       print("Turtle has enough fuel, ", turtle.getFuelLevel())
  20.       turtle.refuel(1)
  21.       turtle.select(2)
  22. --has enough parts
  23. --Functions
  24.  
  25. --Active starting here
  26. turtle.down(3)
  27. turtle.down()
  28. turtle.down()
  29. turtle.forward(1)
  30. turtle.up(1)
  31. sleep(.25)
  32. --sand top sides
  33. turtle.turnRight(1)
  34. turtle.select(2)
  35. turtle.place()
  36. turtle.turnLeft(2)
  37. turtle.turnLeft()
  38. turtle.place()
  39. sleep(.25)
  40. --heads sides sides
  41. turtle.up(1)
  42. turtle.select(1)
  43. turtle.place()
  44. turtle.turnRight(2)
  45. turtle.turnRight()
  46. turtle.place()
  47. sleep(.25)
  48. --center line
  49. turtle.turnLeft(1)
  50. turtle.back(1)
  51. turtle.down(3)
  52. turtle.down()
  53. turtle.down()
  54. sleep(.25)
  55. -- Reset position
  56. turtle.select(2)
  57. turtle.place()
  58. turtle.up(1)
  59. turtle.place()
  60. turtle.select(1)
  61. sleep(.25)
  62. -- Last head
  63. turtle.up()
  64. turtle.place()
  65. print("Wither Built")
  66. sleep(5)
  67. --Endings else's
  68. else -- Coal/Refuel
  69. print("Failed to Refuel")
  70. sleep(5)
  71. end
  72. else -- soul sand
  73. print("Not Enough Sand")
  74. sleep(5)
  75. end
  76. else -- Wither skulls
  77. print("Not Enough Skulls")
  78. sleep(5)
  79. end
  80. print("Spawning ended starting anew")  
  81. sleep(1)
  82. end -- Redstone
  83.  
  84. end -- while true doo doo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement