Advertisement
Guest User

startup.lua

a guest
Apr 7th, 2020
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. ap = peripheral.wrap("top")
  2.  
  3. rednet.open("bottom")
  4.  
  5. function getState()
  6.     local data = ap.getQueen()
  7.     if data == nil then
  8.         return "Terminated"
  9.     else
  10.         return "In progress.."        
  11.     end
  12. end
  13.  
  14. while true do
  15.     local state = getState()
  16.     rednet.send(68, state)
  17.     sleep(2)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement