FANDOM


-- This module was taken and adapted from the Kubera Wiki & Bastard Wiki
-- 
-- 
-- 
-- This module needs to be updated every Thursday when the new Naver and LINE chapters are released.
--
-- How webtoon numbering for LINE is calculated:
-- Season 1 Episodes 1 : 1
-- Episodes 181 : episode #  1
-- Episode 180: -
-- Season 2 Prologue (Episode 2-0): 80
-- Episodes 2-1 to 2-140: episode # + 80
-- Episodes 2-141 onwards: episode # + 81
--
--
 
local p = {}
 
function p.GetNumber( frame )
    local LATEST_WEBTOONS = 361 -- Update this on Sundays - most recent chapter #
    local site = frame.args[1]
    local anchor = frame.args[2]
    local chapter = frame.args[3]
    local LinkNumber = 0
    local LinkTxt = "Something went wrong."
 
    -- Get the link number.
    chapter = tonumber( chapter )
 
    -- Return LINE link
    if (site == "line") then
        if (anchor == "1") then
	    	if (chapter <= 35) then LinkNumber = chapter + 1
    		else LinkNumber = chapter + 2
    		end
    	end
        if (chapter <= LATEST_WEBTOONS) then
            LinkTxt = "[http://webtoons.com/viewer?title_no=70&episodeNo=" .. LinkNumber .. " LINE]"
        else
            LinkTxt = "Not yet available on [http://webtoons.com/episodeList?titleNo=679 LINE]"
        end
    end
    return LinkTxt
end
 
return p
--[[Category:Lua modules]]

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.