View source for Module:SS Coin
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
local p = {}
function p.getCharacterIDs(frame)
local characterName = frame.args[1] -- The character name to search for
if not characterName or characterName == '' then
return "No character name provided." -- Return a message if no character name is given
end
local data = mw.loadJsonData('JoJo Wiki:SS Medals')
local matches = {}
-- Collect all entries that match the character name along with their rarity
for id, entry in pairs(data) do
local characters = entry.character
if type(characters) == "table" then
for _, name in ipairs(characters) do
if name == characterName then
table.insert(matches, {id = id, rarity = entry.rarity})
break
end
end
elseif type(characters) == "string" and characters == characterName then
000
1:0
Template used on this page:
Return to Module:SS Coin.