Originally Posted by atl77
I'll try to find a better algorythm, until then you can use this one (JS, v8, node.js or io.js), outputs lua array:
Code:
// coords/zoneid are from wowhead
var coords = [[61.8,75.8],[62.2,78],[62.4,77.2],[62.8,76.2],[62.8,76.6],[63,78.6],[63.2,78],[63.6,76.4],[63.6,76.6],[63.6,77.6],[64.2,79.4],[64.4,79.6],[64.6,80.4],[64.8,78],[65,79]],
zoneid = 5785;
function coords2lua(coords, zoneid) {
var boxes = [];
for (var i = 0; i < coords.length; i++) {
boxes.push('"nil|' + zoneid + '|35|' + (coords[i][0] - 0.5).toFixed(1) + '|' + (coords[i][1] - 0.5).toFixed(1) + '|1|1"');
}
return '{\n' + boxes.join(',\n') + '\n}'
}
coords2lua(coords, zoneid)
It will currently only copy the dots instead of creating filled areas, but that's all I have at the moment that works as intended. It may be a good starting point.
|
I have allready done this... I only need algoritm to make those heights and widths fill area. Maybe ill figure it my self but i need more time.
I have question for u
Rythal is there some funcion/table to convert realmapids (like they are from wowhead) to carbonite map ids? Or i have to do it by name + continent?