Advertisement
Guest User

Pc secondaire type

a guest
Jun 29th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. --Pc secondaire type
  2. rednet.open("right")
  3.  
  4. --Caractéristique de la turtle
  5. t = {
  6.   job = " ",
  7.   etat = " "
  8. }
  9.  
  10. --Envois des caractéristique
  11. local msg = textutils.serialize(t)
  12. rednet.send(31, msg)
  13.  
  14. while true do
  15.   -- event
  16.   local event, e1, e2 = os.pullEvent()
  17.  
  18.   --Reçois un message rednet
  19.   if event == "rednet_message" then
  20.     local id,msg = e1,e2
  21.     if msg == "break" then
  22.       os.shutdown()
  23.     end
  24.   end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement