mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-12 17:40:17 -07:00
Cooking level required for making cake mix.
This commit is contained in:
parent
c682427729
commit
9db92bc99c
1 changed files with 7 additions and 4 deletions
|
|
@ -1,11 +1,9 @@
|
|||
package content.global.skill.cooking
|
||||
|
||||
import core.api.addItem
|
||||
import core.api.inInventory
|
||||
import core.api.removeItem
|
||||
import core.api.sendMessage
|
||||
import core.api.*
|
||||
import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListener
|
||||
import core.game.node.entity.skill.Skills
|
||||
import org.rs09.consts.Items
|
||||
|
||||
class CakeListener : InteractionListener {
|
||||
|
|
@ -17,6 +15,11 @@ class CakeListener : InteractionListener {
|
|||
|
||||
override fun defineListeners() {
|
||||
onUseWith(IntType.ITEM, cakeArr, Items.CAKE_TIN_1887) { player, _, _ ->
|
||||
if (getDynLevel(player, Skills.COOKING) < 40) {
|
||||
sendMessage(player, "You need a Cooking level of at least 40 in order to do this.")
|
||||
return@onUseWith true
|
||||
}
|
||||
|
||||
if(inInventory(player, Items.EGG_1944) && inInventory(player, Items.BUCKET_OF_MILK_1927) && inInventory(player, Items.POT_OF_FLOUR_1933) && inInventory(player, Items.CAKE_TIN_1887)) {
|
||||
removeItem(player, Items.EGG_1944)
|
||||
removeItem(player, Items.BUCKET_OF_MILK_1927)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue