Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadApi("Frame.b")
- c = {}
- c.t = {}
- c.c = {}
- c.b = {}
- MaxX,MaxY = 51,19
- local function tT(x,y)
- if x < 100 then
- local a = "0"..x
- elseif x < 10 then
- local a = "00"..x
- else
- local a = x
- end
- if y < 100 then
- a = a.."0"..x
- elseif y < 10 then
- a = a.."00"..x
- else
- a = a..x
- end
- return a
- end
- function import(x,y)
- Frame.b.exportString(x,y)
- c.t[tT(x,y)] = istring:sub(1)
- c.c[tT(x,y)] = istring:sub(2)
- c.b[tT(x,y)] = istring:sub(3)
- istring = nil
- end
- function importArea(x1,y1,x2,y2)
- if x1 > 0 and x1 < x2 and y1 < 0 and y1 < y2 and x2 < MaxX and y2 < MaxY then
- while y1 < y2 + 1 do
- while x1 < x2 + 1 do
- import(x1,y1)
- x1 = x1 + 1
- end
- y1 = y1 + 1
- end
- else
- error("ivalid range")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement