luckdemon

AutoPotionTurtleV001

Feb 7th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.71 KB | None | 0 0
  1. local function init()
  2.     term.clear()
  3.     term.setCursorPos(1,1)
  4.     print("auto potion brewing in progress")
  5.     inv = peripheral.wrap("right")
  6.     end
  7.  
  8. local function clear()
  9.     term.clear()
  10.     term.setCursorPos(1,1)
  11.     end
  12.  
  13. local function bottlefill()
  14.     turtle.select(14)
  15.     turtle.place()
  16.     turtle.select(15)
  17.     turtle.place()
  18.     turtle.select(16)
  19.     turtle.place()
  20.     end
  21.  
  22.  
  23. local function gotoStand1()
  24.     turtle.turnRight()
  25.     turtle.forward()
  26.     turtle.turnRight()
  27.     s = 1
  28.     end
  29. local function gotoStand2()
  30.     turtle.turnRight()
  31.     for i=1,2 do
  32.     turtle.forward()
  33.     end
  34.     turtle.turnRight()
  35.     s = 1
  36.     end
  37. local function gotoStand3()
  38.     turtle.turnRight()
  39.     for i=1,3 do
  40.     turtle.forward()
  41.     end
  42.     turtle.turnRight()
  43.     s = 1
  44.     end
  45. local function gotoStand4()
  46.     turtle.turnRight()
  47.     for i=1,4 do
  48.     turtle.forward()
  49.     end
  50.     turtle.turnRight()
  51.     s = 1
  52.     end
  53. local function gotoStand5()
  54.     turtle.turnRight()
  55.     for i=1,5 do
  56.     turtle.forward()
  57.     end
  58.     turtle.turnRight()
  59.     s = 1
  60.     end
  61.    
  62. local function makeAwkward()
  63.     turtle.select(14)
  64.     turtle.drop()
  65. --    inv.dropSneaky(2,1)
  66.     turtle.select(15)
  67.     turtle.drop()
  68. --    inv.dropSneaky(2,1)
  69.     turtle.select(16)
  70.     turtle.drop()
  71. --    inv.dropSneaky(2,1)
  72.     turtle.select(1)
  73.     inv.dropSneaky(1,1)
  74.     end
  75.    
  76. local function makeHealing()
  77.     turtle.select(5)
  78.     inv.dropSneaky(1,1)
  79.     end
  80.  
  81. local function getPotions()
  82.     for i=14,16 do
  83.     turtle.select(i)
  84.     turtle.suck()
  85.     end
  86.     end
  87.    
  88. init()    
  89. bottlefill()
  90. gotoStand1()
  91. makeAwkward()
  92. sleep(21)
  93. makeHealing()
  94. sleep(21)
  95. getPotions()
  96. gotoStand1()
Advertisement
Add Comment
Please, Sign In to add comment