Map tiles return method
Closed this issue · 4 comments
lamo2k123 commented
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 block
method return: Array
Later, I will write a more detailed description
kevinhikaruevans commented
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 :)
lamo2k123 commented
but what about getting json list of tiles?
kevinhikaruevans commented
You'll need to call JSON.stringify on map.getLandBlock.
Right now, getLandBlock still returns Array(64) of tile IDs and Z.
kevinhikaruevans commented
// load map block:
const felucca = new uodatareader.Map({
baseDirectory: '../tmp/uo',
mapId: 0
});
const area = felucca.getLandBlock(1, 1);
console.log(area);