mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Merge downthecrop/AlKharidStairs
This commit is contained in:
commit
4a67a1c8e6
4 changed files with 60 additions and 33 deletions
|
|
@ -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
|
||||
- Removed halloween decorations
|
||||
- Alkharid Upstairs locations can now be entered exited correctly
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<Any> {
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue