From 110599252019e9e4e0358533a1039ab81661914d Mon Sep 17 00:00:00 2001 From: Badhad <46411657+BadHad@users.noreply.github.com> Date: Fri, 2 Apr 2021 20:41:26 -0400 Subject: [PATCH] Stairs Fix - Fixed both stairs leading to the white snow kebbits. --- .../interaction/region/RellekkaListeners.kt | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Server/src/main/kotlin/rs09/game/interaction/region/RellekkaListeners.kt diff --git a/Server/src/main/kotlin/rs09/game/interaction/region/RellekkaListeners.kt b/Server/src/main/kotlin/rs09/game/interaction/region/RellekkaListeners.kt new file mode 100644 index 000000000..8a5a64d7d --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/interaction/region/RellekkaListeners.kt @@ -0,0 +1,47 @@ +package rs09.game.interaction.region + +import core.game.world.map.Location +import rs09.game.interaction.InteractionListener + +/** + * File to be used for anything Rellekka related. + * Handles the snow kebbit stairs up and down. + * @author Ceikry + */ + +class RellekkaListeners : InteractionListener() { + + val UP1A = Location.create(2715, 3798, 0) + val UP1B = Location.create(2716, 3798, 0) + val UP2A = Location.create(2726, 3801, 0) + val UP2B = Location.create(2727, 3801, 0) + + val DOWN1A = Location.create(2715, 3802, 1) + val DOWN1B = Location.create(2716, 3802, 1) + val DOWN2A = Location.create(2726, 3805, 1) + val DOWN2B = Location.create(2727, 3805, 1) + val STAIRS = intArrayOf(19690,19691) + + override fun defineListeners() { + on(STAIRS,OBJECT,"ascend","descend"){player,node -> + if(player.location.y < 3802){ + player.properties.teleportLocation = when(player.location.x){ + 2715 -> DOWN1A + 2716 -> DOWN1B + 2726 -> DOWN2A + 2727 -> DOWN2B + else -> player.location + } + } else { + player.properties.teleportLocation = when(player.location.x) { + 2715 -> UP1A + 2716 -> UP1B + 2726 -> UP2A + 2727 -> UP2B + else -> player.location + } + } + return@on true + } + } +} \ No newline at end of file