Advertisement
Guest User

startup

a guest
Jul 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.61 KB | None | 0 0
  1. slot = 1
  2. heart = {}
  3. CDB = {}
  4. Core = {}
  5. tnt = {}
  6. while true do
  7. sleep(0,2)
  8. if turtle.getItemSpace() < 64 then
  9.  numb = turtle.getItemDetail().count
  10.  name = turtle.getItemDetail().name
  11.  data = turtle.getItemDetail().damage
  12. else
  13.  numb = 0
  14.  name = "Empty"
  15.  data = nil
  16. end
  17.  turtle.select(slot)
  18.  if name == "minecraft:tnt" then
  19.   tnt[1] = slot-1
  20.   tnt[2] = true
  21.  end
  22.  if name == "DraconicEvolution:draconium" and data == 2 then
  23.   CDB[1] = slot-1
  24.   CDB[2] = true
  25.  end
  26.  if name == "DraconicEvolution:draconicCore" and numb >= 16 then
  27.   Core[1] = slot-1
  28.   Core[2] = true
  29.  end
  30.  if name == "DraconicEvolution:dragonHeart" then
  31.   heart[1] = slot-1
  32.   heart[2] = true
  33.  end
  34.  
  35. slot = slot+1
  36. if slot > 16 then
  37.  slot = 1
  38.  tnt[1] = " "
  39.  CDB[1] = " "
  40.  Core[1] = " "
  41.  heart[1] = " "
  42.  tnt[2] = false
  43.  CDB[2] = false
  44.  Core[2] = false
  45.  heart[2] = false
  46. end
  47.  
  48. term.clear()
  49. term.setCursorPos(1,1)
  50. print("TnT Slot :")
  51. term.setCursorPos(11,1)
  52. print(tnt[1])
  53. term.setCursorPos(1,2)
  54. print("Charged Draconium Block Slot :")
  55. term.setCursorPos(31,2)
  56. print(CDB[1])
  57. term.setCursorPos(1, 3)
  58. print("Draconic Core Slot :")
  59. term.setCursorPos(21, 3)
  60. print(Core[1])
  61. term.setCursorPos(1,4)
  62. print("Dragon Heart Slot :")
  63. term.setCursorPos(21, 4)
  64. print(heart[1])
  65.  
  66. ---------------
  67. if Core[2] == true and tnt[2] == true and CDB[2] == true and heart[2] == true then
  68.  
  69. turtle.select(tnt[1])
  70. turtle.place()
  71.  
  72. rs.setOutput("front", true)
  73. rs.setOutput("right", true)
  74. sleep(1)
  75. rs.setOutput("front", false)
  76. rs.setOutput("right", false)
  77. sleep(12)
  78. rs.setOutput("left", true)
  79. sleep(1)
  80. rs.setOutput("left", false)
  81. sleep(20)
  82. end
  83. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement