rhn

OrechidControl

rhn
Apr 25th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. redstone.setOutput("top", true)
  2. sleep(25) --Wait for turtles to return home
  3. redstone.setOutput("top", false)
  4.  
  5. pool=peripheral.wrap("front")
  6.  
  7.  
  8. --Rednet initialization
  9. rednet.open("right")
  10.  
  11. --Find rednet IDs for mining turtles
  12. local IDs={}
  13. if rednet.lookup("OrechidMiner") then
  14.     for i=1,4 do
  15.         IDs[i]=rednet.lookup("OrechidMiner","layer"..i)
  16.         --print(IDs[i])
  17.     end
  18. end
  19.  
  20. while true do
  21.     redstone.setOutput("top", true)
  22.     for i=1,4 do
  23.         rednet.send(IDs[i],"go")
  24.     end
  25.     sleep(130)
  26.     redstone.setOutput("top", false)
  27.     sleep(448*6.5)
  28.     while pool.getMana(true)<50000 do
  29.         sleep(5)
  30.     end
  31. end
Add Comment
Please, Sign In to add comment