Here is an example of how the entries on the files look like:
Code: Select all
tbl = {
--Yggdrasil Custom Vending
[30000] = {
unidentifiedDisplayName = "Zeny ",
unidentifiedResourceName = "¹Ì½º¸±È",
unidentifiedDescriptionName = {
"Used for Vending",
"^ffffff_^000000",
"Weight :^777777 7^000000",
},
identifiedDisplayName = "Zeny ",
identifiedResourceName = "¹Ì½º¸±È",
identifiedDescriptionName = {
"Used for Vending",
"^ffffff_^000000",
"Weight :^777777 7^000000",
},
slotCount = 0,
ClassNum = 0,
},
[30001] = {
unidentifiedDisplayName = "Cash",
unidentifiedResourceName = "¹Ì½º¸±È",
unidentifiedDescriptionName = {
"Used for Vending",
"^ffffff_^000000",
"Weight :^777777 7^000000",
},
identifiedDisplayName = "Cash",
identifiedResourceName = "¹Ì½º¸±È",
"A potion made from ground Red Herbs that restores ^000088about 45 HP^000000.",
identifiedDescriptionName = {
"^ffffff_^000000",
"Weight :^777777 7^000000",
},
slotCount = 0,
ClassNum = 0,
},
[4402] = {
unidentifiedDisplayName = "Aliot Card",
unidentifiedResourceName = "À̸§¾ø´ÂÄ«µå",
unidentifiedDescriptionName = {
"When equipped by",
"Swordman, Merchant,",
"and Thief class",
"characters, this card",
"adds STR +2 and",
"Max HP +5%. When",
"equipped by Archer",
"class characters, this",
"card adds INT +2",
"and Max SP +5%.",
"Item Class: ^777777Card^000000",
"Compound on: ^777777Garment^000000",
"Weight: ^7777771^000000",
},
[32710] = {
unidentifiedDisplayName = "",
unidentifiedResourceName = "µðÁöÅÐÀÎȱÇ",
unidentifiedDescriptionName = {
},
identifiedDisplayName = "Ticket Smokie",
identifiedResourceName = "µðÁöÅÐÀÎȱÇ",
identifiedDescriptionName = {
},
slotCount = 0,
ClassNum = 0
},
}
main = function()
for ItemID,DESC in pairs(tbl) do
result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum)
if not result then
return false, msg
end
for k,v in pairs(DESC.unidentifiedDescriptionName) do
result, msg = AddItemUnidentifiedDesc(ItemID, v)
if not result then
return false, msg
end
end
for k,v in pairs(DESC.identifiedDescriptionName) do
result, msg = AddItemIdentifiedDesc(ItemID, v)
if not result then
return false, msg
end
end
end
return true, "good"
end