diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/withobject/SackOnHay.kt b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/SackOnHay.kt new file mode 100644 index 000000000..0de84caa7 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/SackOnHay.kt @@ -0,0 +1,21 @@ +package rs09.game.interaction.item.withobject + +import api.Container +import api.ContentAPI +import org.rs09.consts.Items +import rs09.game.interaction.InteractionListener + +class SackOnHay : InteractionListener() { + val SACK = Items.EMPTY_SACK_5418 + val HAY = intArrayOf(36892, 36894, 36896, 300, 34593, 298, 299) + + override fun defineListeners() { + onUseWith(SCENERY, SACK, *HAY){player, used, _ -> + if(ContentAPI.removeItem(player, used.asItem(), Container.INVENTORY)){ + ContentAPI.addItem(player, Items.HAY_SACK_6057, 1) + ContentAPI.sendMessage(player, "You fill the sack with hay.") + } + return@onUseWith true + } + } +} \ No newline at end of file