From a49a99365eed0c542d51e1d7265288275e6cbf92 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 16:25:29 -0500 Subject: [PATCH] Added best easter egg --- .../item/withobject/FishEasterEgg.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt new file mode 100644 index 000000000..7646b98a5 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt @@ -0,0 +1,25 @@ +package rs09.game.interaction.item.withobject + +import api.ContentAPI +import core.game.node.entity.skill.gather.woodcutting.WoodcuttingNode +import org.rs09.consts.Items +import rs09.game.interaction.InteractionListener + +class FishEasterEgg : InteractionListener() { + val TREE_IDs = WoodcuttingNode.values().map { it.id }.toIntArray() + + val fish = intArrayOf(Items.RAW_HERRING_345, Items.HERRING_347) + val doors = intArrayOf(1967,1968) + + override fun defineListeners() { + onUseWith(SCENERY, fish, *TREE_IDs){player, _, _ -> + ContentAPI.sendMessage(player, "This is not the mightiest tree in the forest.") + return@onUseWith true + } + + onUseWith(SCENERY, fish, *doors){player, _, _ -> + ContentAPI.sendMessage(player, "It can't be done!") + return@onUseWith true + } + } +} \ No newline at end of file