Editing Module:ForagerList
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
local lang = mw.getContentLanguage() |
local lang = mw.getContentLanguage() |
||
local plist = require('Module:ProfessionList') |
local plist = require('Module:ProfessionList') |
||
local |
local rts = require('Module:RecipeTreeSearch') |
||
local p = {} |
local p = {} |
||
-- non dynamic module, no |
-- non dynamic module, no inputs |
||
function p.main() |
function p.main() |
||
Line 40: | Line 40: | ||
-- downtime is very important for gathering-type professions |
-- downtime is very important for gathering-type professions |
||
-- initial values, it will be obvious if these get used |
-- initial values, it will be obvious if these get used |
||
item. |
item.downtime = 10000 |
||
item. |
item.nodes = 1 |
||
-- these numbers are |
-- these numbers are based roughly on how far the nodes are from a storage rift or shop or bank |
||
-- 20s per room to traverse |
|||
-- duration and relocation times arent used for fisher, only respawn time and number of nodes |
|||
if string.find(item.pageName,'Kelp') then |
if string.find(item.pageName,'Kelp') then |
||
item. |
item.downtime = 20 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Wallplant') then |
elseif string.find(item.pageName,'Wallplant') then |
||
item. |
item.downtime = 40 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Periwinkle') then |
elseif string.find(item.pageName,'Periwinkle') then |
||
item. |
item.downtime = 40 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Shell') then |
elseif string.find(item.pageName,'Shell') then |
||
item. |
item.downtime = 20 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Potato') then |
elseif string.find(item.pageName,'Potato') then |
||
item. |
item.downtime = 80 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Pond Weed') then |
elseif string.find(item.pageName,'Pond Weed') then |
||
item. |
item.downtime = 40 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Bellplant') then |
elseif string.find(item.pageName,'Bellplant') then |
||
item. |
item.downtime = 40 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Monument Piece') then |
elseif string.find(item.pageName,'Monument Piece') then |
||
item. |
item.downtime = 20 |
||
item. |
item.nodes = 8 |
||
elseif string.find(item.pageName,'Water Lily') then |
elseif string.find(item.pageName,'Water Lily') then |
||
item. |
item.downtime = 40 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Starfish') then |
elseif string.find(item.pageName,'Starfish') then |
||
item. |
item.downtime = 60 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Hogberries') then |
elseif string.find(item.pageName,'Hogberries') then |
||
item. |
item.downtime = 80 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Limpet') then |
elseif string.find(item.pageName,'Limpet') then |
||
item. |
item.downtime = 100 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Nettle') then |
elseif string.find(item.pageName,'Nettle') then |
||
item. |
item.downtime = 20 |
||
item. |
item.nodes = 6 |
||
elseif string.find(item.pageName,'Wrack') then |
elseif string.find(item.pageName,'Wrack') then |
||
item. |
item.downtime = 80 |
||
item. |
item.nodes = 6 |
||
end |
end |
||
-- profitability |
-- profitability |
||
item.profit = item.sellPrice |
item.profit = item.sellPrice |
||
-- products per hour |
|||
item.batch = 24 |
|||
item.durationEffective = item.duration and item.respawn and item.duration + item.respawn / item.nodes |
|||
item.productPerHour = item.durationEffective and math.floor(1 / (item.durationEffective + item.downtime / item.batch) * 3600) |
|||
item.productPerHourDropping = item.durationEffective and 1 / (item.durationEffective) * 3600 |
|||
-- properties per hour |
-- properties per hour |
||
Line 110: | Line 118: | ||
local out = mw.html.create('table') |
local out = mw.html.create('table') |
||
:addClass('wikitable sortable') |
:addClass('wikitable sortable') |
||
:tag('caption') |
|||
:wikitext('This list is updated dynamically. '..purge()) |
|||
:done() |
|||
:tag('tr') |
:tag('tr') |
||
:tag('th') |
:tag('th') |