Upstairs locations in AlKharid

This commit is contained in:
downthecrop
2021-10-31 13:14:28 -07:00
parent b512f4c864
commit 12569752a8
3 changed files with 58 additions and 32 deletions
@@ -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)),
@@ -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<Object> 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<Object> 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;
}
}
}