-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPARSE_ITEMINFO.lua
29 lines (24 loc) · 938 Bytes
/
PARSE_ITEMINFO.lua
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
27
28
29
require("iteminfo")
require("ParserUtils")
items = io.open("items.txt", "w")
itemsdescriptions = io.open("itemsdescriptions.txt", "w")
itemslotcounttable = io.open("itemslotcounttable.txt", "w")
for ItemID, DESC in pairsByKeys(tbl) do
if next(DESC.identifiedDescriptionName) ~= nil then
local itemsString = ItemID .. "#" .. DESC.identifiedDisplayName .. "#\n"
local itemsdescriptionsString = ItemID .. "#\n"
local itemslotcounttableString = ItemID .. "#" .. DESC.slotCount .. "#\n"
for i, desc in ipairs(DESC.identifiedDescriptionName) do
itemsdescriptionsString = itemsdescriptionsString .. desc .. "\n"
end
itemsdescriptionsString = itemsdescriptionsString .. "#\n"
items:write(itemsString)
itemsdescriptions:write(itemsdescriptionsString)
if (DESC.slotCount > 0) then
itemslotcounttable:write(itemslotcounttableString)
end
end
end
items:close()
itemsdescriptions:close()
itemslotcounttable:close()