Anonymous

Module:MoneyMakingGuide: Difference between revisions

From Melvor Idle
m
Minor fixes
mNo edit summary
m (Minor fixes)
Line 4: Line 4:
local num = require('Module:Number')
local num = require('Module:Number')
local paramtest = require('Module:Shared/Paramtest')
local paramtest = require('Module:Shared/Paramtest')
local itemdb = require('Module:Items')


local MaxDynamicArgs = 20
local MaxDynamicArgs = 20
Line 55: Line 56:
if not paramtest.has_content(pValue) or tonumber(pValue) == nil then
if not paramtest.has_content(pValue) or tonumber(pValue) == nil then
-- Look up value from item module if it's not entered manually?
pValue = itemdb.getItemValue(pName)
pValue = nil
else
else
pValue = tonumber(pValue)
pValue = tonumber(pValue)
Line 91: Line 91:
end
end
table.insert(items, {
table.insert(skills, {
prmNumber = i,
prmNumber = i,
name = pSkill,  
name = pSkill,  
Line 97: Line 97:
end
end
return items
return skills
end
end


Line 110: Line 110:
return tostring(error)
return tostring(error)
end
function p.test()
local args = {
guideName = "",
interval = "",
skills = "",
items = "",
other = "",
skillExp1 = "Magic",
skillExp1amount = "1000",
skillExp2 = "Mining",
skillExp2amount = "420",
input1 = "nature rune",
input1amount = "5",
input1value = "69",
input2 = "Fire Rune",
input2amount = "20",
output1 = "gp",
output1amount = "1050",
category = "",
dlc = "",
intensity = "",
explanation = ""
}
local result = parseItemInOut(args, 'input')
for k, v in pairs(result) do
for a ,b in pairs(v) do
mw.log(a .. '  =  '.. tostring(b))
end
end
end
end


return p
return p
2,875

edits