daily pastebin goal
19%
SHARE
TWEET

Recieve Energy

Adrali Jun 13th, 2018 (edited) 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sscr=
  2. smod1=
  3. cenow=
  4. cemax=
  5.  
  6. screen = peripheral.wrap(sscr)
  7. mener = peripheral.wrap(smod1)
  8.  
  9.  
  10. mener.open(cenow)
  11. mener.open(cemax)
  12.  
  13. enow=0
  14. emax=0
  15. while true do
  16.     local event, modemSide, senderChannel,
  17.     replyChannel, message, senderDistance = os.pullEvent("modem_message")
  18.    
  19.     if senderChannel == cenow then
  20.         enow = message
  21.     else
  22.         emax = message
  23.     end
  24.     scren.setCursorPos(1,1)
  25.     screen.write("Energy : ")
  26.     scren.setCursorPos(1,2)
  27.     screen.write("Act : ")
  28.     screen.write(enow)
  29.     scren.setCursorPos(1,3)
  30.     screen.write("Max : ")
  31.     screen.write(emax)
  32. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top