Geesio

enhanced portals

Sep 28th, 2015
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. os.loadAPI("button")
  2. peripheral.wrap("right")
  3. m = peripheral.wrap("montior_1")
  4. m.clear()
  5.  
  6. function fillTable()
  7. button.setTable("Test 1", test1, 10, 30, 3, 5)
  8. button.setTable("Test 2", test2, 32, 52, 3, 5)
  9. button.setTable("Test 3", test3, 10, 30, 8, 10)
  10. button.setTable("Test 4", test4, 32, 52, 8, 10)
  11. button.screen()
  12. end
  13.  
  14. function getClick()
  15. event,side,x,y = os.pullEvent("monitor_touch")
  16. button.checkxy(x,y)
  17. end
  18.  
  19. function test1()
  20. button.toggleButton("Test 1")
  21. terminate()
  22. outTime(760)
  23. dialStored(0)
  24. end
  25.  
  26. function test2()
  27. button.toggleButton("Test 2")
  28. terminate()
  29. outTime(760)
  30. dialStored(1)
  31. end
  32.  
  33. function test3()
  34. button.toggleButton("Test 3")
  35. terminate()
  36. outTime(760)
  37. dialStored(2)
  38. end
  39.  
  40. function test4()
  41. button.toggleButton("Test 4")
  42. terminate()
  43. outTime(760)
  44. dialStored(3)
  45. end
  46.  
  47. fillTable()
  48. button.heading("Stargate Dialing Computer")
  49.  
  50. while true do
  51. getClick()
  52. end
Advertisement
Add Comment
Please, Sign In to add comment