Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local directory = [[D:\OneDrive\OTS\Serwer\silnik\data\monster]]
- local monsters = {}
- for file in io.popen('dir "'..directory..'" /a /b /s'):lines() do
- local m = file:match("/([%a%s]*)%.xml")
- if m then
- print(m)
- local f = io.open(file)
- local str = f:read("*a")
- local m2 = str:match("name=\"[(%a%s)*]\"")
- if m2 then
- monsters[#monsters+1] = m2
- end
- f:close()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement