From 12569752a8b4d34910d0535ec05083cd2328f819 Mon Sep 17 00:00:00 2001 From: downthecrop Date: Sun, 31 Oct 2021 13:14:28 -0700 Subject: [PATCH 1/3] Upstairs locations in AlKharid --- .../content/global/action/SpecialLadders.java | 7 +++ .../SorceressApprenticePlugin.java | 32 ------------ .../game/content/zone/AlKharidStairsPlugin.kt | 51 +++++++++++++++++++ 3 files changed, 58 insertions(+), 32 deletions(-) create mode 100644 Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt 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 64627af37..4ffacdd3d 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..3b00eeac5 --- /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() { + + // Zekes Shop Upstairs Door replacement + 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) + + // Crafting Shop Upstairs Door replacement + 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,"Nothing interesting happens.") + } else{ + DoorActionHandler.handleDoor(player,node.asScenery()) + } + return true + } + + override fun newInstance(arg: Any?): Plugin { + + SceneryBuilder.replace(zekeDoorClosed,zekeDoorOpened) + SceneryBuilder.add(zekeStairsTop) + + SceneryBuilder.replace(craftingDoorClosed,craftingDoorOpened) + SceneryBuilder.add(craftingStairsTop) + + SceneryDefinition.forId(27989).handlers["option:close"] = this + return this + } +} From 47a21db8f123e5ccb0cc13dcca7cda68518ea8cb Mon Sep 17 00:00:00 2001 From: downthecrop Date: Sun, 31 Oct 2021 13:20:30 -0700 Subject: [PATCH 2/3] CHANGELOG --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 9df609c1d..d4056f933 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,3 +40,4 @@ - Removed ridiculous noted Manta ray drop across all Revenants - Reverted the absurd 50-100 noted Sharks drop to a more believable number of 4 across all Revenants - Reverted the noted tuna potato drop to a maximum of 5 across all Revenants +- Alkharid Upstairs locations can now be entered exited correctly \ No newline at end of file From 599c4a26de859ec2df6c0e6f43b27cabea09811b Mon Sep 17 00:00:00 2001 From: downthecrop Date: Sun, 31 Oct 2021 19:40:35 -0700 Subject: [PATCH 3/3] authetic game message --- .../kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt b/Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt index 3b00eeac5..4c7525f09 100644 --- a/Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt +++ b/Server/src/main/kotlin/rs09/game/content/zone/AlKharidStairsPlugin.kt @@ -15,12 +15,10 @@ import core.plugin.Plugin @Initializable class AlKharidStairsPlugin : OptionHandler() { - // Zekes Shop Upstairs Door replacement 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) - // Crafting Shop Upstairs Door replacement 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) @@ -30,7 +28,7 @@ class AlKharidStairsPlugin : OptionHandler() { node ?: return false option ?: return false if(node.location == zekeDoorOpened.location || node.location == craftingDoorOpened.location){ - ContentAPI.sendMessage(player,"Nothing interesting happens.") + ContentAPI.sendMessage(player,"This door appears to be stuck open.") } else{ DoorActionHandler.handleDoor(player,node.asScenery()) } @@ -39,9 +37,11 @@ class AlKharidStairsPlugin : OptionHandler() { 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)