Terrabeck

Computer Craft Error

Jun 9th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. Key = Load
  5. write("Welcome To Terra-DoorLock v0.2")
  6. write("Type Load To Start Keypad GUI")
  7. write("Key: ")
  8. start()
  9. load()
  10.  
  11. function start()
  12.  
  13. term.clear()
  14. term.setCursorPos(1,1)
  15. write("Please Input The Peripheral Moniter's Network ID")
  16. ID = read()
  17. mon = peripheral.wrap(ID)
  18. monload()
  19.  
  20. end
  21.  
  22. function load()
  23. k = read()
  24. if k == (Key) then
  25. start()
  26.  
  27. else
  28. term.clear()
  29. term.setCursorPos(1,1)
  30. write("Type Load")
  31. write("Key: ")
  32. load()
  33.  
  34. end
  35. end
  36.  
  37. function loaded()
  38.  
  39. term.clear()
  40. term.setCursorPos(1,1)
  41. write("Loaded")
  42. textutils.slowPrint("Going To Default OS")
  43. sleep(2)
  44. term.clear()
  45. term.setCursorPos(1,1)
  46.  
  47. end
  48.  
  49. function monload()
  50. term.clear()
  51. term.setCursorPos()
  52. textutils.slowPrint("Loading . . .")
  53. mon.setBackgroundColor(colors.black)
  54. mon.setTextColor(colors.white)
  55. mon.clear()
  56. mon.setCursorPos(1,1)
  57. mon.write("1 2 3")
  58. mon.setCursorPos(1,2)
  59. mon.write("4 5 6")
  60. mon.setCursorPos(1,3)
  61. mon.write("7 8 9")
  62. mon.setCursorPos(1,5)
  63. mon.setTextColor(colors.red)
  64. mon.write("CLR")
  65. loaded()
  66. end
  67.  
  68. event, side, x, y = os.pullEvent("monitor_touch")
  69.  
  70. function clear()
  71. term.setCursorPos(4,5)
  72. term.clearLine
  73. end --Line 73
  74.  
  75. while true do
  76. function code()
  77.  
  78. numpos = mon.setCursorPos(1,4)
  79. event, side, x, y = os.pullEvent("monitor_touch")
  80. num()
  81. nompos = mon.setCursorPos(2,4)
  82. event, side, x, y = os.pullEvent("monitor_touch")
  83. num()
  84. nompos = mon.setCursorPos(3,4)
  85. event, side, x, y = os.pullEvent("monitor_touch")
  86. num()
  87. nompos = mon.setCursorPos(4,4)
  88. event, side, x, y = os.pullEvent("monitor_touch")
  89. num()
  90.  
  91. end
  92.  
  93. function num()
Advertisement
Add Comment
Please, Sign In to add comment