Advertisement
fantadada

/

Aug 26th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. rednet.open("top")
  2. os.loadAPI("button")
  3. m = peripheral.wrap("back")
  4. m.clear()
  5.  
  6. function button1() button.toggleButton("rez de chausser")
  7. rednet.send(1,"open")
  8. sleep(10)
  9. rednet.send(1,"0")
  10. button.toggleButton("rez de chausser")
  11.  end
  12.  
  13.  
  14. function button2() button.toggleButton("-2")
  15. rednet.send(1,"2")
  16. button.toggleButton("-2")
  17.  end
  18.  
  19.  
  20. function button3() button.toggleButton("-3")
  21. rednet.send(1,"3")
  22. button.toggleButton("-3")
  23. end
  24.  
  25.  
  26.  
  27.  
  28. function ecran()
  29. button.setTable("rez de chausser",button1,8,25,3,3)
  30. button.setTable("-2",button2,8,25,6,6)
  31. button.setTable("-3",button3,8,25,9,9)
  32. button.screen()
  33. end
  34.  
  35. function getClick()
  36. event,side,x,y = os.pullEvent("monitor_touch")
  37. button.checkxy(x,y)
  38. end
  39.  
  40. ecran()
  41.  
  42. while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement