Advertisement
fantadada

computer_control

Apr 17th, 2022 (edited)
902
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1.  
  2. rednet.open("top")
  3. local id = //
  4. local msg_alert, msg_ok = "LowBat_AE", "Ok_AE"
  5. local name = ////
  6.  
  7.  
  8. -----------------------------
  9. term.clear()
  10. term.setBackgroundColor(colors.gray)
  11. term.setCursorPos(24,9)
  12. term.write("Controlleur "..name)
  13.  
  14. while true do
  15.     local event = os.pullEvent("redstone")
  16.     if redstone.getInput("right") then
  17.         rednet.send(id,msg_alert)
  18.     else
  19.         rednet.send(id,msg_ok)
  20.     end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement