Guest User

Wither Automated Killers code

a guest
Dec 30th, 2012
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.20 KB | None | 0 0
  1. --##killing turtle##
  2.  
  3. function getFuel()
  4. if turtle.getFuelLevel()<=10 then
  5. turtle.select(1)
  6. turtle.refuel(16)
  7. end
  8. end
  9.  
  10. function kill()
  11. sleep(10)
  12. redstone.setOutput("right",true)
  13. repeat
  14. getFuel()
  15. turtle.attackDown()
  16. until turtle.getItemCount(3)>0
  17. redstone.setOutput("right",false)
  18. end
  19.  
  20. getFuel()
  21. kill()
  22.  
  23. --end[this is the end of the code :) ]
  24.  
  25.  
  26.  
  27. --##building turtle
  28.  
  29.  
  30. function getFuel()
  31. if turtle.getFuelLevel() <=10 then
  32. turtle.select(1)
  33. turtle.refuel(16)
  34. end
  35. end
  36.  
  37. function preparation()
  38. getFuel()
  39. turtle.up()
  40. turtle.digUp()
  41. for a=1, 3 do
  42. turtle.up()
  43. end
  44. turtle.back()
  45. turtle.select(3)
  46. turtle.place()
  47. turtle.turnRight()
  48. turtle.forward()
  49. turtle.turnLeft()
  50. turtle.place()
  51. turtle.up()
  52. turtle.select(4)
  53. turtle.place()
  54. getFuel()
  55. turtle.turnLeft()
  56. turtle.forward()
  57. turtle.forward()
  58. turtle.down()
  59. turtle.turnRight()
  60. turtle.select(3)
  61. turtle.place()
  62. turtle.up()
  63. turtle.select(4)
  64. turtle.place()
  65. turtle.down()
  66. turtle.down()
  67. getFuel()
  68. turtle.turnRight()
  69. turtle.forward()
  70. turtle.turnLeft()
  71. turtle.select(3)
  72. turtle.forward()
  73. turtle.down()
  74. turtle.placeUp()
  75. turtle.down()
  76. turtle.select(2)
  77. turtle.placeUp()
  78. turtle.down()
  79. turtle.down()
  80. end
  81.  
  82. getFuel()
  83. preparation()
Advertisement
Add Comment
Please, Sign In to add comment