Module:LevelUpTable/Data: Difference between revisions

Add herblore data
(Add artisan skills)
(Add herblore data)
Line 211: Line 211:
local product = Items.getItemByID(x.productID)
local product = Items.getItemByID(x.productID)
return UnlockData.new(product.id, product.name, Skills.getRecipeLevel(skillID, x), skillID)
return UnlockData.new(product.id, product.name, Skills.getRecipeLevel(skillID, x), skillID)
end)
end
function getHerbloreData(realm)
local skillID = 'Herblore'
local data = getDataSet(SkillData.Herblore.recipes, realm)
function getLastPotion(potion)
local lastID = nil
for _, v in ipairs(potion.potionIDs) do
lastID = v
end
return Items.getItemByID(lastID)
end
return Select(data, function(x)
local lastPot = getLastPotion(x)
return UnlockData.new(lastPot.id, lastPot.name, Skills.getRecipeLevel(skillID, x), skillID)
end)
end)
end
end
Line 310: Line 328:
local realmName = 'Abyssal Realm'
local realmName = 'Abyssal Realm'
local realm = Skills.getRealmFromName(realmName)
local realm = Skills.getRealmFromName(realmName)
Debug.log(getRunecraftingData(realm))
Debug.log(getHerbloreData(realm))
end
end


p.UnlockData = UnlockData
p.UnlockData = UnlockData
return p
return p
2,875

edits