Module:Sunken Treasure/Loot Rates/Sand: Difference between revisions

m
I don't know how to Scribunto
m (Json file not web page)
m (I don't know how to Scribunto)
Line 1: Line 1:
mw.ext.externaldata.getWebData {
-- modified from https://strategywiki.org/wiki/Module:WikiList
url = "https://raw.githubusercontent.com/Gamemode4Dev/GM4_Datapacks/refs/heads/master/gm4_sunken_treasure/data/gm4_sunken_treasure/loot_table/chests/treasure_chest.json"
 
  , data = "type=Type,pool=Pool"
local p = {}
  , format = "JSON with JSONpath"
 
}
function p._format ( refList )
return refList
end
 
function p.wikiTable( frame )
local data = mw.ext.externaldata.getWebData {
url = "https://raw.githubusercontent.com/Gamemode4Dev/GM4_Datapacks/refs/heads/master/gm4_sunken_treasure/data/gm4_sunken_treasure/loot_table/chests/treasure_chest.json"
  , data = "json=_json"
}
local reflist = {}
for _, wikiData in pairs(data["json"]) do
mw.logObject(wikiData[type])
table.insert(refList, { type = wikiData["type"], pool = wikiData["pool"]})
end
return p._format( refList )
end
 
return p
Bureaucrats, Check users, emailconfirmed, Interface administrators, staff, Administrators, translation-admin, Widget editors
1,676

edits