Advertisement
ReIative

Untitled

Jun 29th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Written by rahph.
  2. --Send nukes                                                      I mean nudes
  3. --Anyway, config
  4. local sV = "Unofficial 1.10B"
  5. local tape0 = peripheral.wrap("tape_drive_7")
  6. local tape1 = peripheral.wrap("tape_drive_6")
  7. local tape2 = peripheral.wrap("tape_drive_5")
  8. local tape3 = peripheral.wrap("tape_drive_4")
  9. local floor = peripheral.wrap("monitor_30")
  10. --End config. Dont alter the program beyond this line unless you know what ya doin
  11. local oldwrite = nil
  12. local oldbg = nil
  13. local oldfg = nil
  14. local lampConnected = 0
  15. local function rewrite()
  16.     oldwrite = mon.write
  17.     oldbg = mon.setBackgroundColor
  18.     oldfg = mon.setTextColor
  19.     mon.write = function(text) oldwrite(text) sleep(0.05) end
  20.     mon.setBackgroundColor = function(col) oldbg(col) sleep(0.05) end
  21.     mon.setTextColor = function(col) oldfg(col) sleep(0.05) end
  22. end
  23. local function play(id)
  24.     if id == 1 then tape0.play() end
  25.     if id == 2 then tape1.play() end
  26.     if id == 3 then tape2.play() end
  27.     if id == 4 then tape3.play() end
  28. end
  29. local err = {}
  30. err["mt"] = {}
  31. err["lt"] = {}
  32. function errorReport()
  33.  
  34.     mon.setTextScale(0.5)
  35. x,y = mon.getSize()
  36.     mon.setPaletteColor(colors.blue,0x0000FF)
  37.     mon.setPaletteColor(colors.white,0xFFFFFF)
  38.     mon.clear()
  39.     mon.setBackgroundColor(colors.blue)
  40.     mon.clear()
  41.     mon.setTextColor(colors.white)
  42.     mon.setCursorPos(1,2)
  43.     mon.setPaletteColor(colors.gray,0x99AAB5)
  44.     mon.setTextColor(colors.gray)
  45.     for i=1,x do mon.write("\127") end
  46.     mon.setCursorPos(1,1)
  47.     for i=1,x do mon.write("\127") end
  48.     mon.setCursorPos(1,3)
  49.     for i=1,x do mon.write("\127") end
  50.     mon.setTextColor(colors.white)
  51.     mon.setCursorPos((x-16)/2+1,2)
  52.     mon.write(" DISCO CONTROLL ")
  53.     mon.setCursorPos(3,4)
  54.     mon.write("The program has ran into an issue")
  55.     mon.setCursorPos(3,5)
  56.     mon.write("The following is an error report given to us.")
  57.     mon.setCursorPos(3,6)
  58.     if err["mt"][1] ~= nil then
  59.         mon.write(err["mt"][2] .. " @ Main thread")
  60.     end
  61.     if err["lt"][1] ~= nil then
  62.         mon.write(err["lt"][2] .. " @ Lamp thread")
  63.     end
  64.     mon.setCursorPos(3,y-1)
  65.     mon.write("Thats all we know")
  66.     mon.setCursorPos(3,9)
  67.     mon.write("Dumping report...")
  68.     mon.setCursorPos(3,10)
  69.     fname = "DiscoCrash" .. "-" .. os.day() .. "-" .. textutils.formatTime(os.time())
  70.     mon.write("File name: " .. fname)
  71.     mon.setCursorPos(3,11)
  72.     mon.write("[##")
  73.     oFile = fs.open(fname,"w")
  74.     mon.write("####")
  75.     oFile.write(textutils.serialise(err))
  76.     mon.write("######")
  77.     oFile.flush()
  78.     mon.write("###")
  79.     oFile.close()
  80.     mon.write("###]")
  81.     mon.setCursorPos(3,12)
  82.     mon.write("Thats all we know")
  83.     mon.setCursorPos(3,y-1)
  84.     mon.write("Restarting in 2 seconds")
  85.     mon.setCursorPos(1,y)
  86.     for i=1,x do sleep(2/x) mon.write("X") end
  87. end
  88. local function rewind(id)
  89.     if id == 1 then tape0.seek(-tape0.getSize()) end
  90.     if id == 2 then tape1.seek(-tape1.getSize()) end
  91.     if id == 3 then tape2.seek(-tape2.getSize()) end
  92.     if id == 4 then tape3.seek(-tape3.getSize()) end
  93. end
  94.  
  95. local function pause(id)
  96.     if id == 1 then tape0.stop() end
  97.     if id == 2 then tape1.stop() end
  98.     if id == 3 then tape2.stop() end
  99.     if id == 4 then tape3.stop() end
  100. end
  101.  
  102. local function round(num, n)
  103.   local mult = 10^(n or 0)
  104.   return math.floor(num * mult + 0.5) / mult
  105. end
  106. mon = peripheral.wrap("top")
  107. function redraw(vol,speed,light)
  108.  
  109. mon.setTextScale(1)
  110. x,y = mon.getSize()
  111. local objloc = {}
  112. objloc["tape"] = {}
  113. objloc.tape[1] = {}
  114. objloc.tape[1]["volume"] = {up=0,down=0}
  115. objloc.tape[1]["speed"] = {up=0,down=0}
  116. objloc.tape[1]["ctrlr"] = {0,0}
  117. objloc.tape[2] = {}
  118. objloc.tape[2]["volume"] = {up=0,down=0}
  119. objloc.tape[2]["speed"] = {up=0,down=0}
  120. objloc.tape[2]["ctrlr"] = {0,0}
  121. objloc.tape[3] = {}
  122. objloc.tape[3]["volume"] = {up=0,down=0}
  123. objloc.tape[3]["speed"] = {up=0,down=0}
  124. objloc.tape[3]["ctrlr"] = {0,0}
  125. objloc.tape[4] = {}
  126. objloc.tape[4]["volume"] = {up=0,down=0}
  127. objloc.tape[4]["speed"] = {up=0,down=0}
  128. objloc.tape[4]["ctrlr"] = {0,0}
  129. objloc.tape[1]["ctrlr"]["back"] = {4,4}
  130. objloc.tape[1]["ctrlr"]["stop"] = {4,5}
  131. objloc.tape[1]["ctrlr"]["play"] = {4,6}
  132. objloc.tape[2]["ctrlr"]["back"] = {28,4}
  133. objloc.tape[2]["ctrlr"]["stop"] = {28,5}
  134. objloc.tape[2]["ctrlr"]["play"] = {28,6}
  135. objloc.tape[3]["ctrlr"]["back"] = {4,11}
  136. objloc.tape[3]["ctrlr"]["stop"] = {4,12}
  137. objloc.tape[3]["ctrlr"]["play"] = {4,13}
  138. objloc.tape[4]["ctrlr"]["back"] = {28,11}
  139. objloc.tape[4]["ctrlr"]["stop"] = {28,12}
  140. objloc.tape[4]["ctrlr"]["play"] = {28,13}
  141. objloc.light = {}
  142.  
  143. mon.setPaletteColor(colors.blue,0x23272A)
  144. mon.setPaletteColor(colors.white,0xFFFFFF)
  145. mon.clear()
  146. mon.setBackgroundColor(colors.blue)
  147. mon.clear()
  148. mon.setTextColor(colors.white)
  149. mon.setCursorPos(1,2)
  150. mon.setPaletteColor(colors.gray,0x99AAB5)
  151. mon.setTextColor(colors.gray)
  152. for i=1,x do mon.write("\127") end
  153. mon.setCursorPos(1,1)
  154. for i=1,x do mon.write("\127") end
  155. mon.setCursorPos(1,3)
  156. for i=1,x do mon.write("\127") end
  157. mon.setTextColor(colors.white)
  158. mon.setCursorPos((x-16)/2+1,2)
  159. mon.write(" DISCO CONTROLL ")
  160. mon.setCursorPos(((x/2)-6)/2,4)
  161. mon.write("TAPE 0")
  162. mon.setCursorPos(4,4)
  163. mon.write("\17")
  164. mon.setCursorPos(4,5)
  165. mon.write("\143")
  166. mon.setCursorPos(4,6)
  167. mon.write("\16")
  168. mon.setCursorPos((((x/2)-6)/2)+(x/2),4)
  169. mon.write("TAPE 1")
  170. mon.setCursorPos(28,4)
  171. mon.write("\17")
  172. mon.setCursorPos(28,5)
  173. mon.write("\143")
  174. mon.setCursorPos(28,6)
  175. mon.write("\16")
  176. mon.setCursorPos(((x/2)-6)/2,11)
  177. mon.write("TAPE 2")
  178. mon.setCursorPos(4,11)
  179. mon.write("\17")
  180. mon.setCursorPos(4,12)
  181. mon.write("\143")
  182. mon.setCursorPos(4,13)
  183. mon.write("\16")
  184. mon.setCursorPos((((x/2)-6)/2)+(x/2),11)
  185. mon.write("TAPE 3")
  186. mon.setCursorPos(28,11)
  187. mon.write("\17")
  188. mon.setCursorPos(28,12)
  189. mon.write("\143")
  190. mon.setCursorPos(28,13)
  191. mon.write("\16")
  192. mon.setTextColor(colors.gray)
  193. for i=4,y do mon.setCursorPos(25,i) mon.write("\127\127") end
  194. mon.setTextColor(colors.white)
  195. objloc.light = {((x/2)-10/2)+9,18}
  196. if lampConnected == 1 then
  197. mon.setCursorPos((x/2)-10/2,18)
  198. mon.write("LIGHTS [")
  199. if light == 0 then mon.setTextColor(colors.red) mon.write("X") mon.setTextColor(colors.white) end
  200. if light == 1 then mon.setTextColor(colors.orange) mon.write("-") mon.setTextColor(colors.white) end
  201. if light == 2 then mon.setTextColor(colors.lime) mon.write("V") mon.setTextColor(colors.white) end
  202. mon.write("]")
  203. else
  204. mon.setCursorPos((x/2)-15/2,18)
  205. mon.write("NO LIGHTS FOUND")
  206. end
  207. mon.setTextColor(colors.gray)
  208. mon.setCursorPos(1,19)
  209. for i=1,x do mon.write("\127") end
  210. for i=1,y do mon.setCursorPos(1,i) mon.write("\127\127") end
  211. for i=1,y do mon.setCursorPos(x-1,i) mon.write("\127\127") end
  212. mon.setCursorPos(1,10)
  213. --for i=1,x do mon.write("\127") end
  214. --mon.setCursorPos(1,11)
  215. for i=1,x do mon.write("\127") end
  216. mon.setCursorPos(1,17)
  217. for i=1,x do mon.write("\127") end
  218. mon.setCursorPos(x-#sV+1,y)
  219. mon.write(sV)
  220. mon.setCursorPos(((x/2)-6)/2,6)
  221. mon.write("VOLUME")
  222. mon.setCursorPos(((x/2)-6)/2,8)
  223. mon.write("SPEED:")
  224. mon.setCursorPos((((x/2)-6)/2)+(x/2),6)
  225. mon.write("VOLUME")
  226. mon.setCursorPos((((x/2)-6)/2)+(x/2),8)
  227. mon.write("SPEED:")
  228. mon.setCursorPos(((x/2)-6)/2,13)
  229. mon.write("VOLUME")
  230. mon.setCursorPos(((x/2)-6)/2,15)
  231. mon.write("SPEED:")
  232. mon.setCursorPos((((x/2)-6)/2)+(x/2),13)
  233. mon.write("VOLUME")
  234. mon.setCursorPos((((x/2)-6)/2)+(x/2),15)
  235. mon.write("SPEED:")
  236. mon.setBackgroundColor(colors.white)
  237. objloc.tape[1].volume.down = {((x/2)-8)/2-0.5,7}
  238. objloc.tape[1].volume.up = {objloc.tape[1].volume.down[1] + 7,7}
  239. mon.setPaletteColor(colors.yellow,0x7289DA)
  240. mon.setBackgroundColor(colors.yellow)
  241. mon.setTextColor(colors.white)
  242. mon.setCursorPos(objloc.tape[1].volume.down[1],7)
  243. mon.write("\171      \187")
  244. mon.setBackgroundColor(colors.white)
  245. mon.setTextColor(colors.black)
  246. mon.setCursorPos(((x/2)-6)/2,7)
  247. mon.write("      ")
  248. if #tostring(vol[1]) % 2 == 1 then
  249. mon.setCursorPos(((x/2)-#tostring(vol[1]))/2-1,7)
  250. else
  251. mon.setCursorPos(((x/2)-#tostring(vol[1]))/2,7)
  252. end
  253. mon.write(vol[1])
  254. mon.setBackgroundColor(colors.white)
  255. objloc.tape[1].speed.down = {((x/2)-8)/2-0.5,9}
  256. objloc.tape[1].speed.up = {objloc.tape[1].speed.down[1] + 7,9}
  257. mon.setPaletteColor(colors.yellow,0x7289DA)
  258. mon.setBackgroundColor(colors.yellow)
  259. mon.setTextColor(colors.white)
  260. mon.setCursorPos(objloc.tape[1].speed.down[1],9)
  261. mon.write("\171      \187")
  262. mon.setBackgroundColor(colors.white)
  263. mon.setTextColor(colors.black)
  264. mon.setCursorPos(((x/2)-6)/2,9)
  265. mon.write("      ")
  266. if #tostring(speed[1]) % 2 == 1 then
  267. mon.setCursorPos(((x/2)-#tostring(speed[1]))/2-1,9)
  268. else
  269. mon.setCursorPos(((x/2)-#tostring(speed[1]))/2,9)
  270. end
  271. mon.write(speed[1])
  272.  
  273. mon.setBackgroundColor(colors.white)
  274. objloc.tape[2].volume.down = {(((x/2)-8)/2)+(x/2)-0.5,7}
  275. objloc.tape[2].volume.up = {objloc.tape[2].volume.down[1] + 7,7}
  276. mon.setPaletteColor(colors.yellow,0x7289DA)
  277. mon.setBackgroundColor(colors.yellow)
  278. mon.setTextColor(colors.white)
  279. mon.setCursorPos(objloc.tape[2].volume.down[1],7)
  280. mon.write("\171      \187")
  281. mon.setBackgroundColor(colors.white)
  282. mon.setTextColor(colors.black)
  283. mon.setCursorPos((((x/2)-6)/2)+(x/2),7)
  284. mon.write("      ")
  285. if #tostring(vol[2]) % 2 == 1 then
  286. mon.setCursorPos((((x/2)-#tostring(vol[2]))/2-1)+(x/2),7)
  287. else
  288. mon.setCursorPos((((x/2)-#tostring(vol[2]))/2)+(x/2),7)
  289. end
  290. mon.write(vol[2])
  291.  
  292. mon.setBackgroundColor(colors.white)
  293. objloc.tape[2].speed.down = {(((x/2)-8)/2)+(x/2)-0.5,9}
  294. objloc.tape[2].speed.up = {objloc.tape[2].speed.down[1] + 7,9}
  295. mon.setPaletteColor(colors.yellow,0x7289DA)
  296. mon.setBackgroundColor(colors.yellow)
  297. mon.setTextColor(colors.white)
  298. mon.setCursorPos(objloc.tape[2].speed.down[1],9)
  299. mon.write("\171      \187")
  300. mon.setBackgroundColor(colors.white)
  301. mon.setTextColor(colors.black)
  302. mon.setCursorPos((((x/2)-6)/2+(x/2)),9)
  303. mon.write("      ")
  304. if #tostring(speed[2]) % 2 == 1 then
  305. mon.setCursorPos((((x/2)-#tostring(speed[2]))/2-1)+(x/2),9)
  306. else
  307. mon.setCursorPos((((x/2)-#tostring(speed[2]))/2)+(x/2),9)
  308. end
  309. mon.write(speed[2])
  310. mon.setBackgroundColor(colors.white)
  311. objloc.tape[3].volume.down = {((x/2)-8)/2-0.5,14}
  312. objloc.tape[3].volume.up = {objloc.tape[3].volume.down[1] + 7,14}
  313. mon.setPaletteColor(colors.yellow,0x7289DA)
  314. mon.setBackgroundColor(colors.yellow)
  315. mon.setTextColor(colors.white)
  316. mon.setCursorPos(objloc.tape[3].volume.down[1],14)
  317. mon.write("\171      \187")
  318. mon.setBackgroundColor(colors.white)
  319. mon.setTextColor(colors.black)
  320. mon.setCursorPos(((x/2)-6)/2,14)
  321. mon.write("      ")
  322. if #tostring(vol[3]) % 2 == 1 then
  323. mon.setCursorPos(((x/2)-#tostring(vol[3]))/2-1,14)
  324. else
  325. mon.setCursorPos(((x/2)-#tostring(vol[3]))/2,14)
  326. end
  327. mon.write(vol[3])
  328. mon.setBackgroundColor(colors.white)
  329. objloc.tape[3].speed.down = {((x/2)-8)/2-0.5,16}
  330. objloc.tape[3].speed.up = {objloc.tape[3].speed.down[1] + 7,16}
  331. mon.setPaletteColor(colors.yellow,0x7289DA)
  332. mon.setBackgroundColor(colors.yellow)
  333. mon.setTextColor(colors.white)
  334. mon.setCursorPos(objloc.tape[3].speed.down[1],16)
  335. mon.write("\171      \187")
  336. mon.setBackgroundColor(colors.white)
  337. mon.setTextColor(colors.black)
  338. mon.setCursorPos(((x/2)-6)/2,16)
  339. mon.write("      ")
  340. if #tostring(speed[3]) % 2 == 1 then
  341. mon.setCursorPos(((x/2)-#tostring(speed[3]))/2-1,16)
  342. else
  343. mon.setCursorPos(((x/2)-#tostring(speed[3]))/2,16)
  344. end
  345. mon.write(speed[3])
  346.  
  347. mon.setBackgroundColor(colors.white)
  348. objloc.tape[4].volume.down = {(((x/2)-8)/2)+(x/2)-0.5,14}
  349. objloc.tape[4].volume.up = {objloc.tape[4].volume.down[1] + 7,14}
  350. mon.setPaletteColor(colors.yellow,0x7289DA)
  351. mon.setBackgroundColor(colors.yellow)
  352. mon.setTextColor(colors.white)
  353. mon.setCursorPos(objloc.tape[4].volume.down[1],14)
  354. mon.write("\171      \187")
  355. mon.setBackgroundColor(colors.white)
  356. mon.setTextColor(colors.black)
  357. mon.setCursorPos((((x/2)-6)/2)+(x/2),14)
  358. mon.write("      ")
  359. if #tostring(vol[4]) % 2 == 1 then
  360. mon.setCursorPos((((x/2)-#tostring(vol[4]))/2-1)+(x/2),14)
  361. else
  362. mon.setCursorPos((((x/2)-#tostring(vol[4]))/2)+(x/2),14)
  363. end
  364. mon.write(vol[4])
  365. mon.setBackgroundColor(colors.white)
  366. objloc.tape[4].speed.down = {(((x/2)-8)/2)+(x/2)-0.5,16}
  367. objloc.tape[4].speed.up = {objloc.tape[4].speed.down[1] + 7,16}
  368. mon.setPaletteColor(colors.yellow,0x7289DA)
  369. mon.setBackgroundColor(colors.yellow)
  370. mon.setTextColor(colors.white)
  371. mon.setCursorPos(objloc.tape[4].speed.down[1],16)
  372. mon.write("\171      \187")
  373. mon.setBackgroundColor(colors.white)
  374. mon.setTextColor(colors.black)
  375. mon.setCursorPos((((x/2)-6)/2+(x/2)),16)
  376. mon.write("      ")
  377. if #tostring(speed[4]) % 2 == 1 then
  378. mon.setCursorPos((((x/2)-#tostring(speed[4]))/2-1)+(x/2),16)
  379. else
  380. mon.setCursorPos((((x/2)-#tostring(speed[4]))/2)+(x/2),16)
  381. end
  382. mon.write(speed[4])
  383. return objloc
  384. end
  385. local currentVolume = {0.5,0.5,0.5,0.5}
  386. local lampStatus = 0
  387. local currentSpeed = {1,1,1,1}
  388. function mainThread()
  389. while true do
  390.     if floor.getSize() then lampConnected = 1 else lampConnected = 0 end
  391.     tape0.setVolume(currentVolume[1])
  392.     tape1.setVolume(currentVolume[2])
  393.     tape2.setVolume(currentVolume[3])
  394.     tape3.setVolume(currentVolume[4])
  395.     tape0.setSpeed(currentSpeed[1])
  396.     tape1.setSpeed(currentSpeed[2])
  397.     tape2.setSpeed(currentSpeed[3])
  398.     tape3.setSpeed(currentSpeed[4])
  399.     local objs = redraw(currentVolume,currentSpeed,lampStatus)
  400.     local tEvent = {os.pullEvent("monitor_touch")}
  401.     local x = tEvent[3]
  402.     local y = tEvent[4]
  403.     if tEvent[2] == "top" then
  404.     for i=1,4 do
  405.         if objs.tape[i].volume.down[1] < x+2  and objs.tape[i].volume.down[1] > x-2  then
  406.             if objs.tape[i].volume.down[2] == y then
  407.                 if currentVolume[i] > 0.10 then
  408.                     currentVolume[i] = currentVolume[i] - 0.05
  409.                     currentVolume[i] = round(currentVolume[i],2)
  410.                 else currentVolume[i] = 0 end
  411.             end
  412.         end
  413.     end
  414.     for i=1,4 do
  415.         if objs.tape[i].volume.up[1] < x+2  and objs.tape[i].volume.up[1] > x-2  then
  416.             if objs.tape[i].volume.up[2] == y then
  417.                 if currentVolume[i] < 0.901 then
  418.                     currentVolume[i] = currentVolume[i] + 0.05
  419.                     currentVolume[i] = round(currentVolume[i],2)
  420.                 else currentVolume[i] = 1 end
  421.             end
  422.         end
  423.     end
  424.     for i=1,4 do
  425.         if objs.tape[i].speed.down[1] < x+2  and objs.tape[i].speed.down[1] > x-2  then
  426.             if objs.tape[i].speed.down[2] == y then
  427.                 if currentSpeed[i] > 0.30 then
  428.                     currentSpeed[i] = currentSpeed[i] - 0.05
  429.                     currentSpeed[i] = round(currentSpeed[i],2)
  430.                 else currentSpeed[i] = 0.25 end
  431.             end
  432.         end
  433.     end
  434.     for i=1,4 do
  435.         if objs.tape[i].speed.up[1] < x+2  and objs.tape[i].speed.up[1] > x-2  then
  436.             if objs.tape[i].speed.up[2] == y then
  437.                 if currentSpeed[i] < 1.90 then
  438.                     currentSpeed[i] = currentSpeed[i] + 0.05
  439.                     currentSpeed[i] = round(currentSpeed[i],2)
  440.                 else currentSpeed[i] = 2 end
  441.             end
  442.         end
  443.     end
  444.     if y == 18 then
  445.         if lampStatus == 0 then lampStatus = 2 elseif lampStatus == 1 then lampStatus = 0 else lampStatus = 1 end
  446.     end
  447.     print("Checking rewind")
  448.     print(x .. " " .. y)
  449.     if x > 2 and x < 6 and y == 4 then rewind(1) end
  450.     if x > 26 and x < 30 and y == 4 then rewind(2) end
  451.     if x > 2 and x < 6 and y == 11 then rewind(3) end
  452.     if x > 26 and x < 30 and y == 11 then rewind(4) end
  453.    
  454.     if x > 2 and x < 6 and y == 5 then pause(1) end
  455.     if x > 26 and x < 30 and y == 5 then pause(2) end
  456.     if x > 2 and x < 6 and y == 12 then pause(3) end
  457.     if x > 26 and x < 30 and y == 12 then pause(4) end
  458.  
  459.  
  460.     if x > 2 and x < 6 and y == 6 then play(1) end
  461.     if x > 26 and x < 30 and y == 6 then play(2) end
  462.     if x > 2 and x < 6 and y == 13 then play(3) end
  463.     if x > 26 and x < 30 and y == 13 then play(4) end
  464.     end
  465. end
  466. end
  467. function lampThread()
  468.     local keklol = math.random(1,20)
  469.     floor.setTextScale(5)
  470.     local lamps = {peripheral.find("colorful_lamp")}
  471. while true do
  472. if lampStatus == 2 and floor.getSize() then
  473.         local w,h = floor.getSize()
  474.         for i=1,math.random((w*h)-(w*h/2),w*h) do
  475.             floor.setCursorPos(math.random(1,w),math.random(1,h))
  476.             floor.setBackgroundColor(2^math.random(0,15))
  477.             floor.write(" ")
  478.         end
  479.         for i=0,15 do
  480.             floor.setPaletteColor(2^i,colors.rgb8(math.random(80,255),math.random(80,255),math.random(80,255)))
  481.         end
  482. end
  483. if lampStatus == 0 and floor.getSize() then
  484.     floor.setPaletteColor(colors.black,0x000000)
  485. floor.setBackgroundColor(colors.black)
  486. floor.clear()
  487. end
  488. sleep(0.5)
  489. end
  490. end
  491. while true do
  492. parallel.waitForAny(function() err["mt"] = {pcall(mainThread)} end, function() err["lt"] = {pcall(lampThread)} end)
  493. print(textutils.serialise(err))
  494. print(pcall(errorReport))
  495. err = {}
  496. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement