FANDOM


-- This is VERSION 2 which is used beginning with Episode 2-110.
--
-- This module needs to be updated every Monday when the new Naver episode is released
-- and every Tuesday when the new LINE episode is released.
-- 
-- How webtoon numbering for Naver/LINE is calculated here (both are numbered the same):
-- Season 1 Prologue (Episode 0): 1
-- Episodes 1 thru 32: episode # + 1
-- Episodes 33 thru 50: episode # + 2
-- Episodes 51 thru 68: episode # + 3
-- Episodes 69 thru 100: episode # + 4
-- Season 2 Prologue (Episode 2-0): 106
-- Episodes 2-1 thru 2-50: episode # + 106
-- Episodes 2-51 thru 2-100: episode # + 107
-- 
-- Overlays: They are available for the following episodes:
-- (soon: 1-15 thru ?)
-- 2-97 thru current Korean episode
-- 
local NAVER_MAX = 220   -- Update this on Mondays - number at end of link of most recent episode
local LINE_MAX  = 24    -- Update this on Tuesdays - number at end of link of most recent episode
local CURRENT_EP = 111  -- Update this when a new overlay is released for the latest episode
 
local p = {}
 
function p.GetNumber( frame )
	local site = frame.args[1]
	local season = frame.args[2]
	local episode = frame.args[3]
	local LinkNumber = 0
	local LinkTxt = "Something went wrong."
 
	-- Calculate the link number.
	episode = tonumber( episode )
	if (season == "1") then
		if (episode <= 32) then LinkNumber = episode + 1
		elseif (episode <= 50) then LinkNumber = episode + 2
		elseif (episode <= 68) then LinkNumber = episode + 3
		else LinkNumber = episode + 4
		end
	elseif (season == "2") then
		if (episode <= 50) then LinkNumber = episode + 106
		elseif (episode <= 100) then LinkNumber = episode + 107
		else LinkNumber = episode + 108
		end
	end
 
	-- Return Naver link
	if (site == "naver") then
		if (LinkNumber <= NAVER_MAX) then
			LinkTxt = "View on [http://comic.naver.com/webtoon/detail.nhn?titleId=131385&no=" .. LinkNumber .. " naver.com] (Korean)"
			-- Overlay available?
			if (episode >= 97) and (episode <= CURRENT_EP) then
				LinkTxt = LinkTxt .. " - [[Overlay_translations|English overlay]] available"
			end
		else
			LinkTxt = "Not yet available on [http://comic.naver.com/webtoon/list.nhn?titleId=131385 naver.com] (Korean)"
		end
	-- Return LINE link
	elseif (site == "line") then
		if (LinkNumber <= LINE_MAX) then
			LinkTxt = "View on [http://webtoons.com/viewer?titleNo=83&episodeNo=" .. LinkNumber .. " LINE Webtoon] (English)"
		else
			LinkTxt = "Not yet available on [http://webtoons.com/episodeList?titleNo=83 LINE Webtoon] (English)"
		end
	end
	return LinkTxt
end
 
return p

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.