Advertisement
Guest User

test

a guest
Jun 13th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. peripheral.wrap("front")
  2. local p = peripheral.wrap("front")
  3. local chest = {"1365", "3003"}
  4.  
  5. turtle.select(16)
  6. turtle.place()
  7.  
  8. color = 1365
  9.  
  10. p.setFrequency("0")
  11. print(p.getFrequency())
  12. p.setFrequency(color)
  13. print(p.getFrequency())
  14. p.setFrequency(chest[1])
  15. print(p.getFrequency())
  16. p.setFrequency(chest[2])
  17. print(p.getFrequency())
  18.  
  19. function restock()
  20. --  turtle.turnLeft()
  21. --  turtle.turnLeft()
  22.   turtle.select(16)
  23.   turtle.place()
  24.   print("Placed")
  25.   peripheral.wrap("front")
  26.   print("Wrapped")
  27.   print(chest[1])
  28.   p.setFrequency(chest[1])
  29.   print("Set")
  30.   for i=1, 15 do
  31.     turtle.select(i)
  32.     turtle.drop()
  33.   end
  34.   p.setFrequency(chest[2])
  35.   for i=1, 15 do
  36.     turtle.select(i)
  37.     turtle.suck()
  38.   end
  39.   turtle.select(16)
  40.   turtle.dig()
  41.   turtle.select(1)
  42.   print("success")
  43. --  turtle.turnRight()
  44. --  turtle.turnRight()
  45. end
  46.  
  47. restock()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement