GoldenShadowGS wrote:1. How do you define a new potion of water breathing?
2. how do you define the recipe to craft it?
Code: Select all
defineRecipe {
name = "potion_water_breathing_recipe",
level = 3,
ingredients = 224, -- Leechweed, Leechweed, Falconskrye
potion = "potion_water_breathing",
}
defineObject{
name = "potion_water_breathing",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/flask.fbx",
},
{
class = "Item",
uiName = "Potion of Water Breathing",
gfxIndex = 144,
description = "A potion that gives you the ability to breathe underwater.",
weight = 0.3,
stackable = true,
},
{
class = "UsableItem",
sound = "consume_potion",
onUseItem = function(self,champion)
champion:setCondition("water_breathing", 30)
end,
}
},
}