Module:AlchemyRecipes
From RuneTails
Documentation for this module may be created at Module:AlchemyRecipes/doc
local p = {}
local categories = {
Feather = {
'Clawk Feather (Albino)', 'Clawk Feather (Bliss)', 'Clawk Feather (Ethereal Opal)', 'Clawk Feather (Green)',
'Clawk Feather (Leopard)', 'Clawk Feather (Neon Eclipse)', 'Clawk Feather (Normal)', 'Clawk Feather (Purple)',
'Clawk Feather (Red)', 'Clawk Feather (Yellow)', 'Clawk Feather (Zebra)', 'Macaron Feather (Albino)',
'Macaron Feather (Bliss)', 'Macaron Feather (Blue)', 'Macaron Feather (Ethereal Opal)', 'Macaron Feather (Green)',
'Macaron Feather (Leopard)', 'Macaron Feather (Neon Eclipse)', 'Macaron Feather (Normal)', 'Macaron Feather (Red)',
'Macaron Feather (Yellow)', 'Macaron Feather (Zebra)'
},
['Air Feather'] = {
'Clawk Air Feather', 'Macaron Air Feather'
},
}
p.recipes = {
-- LEVEL 1 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Essence/AlchemyEssence.png',
Prod1Qty = 1,
Prod1Name = 'Alchemy Essence',
Mat1Img = 'https://runetails.com/Images/Items/General/BatWing.png',
Mat1Qty = 1,
Mat1Name = 'Bat Wing',
Mat2Img = 'https://runetails.com/Images/Items/General/PrismScales.png',
Mat2Qty = 1,
Mat2Name = 'Prism Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/Runesap.png',
Mat3Qty = 1,
Mat3Name = 'Runesap',
LvlReq = 1,
Exp = 0,
SellValue = 2000
},
{
Prod1Img = 'https://runetails.com/Images/Items/Essence/FishingEssence.png',
Prod1Qty = 1,
Prod1Name = 'Fishing Essence',
Mat1Img = 'https://runetails.com/Images/Items/General/Pearl.png',
Mat1Qty = 1,
Mat1Name = 'Pearl',
Mat2Img = 'https://runetails.com/Images/Items/Equipment/Weapon/AbyssalSword.png',
Mat2Qty = 1,
Mat2Name = 'Abyssal Sword',
Mat3Img = 'https://runetails.com/Images/Items/General/Runesap.png',
Mat3Qty = 1,
Mat3Name = 'Runesap',
LvlReq = 1,
Exp = 0,
SellValue = 2000
},
{
Prod1Img = 'https://runetails.com/Images/Items/Essence/ForagingEssence.png',
Prod1Qty = 1,
Prod1Name = 'Foraging Essence',
Mat1Img = 'https://runetails.com/Images/Items/General/MistFlower.png',
Mat1Qty = 1,
Mat1Name = 'Mist Flower',
Mat2Img = 'https://runetails.com/Images/Items/General/AncientBottle.png',
Mat2Qty = 1,
Mat2Name = 'Ancient Bottle',
Mat3Img = 'https://runetails.com/Images/Items/General/MonsterEye.png',
Mat3Qty = 1,
Mat3Name = 'Monster Eye',
Mat4Img = 'https://runetails.com/Images/Items/General/Runesap.png',
Mat4Qty = 1,
Mat4Name = 'Runesap',
LvlReq = 1,
Exp = 0,
SellValue = 2000
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/HealthLvl1.png',
Prod1Qty = 1,
Prod1Name = 'HP Potion Lv. 1',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom5.png',
Mat1Qty = 1,
Mat1Name = 'Emerald Twin-Tip',
Mat2Img = 'https://runetails.com/Images/Items/General/Moss.png',
Mat2Qty = 1,
Mat2Name = 'Moss',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyVial.png',
Mat3Qty = 1,
Mat3Name = 'Empty Vial',
LvlReq = 1,
Exp = 25,
SellValue = 50
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegen.png',
Prod1Qty = 1,
Prod1Name = 'Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/HoneysuckleSwigCup.png',
Mat1Qty = 1,
Mat1Name = 'Cup Of Honeysuckle Swig',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 1,
Exp = 50,
SellValue = 481
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegen.png',
Prod1Qty = 1,
Prod1Name = 'Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/LavenderHazeCup.png',
Mat1Qty = 1,
Mat1Name = 'Cup Of Lavender Haze',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 1,
Exp = 50,
SellValue = 481
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegen.png',
Prod1Qty = 1,
Prod1Name = 'Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/TulipInfusionCup.png',
Mat1Qty = 1,
Mat1Name = 'Cup Of Tulip Infusion',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 1,
Exp = 50,
SellValue = 481
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegen.png',
Prod1Qty = 1,
Prod1Name = 'Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/BerryBlissCup.png',
Mat1Qty = 1,
Mat1Name = 'Cup Of Berry Bliss',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 1,
Exp = 50,
SellValue = 481
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegen.png',
Prod1Qty = 1,
Prod1Name = 'Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/SpicefireFizzCup.png',
Mat1Qty = 1,
Mat1Name = 'Cup Of Spicefire Fizz',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 1,
Exp = 50,
SellValue = 481
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegen.png',
Prod1Qty = 1,
Prod1Name = 'Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/DaylilySwirlCup.png',
Mat1Qty = 1,
Mat1Name = 'Cup Of Daylily Swirl',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 1,
Exp = 50,
SellValue = 481
},
-- LEVEL 2 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/HealthLvl2.png',
Prod1Qty = 1,
Prod1Name = 'HP Potion Lv. 2',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom5.png',
Mat1Qty = 2,
Mat1Name = 'Emerald Twin-Tip',
Mat2Img = 'https://runetails.com/Images/Items/General/Moss.png',
Mat2Qty = 1,
Mat2Name = 'Moss',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 2,
Exp = 45,
SellValue = 150
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/AtkSpeed.png',
Prod1Qty = 1,
Prod1Name = 'Attack Speed Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom6.png',
Mat1Qty = 1,
Mat1Name = 'Cloudy Pink Puff',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesRuby.png',
Mat2Qty = 1,
Mat2Name = 'Ruby Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 2,
Exp = 55,
SellValue = 215
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/Dodge.png',
Prod1Qty = 1,
Prod1Name = 'Dodge Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom12.png',
Mat1Qty = 1,
Mat1Name = 'Cratered Cocoa Cap',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesJade.png',
Mat2Qty = 1,
Mat2Name = 'Jade Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 2,
Exp = 65,
SellValue = 281
},
-- LEVEL 3 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/CriticalChance.png',
Prod1Qty = 1,
Prod1Name = 'Critical Attack Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom10.png',
Mat1Qty = 1,
Mat1Name = 'Amber Peak',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesRuby.png',
Mat2Qty = 1,
Mat2Name = 'Ruby Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 3,
Exp = 95,
SellValue = 215
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/CombatSpeed.png',
Prod1Qty = 1,
Prod1Name = 'Combat Speed Potion',
Mat1Img = 'https://runetails.com/Images/Items/General/FeatherMacaronNormal.png',
Mat1Qty = 1,
Mat1Name = ':Category:Feather|Any Feather',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 3,
Exp = 105,
SellValue = 356
},
-- LEVEL 4 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/Block.png',
Prod1Qty = 1,
Prod1Name = 'Block Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom4.png',
Mat1Qty = 1,
Mat1Name = 'Mystic Mauve Rootshroom',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesJade.png',
Mat2Qty = 1,
Mat2Name = 'Jade Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 4,
Exp = 115,
SellValue = 281
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/AttackDmg.png',
Prod1Qty = 1,
Prod1Name = 'Attack Damage Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom7.png',
Mat1Qty = 1,
Mat1Name = 'Noirbrella Spore',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesRuby.png',
Mat2Qty = 1,
Mat2Name = 'Ruby Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottle.png',
Mat3Qty = 1,
Mat3Name = 'Empty Bottle',
LvlReq = 4,
Exp = 145,
SellValue = 215
},
-- LEVEL 5 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/HealthLvl3.png',
Prod1Qty = 1,
Prod1Name = 'HP Potion Lv. 3',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom5.png',
Mat1Qty = 3,
Mat1Name = 'Emerald Twin-Tip',
Mat2Img = 'https://runetails.com/Images/Items/General/Moss.png',
Mat2Qty = 1,
Mat2Name = 'Moss',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleMedium.png',
Mat3Qty = 1,
Mat3Name = 'Empty Medium Bottle',
LvlReq = 5,
Exp = 165,
SellValue = 350
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegenLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/HoneysuckleSwigJug.png',
Mat1Qty = 1,
Mat1Name = 'Jug Of Honeysuckle Swig',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 5,
Exp = 195,
SellValue = 1575
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegenLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/LavenderHazeJug.png',
Mat1Qty = 1,
Mat1Name = 'Jug Of Lavender Haze',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 5,
Exp = 195,
SellValue = 1575
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegenLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/TulipInfusionJug.png',
Mat1Qty = 1,
Mat1Name = 'Jug Of Tulip Infusion',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 5,
Exp = 195,
SellValue = 1575
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegenLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/BerryBlissJug.png',
Mat1Qty = 1,
Mat1Name = 'Jug Of Berry Bliss',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 5,
Exp = 195,
SellValue = 1575
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegenLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/SpicefireFizzJug.png',
Mat1Qty = 1,
Mat1Name = 'Jug Of Spicefire Fizz',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 5,
Exp = 195,
SellValue = 1575
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/StaminaRegenLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Stamina Potion',
Mat1Img = 'https://runetails.com/Images/Items/Drink/DaylilySwirlJug.png',
Mat1Qty = 1,
Mat1Name = 'Jug Of Daylily Swirl',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 5,
Exp = 195,
SellValue = 1575
},
-- LEVEL 6 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/AtkSpeedLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Attack Speed Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom6.png',
Mat1Qty = 1,
Mat1Name = 'Cloudy Pink Puff',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesRuby.png',
Mat2Qty = 1,
Mat2Name = 'Ruby Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/FeatherMacaronNormal.png',
Mat3Qty = 1,
Mat3Name = ':Category:Feather|Any Feather',
Mat4Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat4Qty = 1,
Mat4Name = 'Empty Large Bottle',
LvlReq = 6,
Exp = 215,
SellValue = 234
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/DodgeLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Dodge Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom12.png',
Mat1Qty = 1,
Mat1Name = 'Cratered Cocoa Cap',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesJade.png',
Mat2Qty = 1,
Mat2Name = 'Jade Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/FeatherMacaronNormal.png',
Mat3Qty = 1,
Mat3Name = ':Category:Feather|Any Feather',
Mat4Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat4Qty = 1,
Mat4Name = 'Empty Large Bottle',
LvlReq = 6,
Exp = 235,
SellValue = 300
},
-- LEVEL 7 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/HealthLvl4.png',
Prod1Qty = 1,
Prod1Name = 'HP Potion Lv. 4',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom5.png',
Mat1Qty = 4,
Mat1Name = 'Emerald Twin-Tip',
Mat2Img = 'https://runetails.com/Images/Items/General/Moss.png',
Mat2Qty = 1,
Mat2Name = 'Moss',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 7,
Exp = 250,
SellValue = 700
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/CriticalChanceLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Critical Attack Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom10.png',
Mat1Qty = 1,
Mat1Name = 'Amber Peak',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesRuby.png',
Mat2Qty = 1,
Mat2Name = 'Ruby Scales',
Mat3Img = 'https://runetails.com/Images/Items/Food/BerryYellow.png',
Mat3Qty = 1,
Mat3Name = 'Yellow Berry',
Mat4Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat4Qty = 1,
Mat4Name = 'Empty Large Bottle',
LvlReq = 7,
Exp = 275,
SellValue = 235
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/CombatSpeedLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Combat Speed Potion',
Mat1Img = 'https://runetails.com/Images/Items/General/FeatherMacaronAir.png',
Mat1Qty = 1,
Mat1Name = ':Category:Air Feather|Any Air Feather',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesGold.png',
Mat2Qty = 1,
Mat2Name = 'Gold Scales',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Large Bottle',
LvlReq = 7,
Exp = 305,
SellValue = 356
},
-- LEVEL 8 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/HealthLvl5.png',
Prod1Qty = 1,
Prod1Name = 'HP Potion Lv. 5',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom5.png',
Mat1Qty = 5,
Mat1Name = 'Emerald Twin-Tip',
Mat2Img = 'https://runetails.com/Images/Items/General/Moss.png',
Mat2Qty = 1,
Mat2Name = 'Moss',
Mat3Img = 'https://runetails.com/Images/Items/General/EmptyBottleXLarge.png',
Mat3Qty = 1,
Mat3Name = 'Empty Extra Large Bottle',
LvlReq = 8,
Exp = 325,
SellValue = 1000
},
-- LEVEL 9 RECIPES
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/BlockLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Block Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom4.png',
Mat1Qty = 1,
Mat1Name = 'Mystic Mauve Rootshroom',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesJade.png',
Mat2Qty = 1,
Mat2Name = 'Jade Scales',
Mat3Img = 'https://runetails.com/Images/Items/Food/BerryBlue.png',
Mat3Qty = 1,
Mat3Name = 'Blue Berry',
Mat4Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat4Qty = 1,
Mat4Name = 'Empty Large Bottle',
LvlReq = 9,
Exp = 360,
SellValue = 318
},
{
Prod1Img = 'https://runetails.com/Images/Items/Potion/AttackDmgLarge.png',
Prod1Qty = 1,
Prod1Name = 'Large Attack Damage Potion',
Mat1Img = 'https://runetails.com/Images/Items/Food/Mushroom7.png',
Mat1Qty = 1,
Mat1Name = 'Noirbrella Spore',
Mat2Img = 'https://runetails.com/Images/Items/General/ScalesRuby.png',
Mat2Qty = 1,
Mat2Name = 'Ruby Scales',
Mat3Img = 'https://runetails.com/Images/Items/Food/BerryRed.png',
Mat3Qty = 1,
Mat3Name = 'Red Berry',
Mat4Img = 'https://runetails.com/Images/Items/General/EmptyBottleLarge.png',
Mat4Qty = 1,
Mat4Name = 'Empty Large Bottle',
LvlReq = 9,
Exp = 375,
SellValue = 253
},
}
function p.get_recipes_by_material(frame)
local material = frame.args[1] or ''
local pageName = mw.title.getCurrentTitle().text -- Get the current page name
local result = ''
-- If the page is "Potion Recipes", show all recipes
local showAll = (pageName == "Alchemy Recipes")
for _, recipe in ipairs(p.recipes) do
local match = showAll
if not match then
-- Check if the page is a product
if pageName == recipe.Prod1Name or (recipe.Prod2Name and pageName == recipe.Prod2Name) then
match = true
end
-- Check if the page is a material
if not match then
for i = 1, 4 do
local matName = recipe["Mat" .. i .. "Name"]
if matName then
if matName:match(':Category:') then
local categoryName = matName:match(':Category:([^|]+)')
if categories[categoryName] then
for _, categoryItem in ipairs(categories[categoryName]) do
if material == categoryItem then
match = true
break
end
end
end
elseif material == matName then
match = true
end
end
if match then break end
end
end
-- Check if the page is a recipe name
if not match and recipe.Recipe and pageName == recipe.Recipe then
match = true
end
end
if match then
result = result .. '<tr>'
result = result .. '<td style="width: 50px;">' .. recipe.Prod1Img ..
(recipe.Prod2Img and '<br>' .. recipe.Prod2Img .. '' or '') .. '</td>'
result = result .. '<td>' .. recipe.Prod1Qty .. ' x [[' .. recipe.Prod1Name .. ']]' ..
(recipe.Prod2Name and '<br>' .. recipe.Prod2Qty .. ' x [[' .. recipe.Prod2Name .. ']]' or '') .. '</td>'
result = result .. '<td>'
for i = 1, 4 do
if recipe["Mat" .. i .. "Name"] then
result = result .. recipe["Mat" .. i .. "Qty"] .. ' x ' .. recipe["Mat" .. i .. "Img"] ..
' [[' .. recipe["Mat" .. i .. "Name"] .. ']]' .. '<br>'
end
end
result = result .. '</td>'
result = result .. '<td>' .. recipe.LvlReq .. '</td>'
result = result .. '<td>' .. recipe.Exp .. '</td>'
result = result .. '<td>' .. recipe.SellValue .. '</td>'
result = result .. '</tr>'
end
end
return result
end
return p