(Created page with "local p = {} local cargo = mw.ext.cargo function p.textToZonaiRunes(frame) local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame); local phrase = args[1] local result = "" for i = 1, #phrase do local c = str:sub(i,i) local queryFields = 'cipherCharacter=cipherCharacter,imageName=imageName' local args = { format = 'table', limit = 1 } local results = cargo.query(...") |
No edit summary |
||
Line 9: | Line 9: | ||
local result = "" | local result = "" | ||
for i = 1, #phrase do | for i = 1, #phrase do | ||
local c = | local c = phrase:sub(i,i) | ||
local queryFields = 'cipherCharacter=cipherCharacter,imageName=imageName' | local queryFields = 'cipherCharacter=cipherCharacter,imageName=imageName' | ||
local args = { | local args = { |
Revision as of 11:19, 28 December 2023
Documentation for this module may be created at Module:TextToZonaiRunes/doc
local p = {} local cargo = mw.ext.cargo function p.textToZonaiRunes(frame) local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame); local phrase = args[1] local result = "" for i = 1, #phrase do local c = phrase:sub(i,i) local queryFields = 'cipherCharacter=cipherCharacter,imageName=imageName' local args = { format = 'table', limit = 1 } local results = cargo.query("ZonaiRunes", queryFields, args) for r = 1, #results do local result = results[r] result = result .. string.format("[[%s]]", result.imageName) end end return result end return p