Advertisement
sanovskiy

steamcontrol

Nov 26th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1.  
  2. function init()
  3.     while turtle.detect() do
  4.         turtle.turnRight()
  5.     end
  6. end
  7.  
  8. function main()
  9.     mainLoop = true
  10.     while mainLoop do
  11.         init()
  12.         if turtle.getItemCount(workSlot)>0 and not(turtle.compareTo(fullBucketSlot)) then
  13.             turtle.place()
  14.         end
  15.         turtle.turnRight()
  16.         turtle.turnRight()
  17.         turtle.drop()
  18.         sleep(5)
  19.         turtle.suck()
  20.     end
  21. end
  22.  
  23. fullBucketSlot = 1
  24. emptyBucketSlot = 2
  25. workSlot = 3
  26.  
  27. turtle.select(workSlot)
  28.  
  29. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement