Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bridge = peripheral.wrap("right")
- function loadimg(startx, starty )
- local img = io.open("hat", "r")
- x = startx
- y = starty
- origx = startx
- while true do
- local line = img:read()
- if line == nil then
- break
- end
- for color in line:gmatch('%S+') do
- if color:len() == 3 then
- newcol = color..color
- else
- newcol = color
- end
- col = tonumber(tostring(newcol),16)
- bridge.addBox(x,y,1,1,col,1)
- x = x + 1
- print("Added "..tostring(newcol).." as "..tostring(col))
- end
- sleep(0.001)
- print("ended for")
- y = y + 1
- x = origx
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement