Files

> > CS2D > Lua Scripts > [OR] Get Map Data 2.0
Files overviewCS2D overviewLua Scripts overview

English [OR] Get Map Data 2.0 >

14 comments4 kb, 447 Downloads

old [OR] Get Map Data 2.0

Dousea
User Off Offline

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

> Updates
Update 2.0 - 06.17.2017 >

Update 1.2b - 06.28.2016 >

Update 1.2 - 12.15.2015 >

Update 1.1 - 08.07.2015 >


flame Usage
Gets all possible data from a map.
1
local getmapdata = require("path/to/mapdata")("path/to/map.map")
Example:
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
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

spam Documentation
Documentation is available in readme.txt.

illegal 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.

off-topic Installation
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
Approved by Seekay

Download Download

4 kb, 447 Downloads

Comments

14 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

RequieM52
User Off Offline

Great
I like it!

old

GeoB99
Moderator Off Offline

Great work, pretty useful!
I like it!

old

lilyagirl123
User Off Offline

Ey, I'm indonesia too :D. I liked your script! 10/5
I like it!
edited 1×, last 16.12.16 11:14:25 am

old

kerker
User Off Offline

Nice!
I like it!

old

Hajt
User Off Offline

That's what I'm looking for
I like it!

old

Nekomata
User Off Offline

Cool.
I like it!

old

muxarus
User Off Offline

nice!
I like it!

old

Dousea
User Off Offline

Thanks everyone, and of course the downloads. And user DaisukeOno, yes, I'm Indonesian.

old

xXxProxXx
BANNED Off Offline

Good job
I like it!

old

DaisukeOno
User Off Offline

Great, you are Indonesian too ? user Dousea
I like it!

old

BcY
Reviewer Off Offline

Thanks @user Dousea ,i think it'll be pretty useful for me.
I like it!

old

Dousea
User Off Offline

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

old

VADemon
User Off Offline

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.
I like it!

old

lennon
User Off Offline

Well i think its non sense program, itz good but...i dont care about this things more than half of them are usless
Like for work
I like it!
To the start Previous 1 Next To the start