edoreld

Untitled

Mar 24th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local m = peripheral.wrap("right")
  2. local fullToDeliver = 3
  3. local lastEmptySlot = 14
  4. local fullBattery = 15
  5. local emptyBattery = 16
  6.  
  7.  
  8. function clearScreen()
  9. term.clear()
  10. term.setCursorPos(1,1)
  11. end
  12.  
  13.  
  14. turtle.select(1)
  15.  
  16. clearScreen()
  17.  
  18. while true do
  19. clearScreen()
  20. print("=========================")
  21.  
  22. while turtle.suckUp() do
  23. os.sleep(1)
  24. end
  25.  
  26. for i=1,lastEmptySlot do
  27. turtle.select(i)
  28.  
  29. if turtle.compareTo(fullBattery) then
  30. turtle.dropUp()
  31. os.sleep(1)
  32. elseif turtle.compareTo(emptyBattery) then
  33. m.dropSneaky(1,1)
  34. else
  35. m.suckSneaky(1,1)
  36. end
  37.  
  38. os.sleep(1)
  39.  
  40.  
  41. end
  42. end
Advertisement
Add Comment
Please, Sign In to add comment