Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- br=0.1
- delay=0
- file="bild"
- t=peripheral.wrap("top")
- color={}
- color[" "]={0x00,0x00,0xFF}
- color["0"]={0xF0,0xF0,0xF0}
- color["1"]={0xF2,0xB2,0x33}
- color["2"]={0xE5,0x7F,0xD8}
- color["3"]={0x99,0xB2,0xF2}
- color["4"]={0xDE,0xDE,0x6C}
- color["5"]={0x7F,0xCC,0x19}
- color["6"]={0xF2,0xB2,0xCC}
- color["7"]={0x4C,0x4C,0x4C}
- color["8"]={0x99,0x99,0x99}
- color["9"]={0x4C,0x99,0xB2}
- color["a"]={0xB2,0x66,0xE5}
- color["b"]={0x33,0x66,0xCC}
- color["c"]={0x7F,0x66,0x4C}
- color["d"]={0x57,0xA6,0x4E}
- color["e"]={0xCC,0x4C,0x4C}
- color["f"]={0x19,0x19,0x19}
- fp=fs.open(file,"r")
- y=1
- line=1
- while line~=nil do
- line=fp.readLine()
- if line~=nil then
- for i=1,#line do
- t.setGeneratorProperty("spawn_x",i*br)
- t.setGeneratorProperty("spawn_z",y*br)
- t.setGeneratorProperty("red",color[string.sub(line,i,i)][1])
- t.setGeneratorProperty("green",color[string.sub(line,i,i)][2])
- t.setGeneratorProperty("blue",color[string.sub(line,i,i)][3])
- sleep(delay)
- end
- end
- y=y+1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement