Update 1.1: Now split up into a print function and a get function for better user-friendliness.
To use it, you can download the file from Dropbox and put it in your LuaScriptsLib folder. Then, load it as follows:
Code: Select all
local groupings = API.load("groupings");
Code: Select all
groupings.get(layer);
For example:
Code: Select all
local groupings = API.load("groupings");
local defaultLayer = Layer(0); --the default layer
groupings.get(defaultLayer);
Code: Select all
outputData Block: {ID, x, y}, {ID, x, y}, {ID, x, y},... BGO: {ID, x, y}, {ID, x, y}, {ID, x, y},... NPC: {ID, x, y}, {ID, x, y}, {ID, x, y},..
Code: Select all
local groupings = API.load("groupings");
local defaultLayer = Layer(0); --the default layer
function onStart()
local _, _, _, npcData = groupings.get(defaultLayer);
end
Here's a look at the print function:
Code: Select all
groupings.get(layer, clearLast);
clearLast: The boolean value as to whether or not the previous data in the file should be erased (optional, default: true)
For example:
Code: Select all
local groupings = API.load("groupings");
local defaultLayer = Layer(0); --the default layer
function onStart()
groupings.print(defaultLayer);
end