Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local geo = require("component").geolyzer
- local component = require("component")
- local gpu = component.gpu -- получаем прокси видеокарты
- local w, h = gpu.getResolution()
- --local colors = require("colors")
- local sh = require("shell")
- local keyboard = require("keyboard")
- local event = require("event")
- local _, char, _, _ = event.pull("key_down")
- local args,options = sh.parse(...)
- if not component.isAvailable("geolyzer") then
- --print("This program requires a geolyzer")
- io.stderr:write("This program requires an internet card to run.")
- end
- function clear()
- gpu.setBackground(0x000000)
- gpu.fill(1, 1, w, h, " ") -- очищаем экран
- end
- function _return()
- gpu.setBackground(0x000000)
- gpu.setForeground(0xFFFFFF)
- end
- --print(tostring(w).."x"..tostring(h))
- local tbl = {}
- local color = 0--x00FF00
- local count = 1
- clear()
- print("OpenMaps v. 1.1 (GUI mode)")
- --[[if char==keyboard.keys.c then
- exit()
- end]]--
- --[[if args then
- min = args[1]
- n = args[2]
- else
- min = -16
- n = 16
- end]]--
- for x = -16, 16 do
- for y = -16, 16 do
- if not tbl[x] then
- tbl[x] = {}
- end
- tbl[x][y]=geo.scan(x,y)[24]
- --print(count)
- --count=count+1
- --print(x.." "..y.." "..tostring(geo.scan(x,y)[32]))
- if tbl[x][y]>=99 then
- color = 0x0000FF --blue
- end
- if tbl[x][y]>=1.44 and tbl[x][y]< 99 then
- color = 0x808080 --gray
- end
- if tbl[x][y]>=0.55 and tbl[x][y]<1.44 then
- color = 0x00FF00 --lime
- end
- if tbl[x][y]>=0.44 and tbl[x][y]< 0.55 then
- color = 0xCD853F --peru
- end
- gpu.setBackground(color)
- gpu.set(x+33,y+35," ")
- end
- end
- _return()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement