Advertisement
Guest User

RechargeRSCell

a guest
Jun 15th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function test()
  2.   for i, j in pairs(peripheral.call("right","get")) do
  3.     print("** "..i)  
  4.     print(j)
  5.   end
  6.   print("_____________")
  7. end
  8.  
  9. function rechargeCell()
  10.   turtle.place()      
  11.   while true do
  12.     print("waiting...")
  13.     test()
  14.     sleep(5)
  15.     if peripheral.call("right", "get")["Full Energy"] == true then
  16.       print("Cellule chargee!")
  17.       turtle.dig()
  18.       return true
  19.     end
  20.   end
  21. end
  22.  
  23. for i=1,16 do
  24.   turtle.select(i)
  25.   print("Recharging slot"..i)
  26.   rechargeCell()  
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement