4,951
edits
Falterfire (talk | contribs) (right-aligning some text in the Superheat table) |
Falterfire (talk | contribs) (added cooking support) |
||
Line 77: | Line 77: | ||
end | end | ||
table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time)) | table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time)) | ||
end | |||
if item.cookingLevel ~= nil and item.recipeRequirements ~= nil then | |||
for i, reqSet in pairs(item.recipeRequirements) do | |||
skill = 'Cooking' | |||
lvl = item.cookingLevel | |||
xp = item.cookingXP | |||
req = reqSet | |||
qty = item.cookingQty | |||
time = item.cookingInterval | |||
table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time)) | |||
end | |||
end | end | ||
if item.herbloreReq ~= nil then | if item.herbloreReq ~= nil then | ||
Line 119: | Line 130: | ||
table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time, maxTime)) | table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time, maxTime)) | ||
end | end | ||
if item.type == "Harvest" or item.type == "Herb" or item.type == "Logs" then | if item.type == "Harvest" or item.type == "Herb" or item.type == "Logs" or Shared.contains(item.name, '(Perfect)') then | ||
--Harvest/Herb means farming | --Harvest/Herb means farming | ||
--Logs might mean farming or might not. Depends on the logs | --Logs might mean farming or might not. Depends on the logs | ||
Line 137: | Line 148: | ||
break | break | ||
end | end | ||
--If this is a perfect item, need to find the original | |||
if item2.perfectItem == item.id and item2.recipeRequirements ~= nil then | |||
for j, reqSet in pairs(item2.recipeRequirements) do | |||
skill = 'Cooking' | |||
if item2. | lvl = item2.cookingLevel | ||
xp = item2.cookingXP | |||
req = reqSet | |||
qty = item2.cookingQty | |||
time = item2.cookingInterval | |||
table.insert(tables, p.buildCreationTable(skill, lvl, xp, req, qty, time)) | |||
end | |||
end | |||
end | end | ||
end | end | ||
Line 378: | Line 382: | ||
--Next: Can we find it in a box? | --Next: Can we find it in a box? | ||
--While we're here, check for upgrades, | --While we're here, check for upgrades, originals (for perfect items), and growing | ||
local lootStr = '' | local lootStr = '' | ||
local upgradeStr = '' | local upgradeStr = '' | ||
local cookStr = '' | local cookStr = '' | ||
local growStr = '' | local growStr = '' | ||
local count2 = 0 | local count2 = 0 | ||
Line 410: | Line 413: | ||
table.insert(categoryArray, '[[Category:Upgraded Items]]') | table.insert(categoryArray, '[[Category:Upgraded Items]]') | ||
upgradeStr = upgradeStr..'Upgrading: '..Icons.Icon({item2.name, type="item", notext="true"}) | upgradeStr = upgradeStr..'Upgrading: '..Icons.Icon({item2.name, type="item", notext="true"}) | ||
end | end | ||
end | end | ||
Line 435: | Line 422: | ||
growStr = growStr..'Growing: '..Icons.Icon({item2.name, type="item", notext="true"}) | growStr = growStr..'Growing: '..Icons.Icon({item2.name, type="item", notext="true"}) | ||
end | end | ||
end | |||
if item2.perfectItem == item.id and item2.cookingLevel ~= nil then | |||
table.insert(lineArray, Icons._SkillReq('Cooking', item2.cookingLevel)) | |||
end | end | ||
end | end | ||
Line 440: | Line 430: | ||
if string.len(upgradeStr) > 0 then table.insert(lineArray, upgradeStr) end | if string.len(upgradeStr) > 0 then table.insert(lineArray, upgradeStr) end | ||
if string.len(cookStr) > 0 then table.insert(lineArray, cookStr) end | if string.len(cookStr) > 0 then table.insert(lineArray, cookStr) end | ||
if string.len(growStr) > 0 then table.insert(lineArray, growStr) end | if string.len(growStr) > 0 then table.insert(lineArray, growStr) end | ||
Line 479: | Line 468: | ||
if item.runecraftingLevel ~= nil then | if item.runecraftingLevel ~= nil then | ||
table.insert(lineArray, Icons._SkillReq("Runecrafting", item.runecraftingLevel)) | table.insert(lineArray, Icons._SkillReq("Runecrafting", item.runecraftingLevel)) | ||
end | |||
--CookCheck | |||
if item.cookingLevel ~= nil then | |||
table.insert(lineArray, Icons._SkillReq('Cooking', item.cookingLevel)) | |||
end | end | ||