Module:DragonScript

-- -- DISCLAIMER: Don't use this as lua example, it is my first script so it probably is very bad.

local p = {}

local lut = { ["aa"] = true, ["ah"] = true, ["ei"] = true, ["ey"] = true, ["ii"] = true, ["ir"] = true, ["oo"] = true, ["uu"] = true, ["ur"] = true, }

function parse(s, size, result) if strlen(s) == 0 then return result end if strsub(s, 0, 1) == "_" then result = result .. ""		return parse(strsub(s, 1), size, result) end if strsub(s, 0, 1) == "c" then return parse(strsub(s, 1), size, result) end if lut[strsub(s, 0, 2)] then result = result .. ""		return parse(strsub(s, 2), size, result) end result = result .. ""	return parse(strsub(s, 1), size, result) end

function p.transcribe(frame) local result = '' if(frame.args[2]) then local size = frame.args[2] else local size = "16" end return parse (strlower(frame.args[1]), size, result) end

return p

--