Closed lamo2k123 closed 7 years ago
I got maps and land sorta working (for UOP files only).
You should be able to clone it and check it out:
If you have any suggestions, let me know and I'll fix them :)
but what about getting json list of tiles?
You'll need to call JSON.stringify on map.getLandBlock.
Right now, getLandBlock still returns Array(64) of tile IDs and Z.
// load map block:
const felucca = new uodatareader.Map({
baseDirectory: '../tmp/uo',
mapId: 0
});
const area = felucca.getLandBlock(1, 1);
console.log(area);
It takes arguments: Id:
Number
// Map ID x:Number
// Real character position X (NO need to divide by the number of tiles on the block axis X) y:Number
// Real character position Y (NO need to divide by the number of tiles on the block axis Y) size:Number
// size of the return unit type:String
// return type of blockmethod return: Array
Later, I will write a more detailed description