• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

Sparta252 Mar 22nd, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1.  tArgs = {...}
2.
3. sustava = {
4. {1,2,3,4,5,6,7,8,9,0, colors.lime}, --[1][x]
5. {1,2,3,4,5,6,7,8,9,0, colors.red},  --[2][x]
6. {1,2,3,4,5,6,7,8,9,0, colors.magenta}, --[3][x]
7. {1,2,3,4,5,6,7,8,9,0, colors.yellow}, -- [4][x]
8. {1,2,3,4,5,6,7,8,9,0, colors.gray},
9. }
10.
11. m = peripheral.wrap("right")
12.
13. x, y = 1000, 1000
14.
15. repeat
16.
17. m.setBackgroundColor(colors.lightGray)
18. m.clear()
19.
20.  m.setBackgroundColor(colors.blue)
21.  m.setCursorPos(x, y)
22.  m.write(" ")
23.  m.setBackgroundColor(colors.lightGray)
24.
25. m.setCursorPos(1, 1)
26. w, h = m.getSize()
27.
28. stability = {0, 10, 20, 30, 40}
29.
30. for loop=1, 2 do
31.  for k,v in pairs(sustava) do
32.    m.setTextColor(sustava[k][11])
33.   for i,p in pairs(v) do
34.    if i < 11 then
35.     if loop == 2 then
36.      m.setCursorPos(1, i+stability[k])
37.     end
38.      if (i+stability[k]) == y and loop == 2 then
39.       m.setBackgroundColor(colors.lightBlue)
40.      end
41.      if (i+stability[k]) == x and loop == 1 then
42.       m.setBackgroundColor(colors.lightBlue)
43.      end
44.      m.write(tostring(math.ceil(p)))
45.      m.setBackgroundColor(colors.lightGray)
46.    end
47.   end
48.  end
49. end
50.
51. m.setCursorPos(26, h)
52. m.write(" "..x.." "..y)
53.
54.
55. _, _, x, y = os.pullEvent("monitor_touch")
56.
57. m.setCursorPos(26, h)
58. m.write(" "..x.." "..y)
59.
60. x, y = tonumber(x), tonumber(y)
61.
62. sleep(0)
63. if #tArgs > 0 then
64.  break
65. end
66. until nil
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top