diff --git a/CHANGELOG b/CHANGELOG index 0eb25a671..48cf3f5a5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -44,4 +44,5 @@ - Fixed a potential exploit with chinchompas - Addressed a potentially serious issue with charm droprates < ---- ABOVE Released NOVEMBER 1, 2021 https://gitlab.com/2009scape/2009scape/-/tags/Nov-1-2021 ---- > -- Removed halloween decorations \ No newline at end of file +- Removed halloween decorations +- Alkharid Upstairs locations can now be entered exited correctly \ No newline at end of file diff --git a/Server/src/main/java/core/game/content/global/action/SpecialLadders.java b/Server/src/main/java/core/game/content/global/action/SpecialLadders.java index 57679d894..ec9e56941 100644 --- a/Server/src/main/java/core/game/content/global/action/SpecialLadders.java +++ b/Server/src/main/java/core/game/content/global/action/SpecialLadders.java @@ -24,6 +24,13 @@ public enum SpecialLadders implements LadderAchievementCheck { JATIZSO_SHOUT_TOWER_UP(Location.create(2373, 3800, 2),Location.create(2374, 3800, 0)), JATIZSO_SHOUT_TOWER_DOWN(Location.create(2373, 3800, 0),Location.create(2374, 3800, 2)), + ALKHARID_ZEKE_UP(Location.create(3284,3186,0), Location.create(3284,3190,1)), + ALKHARID_ZEKE_DOWN(Location.create(3284,3190,1), Location.create(3284,3186,0)), + ALKHARID_CRAFTING_UP(Location.create(3311,3187,0),Location.create(3314,3187,1)), + ALKHARID_CRAFTING_DOWN(Location.create(3314,3187,1),Location.create(3310,3187,0)), + ALKHARID_SOCRCERESS_UP(Location.create(3325,3142,0),Location.create(3325,3139,1)), + ALKHARID_SOCRCERESS_DOWN(Location.create(3325,3139,1),Location.create(3325,3143,0)), + DRAYNOR_SEWER_SOUTHEAST_DOWN(new Location(3118, 3244, 0), new Location(3118, 9643, 0)), DRAYNOR_SEWER_SOUTHEAST_UP(new Location(3118, 9643, 0), new Location(3118, 3243, 0)), DRAYNOR_SEWER_NORTHWEST_DOWN(new Location(3084, 3272, 0), new Location(3085, 9672, 0)), diff --git a/Server/src/main/java/core/game/interaction/npc/sorceress_app/SorceressApprenticePlugin.java b/Server/src/main/java/core/game/interaction/npc/sorceress_app/SorceressApprenticePlugin.java index d4e3ee2a0..e927232a0 100644 --- a/Server/src/main/java/core/game/interaction/npc/sorceress_app/SorceressApprenticePlugin.java +++ b/Server/src/main/java/core/game/interaction/npc/sorceress_app/SorceressApprenticePlugin.java @@ -21,8 +21,6 @@ import rs09.plugin.PluginManager; @Initializable public class SorceressApprenticePlugin extends OptionHandler { - private static final Location TOP = Location.create(3322, 3138, 1); - @Override public boolean handle(Player player, Node node, String option) { switch (option) { @@ -33,15 +31,6 @@ public class SorceressApprenticePlugin extends OptionHandler { } else { player.getDialogueInterpreter().sendDialogues(((NPC) node), null, "I can't do that now, I'm far too busy sweeping."); } - break; - case "climb-up": - if (node.getLocation().getX() == 3322) { - ClimbActionHandler.climb(player, new Animation(828), TOP); - } else { - ClimbActionHandler.climbLadder(player, (Scenery) node, option); - return true; - } - break; } return true; } @@ -50,29 +39,8 @@ public class SorceressApprenticePlugin extends OptionHandler { public Plugin newInstance(Object arg) throws Throwable { NPCDefinition.forId(5532).getHandlers().put("option:teleport", this); SceneryDefinition.forId(21781).getHandlers().put("option:climb-up", this); - new SorceressStairs().newInstance(arg); PluginManager.definePlugin(new SorceressApprenticeDialogue()); return this; } - /** - * Represents the option handler used for the sorcceress stairs. - * @author 'Vexia - * @version 1.0 - */ - public final static class SorceressStairs extends OptionHandler { - - @Override - public Plugin newInstance(Object arg) throws Throwable { - SceneryDefinition.forId(35645).getHandlers().put("option:climb-down", this); - return this; - } - - @Override - public boolean handle(Player player, Node node, String option) { - player.getProperties().setTeleportLocation(Location.create(3325, 3143, 0)); - return true; - } - - } } diff --git a/Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt b/Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt new file mode 100644 index 000000000..4c7525f09 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt @@ -0,0 +1,51 @@ +package rs09.game.content.zone; + +import api.ContentAPI +import core.cache.def.impl.SceneryDefinition +import core.game.content.global.action.DoorActionHandler +import core.game.interaction.OptionHandler +import core.game.node.Node +import core.game.node.entity.player.Player +import core.game.node.scenery.Scenery +import core.game.node.scenery.SceneryBuilder +import core.game.world.map.Location +import core.plugin.Initializable +import core.plugin.Plugin + +@Initializable +class AlKharidStairsPlugin : OptionHandler() { + + private val zekeStairsTop = Scenery(35645,Location(3284,3190,1),2,0) + private val zekeDoorClosed = Scenery(27988,Location(3284,3190,1),0,2) + private val zekeDoorOpened = Scenery(27989,Location(3285,3190,1),0,3) + + private val craftingStairsTop = Scenery(35645,Location(3314,3187,1),2,0) + private val craftingDoorClosed = Scenery(27988,Location(3314,3187,1),0,3) + private val craftingDoorOpened = Scenery(27989,Location(3314,3186,1),0,0) + + override fun handle(player: Player?, node: Node?, option: String?): Boolean { + player ?: return false + node ?: return false + option ?: return false + if(node.location == zekeDoorOpened.location || node.location == craftingDoorOpened.location){ + ContentAPI.sendMessage(player,"This door appears to be stuck open.") + } else{ + DoorActionHandler.handleDoor(player,node.asScenery()) + } + return true + } + + override fun newInstance(arg: Any?): Plugin { + + // Zekes Shop Upstairs Door replacement + SceneryBuilder.replace(zekeDoorClosed,zekeDoorOpened) + SceneryBuilder.add(zekeStairsTop) + + // Crafting Shop Upstairs Door replacement + SceneryBuilder.replace(craftingDoorClosed,craftingDoorOpened) + SceneryBuilder.add(craftingStairsTop) + + SceneryDefinition.forId(27989).handlers["option:close"] = this + return this + } +}