Advertisement
Guest User

s

a guest
Nov 12th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.14 KB | None | 0 0
  1. local component = require("component")
  2. local x1,x2,xn,y1,y2,yn,z1,z2,zn
  3.  
  4. component.hologram.clear()
  5. function start()
  6. --------------------------------------------------
  7. x1=5
  8. y1=5
  9. z1=5
  10. x2=-5
  11. y2=-5
  12. z2=-5
  13. --------------------------------------------------
  14. xn=1+x1+math.abs(x2)
  15. yn=1+y1+math.abs(y2)
  16. zn=1+z1+math.abs(z2)
  17. holoprint(x1,y1,z1,x2,y2,z2)
  18. end
  19.  
  20.  
  21.  
  22. function holoprint(cx1,cy1,cz1,cx2,cy2,cz2)
  23.   local xnn=xn
  24.   for x=cx1,cx2,-1 do
  25.     local znn=zn
  26.     for z=cz1,cz2,-1 do
  27.       local ynn=yn
  28.       for y=cy1,cy2,-1 do
  29.         component.gpu.set(1,1,x .. "  ")
  30.         component.gpu.set(1,2,y .. "  ")
  31.         component.gpu.set(1,3,z .. "  ")
  32.         local block = component.geolyzer.scan(x,z,y,1,1,1)[1]  
  33.         if block > 0 then
  34.           component.gpu.set(1,4,"true     ")
  35.           holo(xnn,ynn,znn,true)
  36.         else
  37.           component.gpu.set(1,4,"false     ")
  38.           holo(xnn,ynn,znn,false)
  39.         end
  40.         ynn=ynn-1
  41.       end
  42.       znn=znn-1
  43.     end
  44.     xnn=xnn-1
  45.   end
  46. end
  47. function holo(x,y,z,value)
  48.   component.gpu.set(5,1,x .. "  ")
  49.   component.gpu.set(5,2,y .. "  ")
  50.   component.gpu.set(5,3,z .. "  ")
  51.   component.hologram.set(x,y,z,value)
  52. end
  53. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement