모듈:Tcartprice 문서 원본 보기
←
모듈:Tcartprice
둘러보기로 가기
검색하러 가기
문서 편집 권한이 없습니다. 다음 이유를 확인해주세요:
요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다:
사용자
.
모듈
이름공간의 문서를 편집할 권한이 없습니다.
문서의 원본을 보거나 복사할 수 있습니다.
local p = {} function p.tprice(frame) local price = frame.args["price"] local separator = frame.args["separator"] local gold = frame.args["gold"] local space = string.lower(frame.args["spacearoundseparator"]) local ulang = string.upper(mw.language.getContentLanguage():getCode()) local formattedprice = "[[File:Gold.png|18px|link=]]" if (string.lower(price) == "furniture") then formattedprice = formattedprice .. "250" if space == "true" then formattedprice = formattedprice .. " " .. separator .. " " else formattedprice = formattedprice .. separator end if (ulang ~= "ES") then formattedprice = formattedprice .. tostring(mw.language.getContentLanguage():formatNum(2500)) else formattedprice = formattedprice .. "2.500" end else local lowprice = tonumber(price) * 3 local highprice = tonumber(price) * 5 local fmlowprice = tostring(mw.language.getContentLanguage():formatNum(lowprice)) local fmhighprice = tostring(mw.language.getContentLanguage():formatNum(highprice)) if (lowprice <= 100) then formattedprice = formattedprice .. "100" elseif (ulang ~= "ES") then formattedprice = formattedprice .. fmlowprice else --Spanish if (lowprice < 1000) then formattedprice = formattedprice .. fmlowprice elseif (lowprice < 10000) then local length = #(fmlowprice) local temp = string.sub(fmlowprice, -3) formattedprice = formattedprice .. string.sub(fmlowprice, 1, (length-3)) .. "." .. temp else local temp = {mw.ustring.gsub(tostring(fmlowprice), "%s" , ".")} formattedprice = formattedprice .. temp[1] end end if space == "true" then formattedprice = formattedprice .. " " .. separator .. " " else formattedprice = formattedprice .. separator end if (highprice <= 1000) then if (ulang ~= "ES") then formattedprice = formattedprice .. tostring(mw.language.getContentLanguage():formatNum(1000)) else formattedprice = formattedprice .. "1.000" end elseif (ulang ~= "ES") then formattedprice = formattedprice .. fmhighprice else --Spanish and highprice > 1000 if (highprice < 10000) then local length = #(fmhighprice) local temp = string.sub(fmhighprice, -3) formattedprice = formattedprice .. string.sub(fmhighprice, 1, (length-3)) .. "." .. temp else local temp = {mw.ustring.gsub(tostring(fmhighprice), "%s" , ".")} formattedprice = formattedprice .. temp[1] end end end return formattedprice .. gold end return p
이 문서에서 사용한 틀:
모듈:Tcartprice/설명문서
(
원본 보기
)
모듈:Tcartprice
문서로 돌아갑니다.
둘러보기 메뉴
개인 도구
계정 만들기
로그인
이름공간
모듈
토론
변수
보기
읽기
원본 보기
역사 보기
더 보기
검색
둘러보기
대문
최근 바뀜
번역되지 않은 페이지
도움말:편집
임의의 문서로
공식 링크
공식 사이트
공식 포럼
공식 관련 상품
Discord
Reddit
도구
여기를 가리키는 문서
가리키는 글의 최근 바뀜
파일 올리기
특수 문서 목록
문서 정보