ferel

Untitled

Aug 29th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. com = require("component")
  2. geo = require("component").geolyzer
  3. holo = require("component").hologram
  4. term = require("term")
  5. event = require("event")
  6.  
  7. term.clear()
  8.  
  9. print("Введите ширину")
  10. local xdata = io.read()
  11.  
  12. print("Введите длину")
  13. local zdata = io.read()
  14.  
  15. print("Нажмите на экран чтобы начать сканирование")
  16. event.pull("touch")
  17. print"Сканирую..."
  18.  
  19. for z = 1,zdata do
  20.  
  21. for x = 1,xdata do
  22. data = geo.scan(x,z)
  23.  
  24. for g = 33,64 do
  25. local y = data[g]
  26.  
  27. if y > 0 then
  28. holo.set(x,g-32,z,2)
  29. end
  30. end
  31. end
  32. end
Add Comment
Please, Sign In to add comment