I use multiple Iteminfo, I have tried all way but it doesn't work
Iteminfo 1 (main):
dofile("nplconfig.lub")
tbl_custom = {
[501] = {
unidentifiedDisplayName = "Bình thuốc đỏ",
unidentifiedResourceName = "501",
unidentifiedDescriptionName = {
},
identifiedDisplayName = "Bình thuốc đỏ",
identifiedResourceName = "501",
identifiedDescriptionName = {
"Lọ thuốc làm từ thảo dược đỏ.",
"^FFFFFF_^000000",
"Loại:^0000FF Hồi phục^000000",
"Hồi phục:^006600 45 ~ 65^000000 HP",
"Trọng lượng:^006600 7^000000",
},
slotCount = 0,
ClassNum = 0
},
}
function itemAdder(curTable, refTable)
for ItemID,DESC in pairs(curTable) do
if refTable == nil or refTable[ItemID] == nil then
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
end
return true, "good"
end
-- And the newly designed main function
function main()
result, msg = itemAdder(tbl_custom, nil) -- add custom items (including official overrides)
if result then
result, msg = itemAdder(tbl, tbl_custom) -- add non-overridden official items
end
return result, msg
end
Iteminfo 2:
tbl = {
[1809] = {
unidentifiedDisplayName = "Claw",
unidentifiedResourceName = "바그낙",
unidentifiedDescriptionName = {
"Unknown Item, can be identified by using a ^6666CCMagnifier^000000."
},
identifiedDisplayName = "Claw",
identifiedResourceName = "크로",
identifiedDescriptionName = {
"A weapon with three long steel claws that have proven effective in close combat.",
"-------------------------",
"STR +2",
"-------------------------",
"Class:^6666CC Claw^000000",
"Attack:^CC0000 86^000000",
"Weight:^009900 50^000000",
"Weapon Level:^009900 3^000000",
"Level Requirement:^009900 24^000000",
"Jobs:^6666CC Priest and Monk^000000"
},
slotCount = 1,
ClassNum = 82
},
}
function main()
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