diff --git a/Server/src/main/content/global/skill/cooking/CookingRewrite.kt b/Server/src/main/content/global/skill/cooking/CookingRewrite.kt index 7bc993a8b..329da92c9 100644 --- a/Server/src/main/content/global/skill/cooking/CookingRewrite.kt +++ b/Server/src/main/content/global/skill/cooking/CookingRewrite.kt @@ -28,6 +28,7 @@ class CookingRewrite : InteractionListener { list.add(RAW_BEEF_2132) list.add(RAW_BEAR_MEAT_2136) list.add(SEAWEED_401) + list.add(Items.BOWL_OF_WATER_1921) RAW_FOODS = list.toIntArray() } @@ -46,6 +47,10 @@ class CookingRewrite : InteractionListener { player.packetDispatch.sendMessage("You need to cook this on a range.") return@onUseWith false } + Items.BOWL_OF_WATER_1921 ->{ + cook(player, obj, Items.BOWL_OF_WATER_1921, Items.BOWL_OF_HOT_WATER_4456, 1) + return@onUseWith true + } } //cook a standard item diff --git a/Server/src/main/content/global/skill/cooking/TeaInteraction.kt b/Server/src/main/content/global/skill/cooking/TeaInteraction.kt index 6eb2d3cf9..5b92b1daa 100644 --- a/Server/src/main/content/global/skill/cooking/TeaInteraction.kt +++ b/Server/src/main/content/global/skill/cooking/TeaInteraction.kt @@ -1,6 +1,9 @@ package content.global.skill.cooking +import core.api.addItem +import core.api.removeItem import core.game.interaction.InteractionListener +import org.rs09.consts.Items /** * This deals with all tea mixtures @@ -14,8 +17,29 @@ import core.game.interaction.InteractionListener * gold trim */ class TeaInteraction : InteractionListener { + private val teaMilkMap = mapOf( + Items.CUP_OF_TEA_4242 to Items.CUP_OF_TEA_4243, + Items.CUP_OF_TEA_4245 to Items.CUP_OF_TEA_4246, + Items.CUP_OF_TEA_7730 to Items.CUP_OF_TEA_7731, + Items.CUP_OF_TEA_7733 to Items.CUP_OF_TEA_7734, + Items.CUP_OF_TEA_7736 to Items.CUP_OF_TEA_7737, + ) + override fun defineListeners() { - onUseWith(ITEM, ) - TODO("Not yet implemented") + onUseWith(ITEM, teaMilkMap.keys.toIntArray(), Items.BUCKET_OF_MILK_1927){ player, used, with -> + if (removeItem(player, used) && removeItem(player, with)){ + addItem(player, teaMilkMap[used.id]!!) + addItem(player, Items.BUCKET_1925) + } + return@onUseWith true + } + + onUseWith(ITEM, Items.BOWL_OF_HOT_WATER_4456, Items.EMPTY_CUP_1980){ player, used, with -> + if (removeItem(player, used) && removeItem(player, with)) { + addItem(player, Items.CUP_OF_HOT_WATER_4460) + } + return@onUseWith true + } } -} \ No newline at end of file + +}