Advertisement
guitarplayer616

hologram

Jan 27th, 2017
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.60 KB | None | 0 0
  1. --[[demo materials used:
  2. *full capacitor bank
  3. *power converter
  4. *capacitor
  5. *computer case T3
  6.     *EEPROM (Lua Bios)
  7.     *Graphics Card T3
  8.     *Redstone Card T2
  9.     *Internet Card
  10.     *CPU T3
  11.     *Memory T3
  12.     *HDD T3
  13.     *Floppy Disk (OpenOS)
  14. *6 Screens T3
  15. *keyboard
  16. *hologram projector
  17. *cables
  18.  
  19. pastebin run hwXs7ptg [optScale 0.33 - 3] ["chicken" or "house"]
  20. default chicken, scale:1
  21. ]]--
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. local fs = require("filesystem")
  29. local component = require("component")
  30. local colors = require("colors")
  31. local hologram = component.hologram
  32. local args = {...}
  33. hologram.clear()
  34. hologram.setScale(tonumber(args[1]) or 1)
  35.  
  36.  
  37. local function colorChanged(prevID,prevData,newID,newData)
  38.     if prevID == newID and prevData == newData then
  39.         return false
  40.     else
  41.         return true
  42.     end
  43. end
  44.  
  45. local function pick(id,data)
  46.     if id then
  47.         if id == 35 then
  48.             if data == 4 then
  49.                 return 1
  50.             elseif data == 0 then
  51.                 return 2
  52.             elseif data == 14 then
  53.                 return 3
  54.             end
  55.         elseif id == 5 then
  56.             return 1
  57.         else
  58.             return 3
  59.         end
  60.     else
  61.         return 3
  62.     end
  63. end
  64.  
  65. if not fs.exists("instructions") then
  66.     shell.execute("pastebin get q9Knia4V instructions")
  67. end
  68. if not fs.exists("instructions2") then
  69.     shell.execute("pastebin get 2z3NSYU5 instructions2")
  70. end
  71. loadfile("instructions")()
  72. loadfile("instructions2")()
  73. --should init instructions
  74. if args[2] == "house" then
  75.     ins = instructions2
  76. else
  77.     ins = instructions
  78. end
  79.  
  80. for k,v in pairs(ins) do
  81.     if k > 0 then
  82.         local prev = ins[k-1] or ins[k]
  83.             hologram.set(prev[2]+20,prev[1]+1,prev[3]+20,1)
  84.         end
  85.     hologram.set(v[2]+20,v[1]+1,v[3]+20,2)
  86.     os.sleep(0)
  87. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement