Module:Sandbox/User:Alsang: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 4: Line 4:
local currency = require('Module:Currency')
local currency = require('Module:Currency')
local lang = mw.getContentLanguage()
local lang = mw.getContentLanguage()
local xpdata = mw.loadData('Module:Experience/data')


local p = {}
local p = {}
Line 53: Line 54:
itemNew.duration = activityJSON.duration
itemNew.duration = activityJSON.duration
itemNew.product = activityJSON.output[1].name
itemNew.product = activityJSON.output[1].name
itemNew.XPperHour = itemNew.XP and tonumber(itemNew.XP) and itemNew.duration and tonumber(itemNew.duration) and tonumber(itemNew.XP) * 3600 / tonumber(itemNew.duration)
itemNew.XPperHour = itemNew.XP and tonumber(itemNew.XP) and itemNew.duration and tonumber(itemNew.duration) and tonumber(itemNew.XP) * 3600 / tonumber(itemNew.duration)
itemNew.fitXP = xpdata.knowledge[itemNew.lvl]*4*0.0005
if itemNew.lvl>=200 then
itemNew.fitXP = itemNew.fitXP * 4
end
itemNew.fitXP = math.floor(itemNew.fitXP * 100 ) / 100
table.insert(resultsScreened,itemNew)
table.insert(resultsScreened,itemNew)
end
end
Line 97: Line 106:
:done()
:done()
:tag('th')
:tag('th')
:wikitext('Duration')
:wikitext('0.0005 of levelup XP')
:done()
:tag('th')
:wikitext('XP/hr')
:done()
:done()
-- :tag('th')
-- :wikitext('Duration')
-- :done()
-- :tag('th')
-- :wikitext('XP/hr')
-- :done()
:done()
:done()


Line 124: Line 136:
:done()
:done()
:tag('td')
:tag('td')
:wikitext(item.duration)
:wikitext(item.fitXP)
:done()
:tag('td')
:wikitext(item.XPperHour)
:done()
:done()
-- :tag('td')
-- :wikitext(item.duration)
-- :done()
-- :tag('td')
-- :wikitext(item.XPperHour)
-- :done()


:done()
:done()