Advertisement
Azgarok

Untitled

Dec 18th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local f = io.open("map/r.0.0.mcr", "rb")
  2. local content = f:read("*all")
  3. chunks={}
  4. for x=0,31 do
  5.     chunks[x]={}
  6.     for z=0,31 do
  7.         local pos=4*(x%32+4*(z%32))
  8.         local posStr=content:sub(pos,pos+4)
  9.         chunks[x][z]={}
  10.         chunks[x][z].posStr=posStr
  11.        
  12.         local offset=--[[???]]--*4*1024
  13.         local leng=--[[???]]--*4*1024
  14.         chunks[x][z].data=content:sub(offset,leng)
  15.         print(x,z,chunks[x][z].posStr,offset,leng,chunks[x][z].data)
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement