[OR] Get Map Data 2.0 
14 comments ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Updates
Usage
Gets all possible data from a map.
Example:
Documentation
Documentation is available in readme.txt.
Rules
• You are allowed to use this script in your server.
• You are allowed to edit this script for your server.
• You are not allowed to copy any part of this script without permission.
• You are not allowed to say this script is yours.
Installation
1. Download the file and then extract it anywhere.
2. Connect your script with this script using
3. Get your desired map data!
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬


Gets all possible data from a map.
Code:
1
local getmapdata = require("path/to/mapdata")("path/to/map.map")
Example:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local getmapdata = require 'mapdata'
local map = getmapdata 'maps/de_dust2_new.map'
print('author: ' .. map 'author' .. ' (#' .. map 'author_usgn' .. ')')
print('use modifiers: ' .. tostring(map 'modifiers'))
print('size: ' .. map 'width' .. ' x ' .. map 'height')
for i = 0, map 'tile_count' do
print('tileset frame #' .. i .. ' = ' .. map('tile_mode', i))
end
for x = 0, map 'width' do
for y = 0, map 'height' do
if (map('tile', x, y, 'rot') > 0) then
print('tile ' .. x .. '|' .. y .. ' has unusual rotation')
end
end
end
for i = 1, map 'entity_count' do
for j = 1, 10 do
if (#map('entity', i, 'setting')[j][2] > 0) then
print('entity at ' .. map('entity', i, 'x') .. '|' .. map('entity', i, 'y') .. ' has different setting')
end
end
end
local map = getmapdata 'maps/de_dust2_new.map'
print('author: ' .. map 'author' .. ' (#' .. map 'author_usgn' .. ')')
print('use modifiers: ' .. tostring(map 'modifiers'))
print('size: ' .. map 'width' .. ' x ' .. map 'height')
for i = 0, map 'tile_count' do
print('tileset frame #' .. i .. ' = ' .. map('tile_mode', i))
end
for x = 0, map 'width' do
for y = 0, map 'height' do
if (map('tile', x, y, 'rot') > 0) then
print('tile ' .. x .. '|' .. y .. ' has unusual rotation')
end
end
end
for i = 1, map 'entity_count' do
for j = 1, 10 do
if (#map('entity', i, 'setting')[j][2] > 0) then
print('entity at ' .. map('entity', i, 'x') .. '|' .. map('entity', i, 'y') .. ' has different setting')
end
end
end

Documentation is available in readme.txt.

• You are allowed to use this script in your server.
• You are allowed to edit this script for your server.
• You are not allowed to copy any part of this script without permission.
• You are not allowed to say this script is yours.

1. Download the file and then extract it anywhere.
2. Connect your script with this script using
require
.3. Get your desired map data!
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
edited 16×, last 19.06.17 05:19:55 pm

Comments
14 comments



Log in!
You need to log in to be able to write comments!Log in
Thanks everyone, and of course the downloads. And
DaisukeOno, yes, I'm Indonesian.

There you go. Also you can find the documentation in readme file which is lot better and nicer to read as well.

It's awesome! Though please, put everything in the description under one spoiler! It's a pain to click on every single one especially if someone is going to work with this script daily.



