Added rogues' castle chest functionality

more object -> scenery renaming
This commit is contained in:
ceikry
2021-06-28 09:28:48 -05:00
parent b8e29d3281
commit c2857fc5af
303 changed files with 1560 additions and 1560 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ import core.cache.def.impl.AnimationDefinition;
import core.cache.def.impl.GraphicDefinition;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import rs09.game.system.SystemLogger;
/**
@@ -67,7 +67,7 @@ public final class Cache {
}
}
ItemDefinition.parse();
ObjectDefinition.parse();
SceneryDefinition.parse();
}
/**
@@ -216,7 +216,7 @@ public final class Cache {
}
/**
* Method used to return the {@link ObjectDefinition} size.
* Method used to return the {@link SceneryDefinition} size.
*
* @return the size.
*/
@@ -17,12 +17,12 @@ import java.util.Map;
* Represents an object's definition.
* @author Emperor
*/
public class ObjectDefinition extends Definition<Scenery> {
public class SceneryDefinition extends Definition<Scenery> {
/**
* The item definitions mapping.
*/
private static final Map<Integer, ObjectDefinition> DEFINITIONS = new HashMap<Integer, ObjectDefinition>();
private static final Map<Integer, SceneryDefinition> DEFINITIONS = new HashMap<Integer, SceneryDefinition>();
/**
* The default option handlers.
@@ -447,7 +447,7 @@ public class ObjectDefinition extends Definition<Scenery> {
/**
* Construct a new {@code ObjectDefinition} {@code Object}.
*/
public ObjectDefinition() {
public SceneryDefinition() {
anInt3835 = -1;
anInt3860 = -1;
configFileId = -1;
@@ -572,16 +572,16 @@ public class ObjectDefinition extends Definition<Scenery> {
for (int objectId = 0; objectId < Cache.getObjectDefinitionsSize(); objectId++) {
byte[] data = Cache.getIndexes()[16].getFileData(getContainerId(objectId), objectId & 0xff);
if (data == null) {
ObjectDefinition.getDefinitions().put(objectId, new ObjectDefinition());
SceneryDefinition.getDefinitions().put(objectId, new SceneryDefinition());
//SystemLogger.logErr("Could not load object definitions for id " + objectId + " - no data!");
continue;
}
ObjectDefinition def = ObjectDefinition.parseDefinition(objectId, ByteBuffer.wrap(data));
SceneryDefinition def = SceneryDefinition.parseDefinition(objectId, ByteBuffer.wrap(data));
if (def == null) {
// SystemLogger.logErr("Could not load object definitions for id " + objectId + " - no definitions found!");
return;
}
ObjectDefinition.getDefinitions().put(objectId, def);
SceneryDefinition.getDefinitions().put(objectId, def);
data = null;
}
}
@@ -591,12 +591,12 @@ public class ObjectDefinition extends Definition<Scenery> {
* @param objectId The object's id.
* @return The object definition.
*/
public static ObjectDefinition forId(int objectId) {
ObjectDefinition def = DEFINITIONS.get(objectId);
public static SceneryDefinition forId(int objectId) {
SceneryDefinition def = DEFINITIONS.get(objectId);
if (def != null) {
return def;
}
DEFINITIONS.put(objectId, def = new ObjectDefinition());
DEFINITIONS.put(objectId, def = new SceneryDefinition());
def.id = objectId;
return def;
}
@@ -609,8 +609,8 @@ public class ObjectDefinition extends Definition<Scenery> {
* @param buffer The buffer.
* @return The object definition.
*/
public static ObjectDefinition parseDefinition(int objectId, ByteBuffer buffer) {
ObjectDefinition def = new ObjectDefinition();
public static SceneryDefinition parseDefinition(int objectId, ByteBuffer buffer) {
SceneryDefinition def = new SceneryDefinition();
def.id = objectId;
// SystemLogger.logErr("----------------------------------------------------\n\n\n");
while (true) {
@@ -852,7 +852,7 @@ public class ObjectDefinition extends Definition<Scenery> {
}
for (int i = 0; i < childrenIds.length; i++) {
if (childrenIds[i] != -1) {
ObjectDefinition def = forId(childrenIds[i]);
SceneryDefinition def = forId(childrenIds[i]);
if (def.hasOptions(false)) {
return true;
}
@@ -866,7 +866,7 @@ public class ObjectDefinition extends Definition<Scenery> {
* @param player The player to get it for.
* @return The object definition.
*/
public ObjectDefinition getChildObject(Player player) {
public SceneryDefinition getChildObject(Player player) {
if (childrenIds == null || childrenIds.length < 1) {
return this;
}
@@ -1586,7 +1586,7 @@ public class ObjectDefinition extends Definition<Scenery> {
* Get the definitions.
* @return the definitions
*/
public static Map<Integer, ObjectDefinition> getDefinitions() {
public static Map<Integer, SceneryDefinition> getDefinitions() {
return DEFINITIONS;
}
@@ -1598,7 +1598,7 @@ public class ObjectDefinition extends Definition<Scenery> {
* option handler.
*/
public static OptionHandler getOptionHandler(int nodeId, String name) {
ObjectDefinition def = forId(nodeId);
SceneryDefinition def = forId(nodeId);
OptionHandler handler = def.getConfiguration("option:" + name);
if (handler != null) {
return handler;
@@ -1,6 +1,6 @@
package core.game.content.activity.bountyhunter;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityManager;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -19,13 +19,13 @@ public final class BHOptionHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(28110).getHandlers().put("option:exit", this);
ObjectDefinition.forId(28119).getHandlers().put("option:enter", this);
ObjectDefinition.forId(28120).getHandlers().put("option:enter", this);
ObjectDefinition.forId(28121).getHandlers().put("option:enter", this);
ObjectDefinition.forId(28122).getHandlers().put("option:exit", this);
ObjectDefinition.forId(28115).getHandlers().put("option:view", this);
ObjectDefinition.forId(28116).getHandlers().put("option:view", this);
SceneryDefinition.forId(28110).getHandlers().put("option:exit", this);
SceneryDefinition.forId(28119).getHandlers().put("option:enter", this);
SceneryDefinition.forId(28120).getHandlers().put("option:enter", this);
SceneryDefinition.forId(28121).getHandlers().put("option:enter", this);
SceneryDefinition.forId(28122).getHandlers().put("option:exit", this);
SceneryDefinition.forId(28115).getHandlers().put("option:view", this);
SceneryDefinition.forId(28116).getHandlers().put("option:view", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.duel;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.Container;
import core.game.container.impl.EquipmentContainer;
import core.game.content.dialogue.DialogueAction;
@@ -570,7 +570,7 @@ public class DuelArea extends MapZone {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3203).getHandlers().put("option:forfeit", this);
SceneryDefinition.forId(3203).getHandlers().put("option:forfeit", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.fog;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityPlugin;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -55,7 +55,7 @@ public class FOGActivityPlugin extends ActivityPlugin {
PluginManager.definePlugin(new OptionHandler() {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(30204).getHandlers().put("option:enter", this);
SceneryDefinition.forId(30204).getHandlers().put("option:enter", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.activity.guild;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.Skillcape;
import core.game.content.global.action.DoorActionHandler;
@@ -32,7 +32,7 @@ public final class CraftingGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2647).getHandlers().put("option:open", this);
SceneryDefinition.forId(2647).getHandlers().put("option:open", this);
NPCDefinition.forId(804).getHandlers().put("option:trade", this);
new MasterCrafterDialogue().init();
new TannerDialogue().init();
@@ -1,6 +1,6 @@
package core.game.content.activity.guild;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.plugin.Initializable;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.Skillcape;
@@ -23,7 +23,7 @@ public final class FishingGuild extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2025).getHandlers().put("option:open", this);
SceneryDefinition.forId(2025).getHandlers().put("option:open", this);
new MasterFisherDialogue().init();
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.guild;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.EnchantedJewellery;
import core.game.content.global.action.DoorActionHandler;
import core.game.node.entity.skill.summoning.familiar.Familiar;
@@ -26,8 +26,8 @@ public final class HeroGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2624).getHandlers().put("option:open", this);
ObjectDefinition.forId(2625).getHandlers().put("option:open", this);
SceneryDefinition.forId(2624).getHandlers().put("option:open", this);
SceneryDefinition.forId(2625).getHandlers().put("option:open", this);
PluginManager.definePlugin(new JewelleryRechargePlugin());
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.guild;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
import core.game.node.entity.skill.Skills;
@@ -24,9 +24,9 @@ public final class MiningGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2113).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(30941).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2112).getHandlers().put("option:open", this);
SceneryDefinition.forId(2113).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(30941).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2112).getHandlers().put("option:open", this);
return this;
}
@@ -2,7 +2,7 @@ package core.game.content.activity.guild;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -46,10 +46,10 @@ public final class RangingGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2514).getHandlers().put("option:open", this);
ObjectDefinition.forId(2511).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2512).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(2513).getHandlers().put("option:fire-at", this);
SceneryDefinition.forId(2514).getHandlers().put("option:open", this);
SceneryDefinition.forId(2511).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2512).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(2513).getHandlers().put("option:fire-at", this);
new RangingGuildDoorman().init();
new GuardDialogue().init();
new LeatherWorkerDialogue().init();
@@ -1,7 +1,7 @@
package core.game.content.activity.guild;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.Skillcape;
import core.game.content.global.action.ClimbActionHandler;
@@ -27,12 +27,12 @@ public final class WizardGuildPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(1600).getHandlers().put("option:open", this);
ObjectDefinition.forId(1601).getHandlers().put("option:open", this);
SceneryDefinition.forId(1600).getHandlers().put("option:open", this);
SceneryDefinition.forId(1601).getHandlers().put("option:open", this);
NPCDefinition.forId(462).getHandlers().put("option:teleport", this);
ObjectDefinition.forId(2154).getHandlers().put("option:open", this);
ObjectDefinition.forId(2155).getHandlers().put("option:open", this);
ObjectDefinition.forId(1722).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2154).getHandlers().put("option:open", this);
SceneryDefinition.forId(2155).getHandlers().put("option:open", this);
SceneryDefinition.forId(1722).getHandlers().put("option:climb-up", this);
new WizardDistentorDialogue().init();
new ZavisticRarveDialogue().init();
new ProfessorImblewynDialogue().init();
@@ -1,6 +1,6 @@
package core.game.content.activity.gwd;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.plugin.Initializable;
import core.game.content.dialogue.FacialExpression;
import core.game.node.entity.skill.Skills;
@@ -26,10 +26,10 @@ public final class GodwarsEntranceHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(26340).getHandlers().put("option:tie-rope", this);
ObjectDefinition.forId(26341).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(26338).getHandlers().put("option:move", this);
ObjectDefinition.forId(26305).getHandlers().put("option:crawl-through", this);
SceneryDefinition.forId(26340).getHandlers().put("option:tie-rope", this);
SceneryDefinition.forId(26341).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(26338).getHandlers().put("option:move", this);
SceneryDefinition.forId(26305).getHandlers().put("option:crawl-through", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.gwd;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.container.impl.EquipmentContainer;
import core.game.content.global.action.DoorActionHandler;
@@ -331,7 +331,7 @@ public final class GodwarsMapzone extends MapZone implements Plugin<Object> {
@Override
public boolean pulse() {
object.getDefinition().getOptions()[1] = "open";
ObjectDefinition.getOptionHandler(object.getId(), "open").handle(player, object, "open");
SceneryDefinition.getOptionHandler(object.getId(), "open").handle(player, object, "open");
return true;
}
});
@@ -1,7 +1,7 @@
package core.game.content.activity.magearena;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueAction;
import core.game.content.global.GodType;
import core.game.interaction.OptionHandler;
@@ -53,11 +53,11 @@ public final class MageArenaPlugin extends OptionHandler {
ItemDefinition.forId(2412).getHandlers().put("option:take", this);
ItemDefinition.forId(2413).getHandlers().put("option:take", this);
ItemDefinition.forId(2414).getHandlers().put("option:take", this);
ObjectDefinition.forId(2873).getHandlers().put("option:pray at", this);
ObjectDefinition.forId(2874).getHandlers().put("option:pray at", this);
ObjectDefinition.forId(2875).getHandlers().put("option:pray at", this);
ObjectDefinition.forId(2878).getHandlers().put("option:step-into", this);
ObjectDefinition.forId(2879).getHandlers().put("option:step-into", this);
SceneryDefinition.forId(2873).getHandlers().put("option:pray at", this);
SceneryDefinition.forId(2874).getHandlers().put("option:pray at", this);
SceneryDefinition.forId(2875).getHandlers().put("option:pray at", this);
SceneryDefinition.forId(2878).getHandlers().put("option:step-into", this);
SceneryDefinition.forId(2879).getHandlers().put("option:step-into", this);
return this;
}
@@ -2,7 +2,7 @@ package core.game.content.activity.mta;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.mta.impl.TelekineticZone;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -41,13 +41,13 @@ public class MageTrainingArenaPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(6885).getHandlers().put("option:destroy", this);
ItemDefinition.forId(6885).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(10721).getHandlers().put("option:enter", this);
SceneryDefinition.forId(10721).getHandlers().put("option:enter", this);
NPCDefinition.forId(3103).getHandlers().put("option:trade-with", this);
for (MTAType type : MTAType.values()) {
if (type.getZone() != null) {
ZoneBuilder.configure(type.getZone());
}
ObjectDefinition.forId(type.getObjectId()).getHandlers().put("option:enter", this);
SceneryDefinition.forId(type.getObjectId()).getHandlers().put("option:enter", this);
}
ItemDefinition.forId(TelekineticZone.STATUE).getHandlers().put("option:observe", this);
ItemDefinition.forId(TelekineticZone.STATUE).getHandlers().put("option:reset", this);
@@ -143,7 +143,7 @@ public class AlchemistZone extends MTAZone {
player.getDialogueInterpreter().sendDialogue("This item isn't yours to wield, it belongs to the arena!");
return true;
} else if (target.getName().equals("Cupboard")) {
search(player, target.asObject());
search(player, target.asScenery());
return true;
}
}
@@ -140,7 +140,7 @@ public class EnchantingZone extends MTAZone {
if (e instanceof Player) {
Player player = e.asPlayer();
if (target.getId() >= 10799 && target.getId() <= 10802) {
Shapes.forId(target.getId()).take(player, target.asObject());
Shapes.forId(target.getId()).take(player, target.asScenery());
return true;
}
if (target.getId() == 10803) {
@@ -135,7 +135,7 @@ public class GraveyardZone extends MTAZone {
deposit(player);
return true;
} else if (target.getId() >= 10725 && target.getId() <= 10728) {
BoneType.forObject(target.getId()).grab(player, target.asObject());
BoneType.forObject(target.getId()).grab(player, target.asScenery());
return true;
}
}
@@ -3,7 +3,7 @@ package core.game.content.activity.partyroom;
import java.util.ArrayList;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
@@ -50,7 +50,7 @@ public final class BalloonManager extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
for (PartyBalloon balloon : PartyBalloon.values()) {
ObjectDefinition.forId(balloon.getBalloonId()).getHandlers().put("option:burst", this);
SceneryDefinition.forId(balloon.getBalloonId()).getHandlers().put("option:burst", this);
}
return this;
}
@@ -59,7 +59,7 @@ public final class BalloonManager extends OptionHandler {
public boolean handle(Player player, Node node, String option) {
switch (option) {
case "burst":
PartyBalloon.forId(node.getId()).burst(player, node.asObject());
PartyBalloon.forId(node.getId()).burst(player, node.asScenery());
return true;
}
return true;
@@ -6,7 +6,7 @@ import java.util.List;
import java.util.Map;
import api.ContentAPI;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -17,7 +17,6 @@ import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.RunScript;
import core.game.node.item.Item;
import core.game.node.object.Scenery;
import core.game.node.object.SceneryBuilder;
@@ -69,10 +68,10 @@ public final class PartyRoomPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(CLOSED_CHEST).getHandlers().put("option:open", this);
ObjectDefinition.forId(OPEN_CHEST).getHandlers().put("option:deposit", this);
ObjectDefinition.forId(OPEN_CHEST).getHandlers().put("option:shut", this);
ObjectDefinition.forId(LEVER).getHandlers().put("option:pull", this);
SceneryDefinition.forId(CLOSED_CHEST).getHandlers().put("option:open", this);
SceneryDefinition.forId(OPEN_CHEST).getHandlers().put("option:deposit", this);
SceneryDefinition.forId(OPEN_CHEST).getHandlers().put("option:shut", this);
SceneryDefinition.forId(LEVER).getHandlers().put("option:pull", this);
PluginManager.definePlugin(new DepositInterfaceHandler());
PluginManager.definePlugin(new BalloonManager());
return this;
@@ -83,7 +82,7 @@ public final class PartyRoomPlugin extends OptionHandler {
switch (node.getId()) {
case CLOSED_CHEST:
player.animate(Animation.create(536));
SceneryBuilder.replace(node.asObject(), node.asObject().transform(OPEN_CHEST));
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(OPEN_CHEST));
break;
case OPEN_CHEST:
switch (option) {
@@ -92,12 +91,12 @@ public final class PartyRoomPlugin extends OptionHandler {
break;
case "shut":
player.animate(Animation.create(535));
SceneryBuilder.replace(node.asObject(), node.asObject().transform(CLOSED_CHEST));
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(CLOSED_CHEST));
break;
}
break;
case LEVER:
handleLever(player, node.asObject());
handleLever(player, node.asScenery());
break;
}
return true;
@@ -1,6 +1,6 @@
package core.game.content.activity.pestcontrol;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import rs09.game.world.GameWorld;
import core.game.content.activity.ActivityManager;
import core.game.interaction.OptionHandler;
@@ -33,47 +33,47 @@ public final class PCObjectHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
// Barricades
ObjectDefinition.forId(14227).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14228).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14229).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14230).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14231).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14232).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14227).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14228).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14229).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14230).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14231).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14232).getHandlers().put("option:repair", this);
// Gates
ObjectDefinition.forId(14233).getHandlers().put("option:open", this);
ObjectDefinition.forId(14234).getHandlers().put("option:close", this);
ObjectDefinition.forId(14235).getHandlers().put("option:open", this);
ObjectDefinition.forId(14236).getHandlers().put("option:close", this);
ObjectDefinition.forId(14237).getHandlers().put("option:open", this);
ObjectDefinition.forId(14237).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14238).getHandlers().put("option:close", this);
ObjectDefinition.forId(14238).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14239).getHandlers().put("option:open", this);
ObjectDefinition.forId(14239).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14240).getHandlers().put("option:close", this);
ObjectDefinition.forId(14240).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14241).getHandlers().put("option:open", this);
ObjectDefinition.forId(14241).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14242).getHandlers().put("option:close", this);
ObjectDefinition.forId(14242).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14243).getHandlers().put("option:open", this);
ObjectDefinition.forId(14243).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14244).getHandlers().put("option:close", this);
ObjectDefinition.forId(14244).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14245).getHandlers().put("option:open", this);
ObjectDefinition.forId(14245).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14246).getHandlers().put("option:close", this);
ObjectDefinition.forId(14246).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14247).getHandlers().put("option:open", this);
ObjectDefinition.forId(14247).getHandlers().put("option:repair", this);
ObjectDefinition.forId(14248).getHandlers().put("option:close", this);
ObjectDefinition.forId(14248).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14233).getHandlers().put("option:open", this);
SceneryDefinition.forId(14234).getHandlers().put("option:close", this);
SceneryDefinition.forId(14235).getHandlers().put("option:open", this);
SceneryDefinition.forId(14236).getHandlers().put("option:close", this);
SceneryDefinition.forId(14237).getHandlers().put("option:open", this);
SceneryDefinition.forId(14237).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14238).getHandlers().put("option:close", this);
SceneryDefinition.forId(14238).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14239).getHandlers().put("option:open", this);
SceneryDefinition.forId(14239).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14240).getHandlers().put("option:close", this);
SceneryDefinition.forId(14240).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14241).getHandlers().put("option:open", this);
SceneryDefinition.forId(14241).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14242).getHandlers().put("option:close", this);
SceneryDefinition.forId(14242).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14243).getHandlers().put("option:open", this);
SceneryDefinition.forId(14243).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14244).getHandlers().put("option:close", this);
SceneryDefinition.forId(14244).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14245).getHandlers().put("option:open", this);
SceneryDefinition.forId(14245).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14246).getHandlers().put("option:close", this);
SceneryDefinition.forId(14246).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14247).getHandlers().put("option:open", this);
SceneryDefinition.forId(14247).getHandlers().put("option:repair", this);
SceneryDefinition.forId(14248).getHandlers().put("option:close", this);
SceneryDefinition.forId(14248).getHandlers().put("option:repair", this);
// Towers
ObjectDefinition.forId(14296).getHandlers().put("option:climb", this);
SceneryDefinition.forId(14296).getHandlers().put("option:climb", this);
// Lander crossing plank
ObjectDefinition.forId(14315).getHandlers().put("option:cross", this);
ObjectDefinition.forId(25631).getHandlers().put("option:cross", this);
ObjectDefinition.forId(25632).getHandlers().put("option:cross", this);
SceneryDefinition.forId(14315).getHandlers().put("option:cross", this);
SceneryDefinition.forId(25631).getHandlers().put("option:cross", this);
SceneryDefinition.forId(25632).getHandlers().put("option:cross", this);
return this;
}
@@ -5,7 +5,7 @@ import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import core.game.node.entity.skill.Skills;
@@ -241,7 +241,7 @@ public final class PuroPuroPlugin extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
NPCDefinition.forId(6070).getHandlers().put("option:trade", this);
ObjectDefinition.forId(24991).getHandlers().put("option:enter", this);
SceneryDefinition.forId(24991).getHandlers().put("option:enter", this);
ItemDefinition.forId(11273).getHandlers().put("option:toggle-view", this);
ItemDefinition.forId(11258).getHandlers().put("option:butterfly-jar", this);
ItemDefinition.forId(11258).getHandlers().put("option:impling-jar", this);
@@ -197,7 +197,7 @@ public class PlunderZones implements Plugin<Object> {
}
return true;
}
PlunderObject object = target instanceof NPC ? null : new PlunderObject(target.asObject()); //PlunderObject(target.getId(),target.getLocation());
PlunderObject object = target instanceof NPC ? null : new PlunderObject(target.asScenery()); //PlunderObject(target.getId(),target.getLocation());
PlunderObjectManager manager = player.getPlunderObjectManager();
boolean alreadyOpened = manager.openedMap.getOrDefault(object.getLocation(),false);
boolean charmed = manager.charmedMap.getOrDefault(object.getLocation(),false);
@@ -243,7 +243,7 @@ public class PlunderZones implements Plugin<Object> {
if (!alreadyOpened && (success || charmed)) {
player.getPacketDispatch().sendMessage("You successfully search the urn...");
SceneryBuilder.replace(target.asObject(), target.asObject().transform(object.openId), 5);
SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(object.openId), 5);
manager.registerOpened(object);
reward(player,object.getId());
} else {
@@ -255,7 +255,7 @@ public class PlunderZones implements Plugin<Object> {
player.getPacketDispatch().sendMessage("You already checked for snakes.");
} else {
player.getPacketDispatch().sendMessage("You check the urn for snakes...");
SceneryBuilder.replace(target.asObject(), target.asObject().transform(object.snakeId), 5);
SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(object.snakeId), 5);
}
}
break;
@@ -1,7 +1,7 @@
package core.game.content.activity.pyramidplunder;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -43,16 +43,16 @@ public final class PyramidOptionHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(16484).getHandlers().put("option:search", this);
ObjectDefinition.forId(16485).getHandlers().put("option:search", this);
ObjectDefinition.forId(16487).getHandlers().put("option:search", this);
ObjectDefinition.forId(16488).getHandlers().put("option:search", this);
ObjectDefinition.forId(16490).getHandlers().put("option:search", this);
ObjectDefinition.forId(16491).getHandlers().put("option:search", this);
ObjectDefinition.forId(16493).getHandlers().put("option:search", this);
ObjectDefinition.forId(16494).getHandlers().put("option:enter", this);
ObjectDefinition.forId(16458).getHandlers().put("option:leave tomb", this);
ObjectDefinition.forId(16459).getHandlers().put("option:leave tomb", this);
SceneryDefinition.forId(16484).getHandlers().put("option:search", this);
SceneryDefinition.forId(16485).getHandlers().put("option:search", this);
SceneryDefinition.forId(16487).getHandlers().put("option:search", this);
SceneryDefinition.forId(16488).getHandlers().put("option:search", this);
SceneryDefinition.forId(16490).getHandlers().put("option:search", this);
SceneryDefinition.forId(16491).getHandlers().put("option:search", this);
SceneryDefinition.forId(16493).getHandlers().put("option:search", this);
SceneryDefinition.forId(16494).getHandlers().put("option:enter", this);
SceneryDefinition.forId(16458).getHandlers().put("option:leave tomb", this);
SceneryDefinition.forId(16459).getHandlers().put("option:leave tomb", this);
NPCDefinition.forId(4476).getHandlers().put("option:start-minigame", this);
NPCDefinition.forId(4476).getHandlers().put("option:talk-to",this);
return null;
@@ -1,6 +1,6 @@
package core.game.content.activity.stronghold;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentPlugin;
import core.game.content.dialogue.DialogueInterpreter;
@@ -59,7 +59,7 @@ public final class StrongHoldSecurityPlugin extends MapZone implements Plugin<Ob
PluginManager.definePlugin(new OptionHandler() {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(16154).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(16154).getHandlers().put("option:climb-down", this);
return this;
}
@@ -12,7 +12,7 @@ import static core.game.content.activity.stronghold.playersafety.StrongHoldOfPla
import static core.game.content.activity.stronghold.playersafety.StrongHoldOfPlayerSafetyPlugin.forId;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueAction;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
@@ -34,23 +34,23 @@ public class PSOptionHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(JAIL_ENTRANCE_ID_ENTER).getHandlers().put("option:use", this);
ObjectDefinition.forId(JAIL_ENTRANCE_LEAVE).getHandlers().put("option:leave", this);
ObjectDefinition.forId(JAIL_STAIRS_UP).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(JAIL_STAIRS_DOWN).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(29732).getHandlers().put("option:open", this);
ObjectDefinition.forId(29624).getHandlers().put("option:open", this);
ObjectDefinition.forId(29728).getHandlers().put("option:enter", this);
ObjectDefinition.forId(29735).getHandlers().put("option:pull-back", this);
ObjectDefinition.forId(29623).getHandlers().put("option:use", this);
ObjectDefinition.forId(29730).getHandlers().put("option:pull", this);
ObjectDefinition.forId(29731).getHandlers().put("option:pull", this);
ObjectDefinition.forId(29577).getHandlers().put("option:open", this);
ObjectDefinition.forId(29578).getHandlers().put("option:search", this);
SceneryDefinition.forId(JAIL_ENTRANCE_ID_ENTER).getHandlers().put("option:use", this);
SceneryDefinition.forId(JAIL_ENTRANCE_LEAVE).getHandlers().put("option:leave", this);
SceneryDefinition.forId(JAIL_STAIRS_UP).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(JAIL_STAIRS_DOWN).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(29732).getHandlers().put("option:open", this);
SceneryDefinition.forId(29624).getHandlers().put("option:open", this);
SceneryDefinition.forId(29728).getHandlers().put("option:enter", this);
SceneryDefinition.forId(29735).getHandlers().put("option:pull-back", this);
SceneryDefinition.forId(29623).getHandlers().put("option:use", this);
SceneryDefinition.forId(29730).getHandlers().put("option:pull", this);
SceneryDefinition.forId(29731).getHandlers().put("option:pull", this);
SceneryDefinition.forId(29577).getHandlers().put("option:open", this);
SceneryDefinition.forId(29578).getHandlers().put("option:search", this);
ItemDefinition.forId(TEST_PAPER_ITEM_ID).getHandlers().put("option:take exam", this);
ObjectDefinition.forId(29729).getHandlers().put("option:climb", this);
SceneryDefinition.forId(29729).getHandlers().put("option:climb", this);
for (JailPlaques plaque : JailPlaques.values()) {
ObjectDefinition.forId(plaque.getObjectId()).getHandlers().put("option:read-plaque on", this);
SceneryDefinition.forId(plaque.getObjectId()).getHandlers().put("option:read-plaque on", this);
}
return this;
}
@@ -61,7 +61,7 @@ public class PSOptionHandler extends OptionHandler {
boolean locked = config == (1 << 29) || config == (0 << 26);
switch (node.getId()) {
case 29577:// chest
SceneryBuilder.replace(node.asObject(), node.asObject().transform(29578), 60);
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(29578), 60);
return true;
case 29578:
switch (option) {
@@ -127,7 +127,7 @@ public class PSOptionHandler extends OptionHandler {
if (!player.getSavedData().getGlobalData().hasReadPlaques()) {
player.sendMessage("This door is locked.");
} else {
DoorActionHandler.handleAutowalkDoor(player, node.asObject());
DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
}
return true;
case 29728:
@@ -1,7 +1,7 @@
package core.game.content.activity.wguild;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueInterpreter;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.action.DoorActionHandler;
@@ -31,8 +31,8 @@ public final class WarriorsGuild extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15653).getHandlers().put("option:open", this);
ObjectDefinition.forId(1530).getHandlers().put("option:open", this);
SceneryDefinition.forId(15653).getHandlers().put("option:open", this);
SceneryDefinition.forId(1530).getHandlers().put("option:open", this);
NPCDefinition.forId(4287).getHandlers().put("option:claim-shield", this);
NPCDefinition.setOptionHandler("claim-tokens", this);
PluginManager.definePlugin(new ClaimTokenDialogue());
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.impl.EquipmentContainer;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -89,7 +89,7 @@ public final class BarrelRoom extends MapZone implements Plugin<Object> {
PluginManager.definePlugin(new OptionHandler() {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15668).getHandlers().put("option:pick-up", this);
SceneryDefinition.forId(15668).getHandlers().put("option:pick-up", this);
return this;
}
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -167,7 +167,7 @@ public final class CatapultRoom extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(SHIELD_ID).getHandlers().put("option:wield", this);
ObjectDefinition.forId(15657).getHandlers().put("option:view", this);
SceneryDefinition.forId(15657).getHandlers().put("option:view", this);
return this;
}
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.impl.EquipmentContainer;
import core.plugin.Initializable;
import core.game.content.dialogue.DialogueInterpreter;
@@ -135,8 +135,8 @@ public final class CyclopesRoom extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15641).getHandlers().put("option:open", this);
ObjectDefinition.forId(15644).getHandlers().put("option:open", this);
SceneryDefinition.forId(15641).getHandlers().put("option:open", this);
SceneryDefinition.forId(15644).getHandlers().put("option:open", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.activity.wguild.dummy;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import core.game.node.entity.skill.Skills;
@@ -97,9 +97,9 @@ public final class DummyRoom extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15656).getHandlers().put("option:view", this);
SceneryDefinition.forId(15656).getHandlers().put("option:view", this);
for (Dummy dummy : Dummy.values()) {
ObjectDefinition.forId(dummy.getObject().getId()).getHandlers().put("option:hit", this);
SceneryDefinition.forId(dummy.getObject().getId()).getHandlers().put("option:hit", this);
}
GameWorld.getPulser().submit(new Pulse(10) {
boolean activeDummy;
@@ -1,7 +1,7 @@
package core.game.content.activity.wguild.shot;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.container.impl.EquipmentContainer;
import core.plugin.Initializable;
import core.game.content.dialogue.DialogueInterpreter;
@@ -73,8 +73,8 @@ public final class ShotPutRoom extends DialoguePlugin {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(15664).getHandlers().put("option:throw", this);
ObjectDefinition.forId(15665).getHandlers().put("option:throw", this);
SceneryDefinition.forId(15664).getHandlers().put("option:throw", this);
SceneryDefinition.forId(15665).getHandlers().put("option:throw", this);
ItemDefinition.forId(8858).getHandlers().put("option:take", this);
ItemDefinition.forId(8859).getHandlers().put("option:take", this);
return this;
@@ -1,6 +1,6 @@
package core.game.content.dialogue;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -17,11 +17,11 @@ public final class DairyChurnOptionPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(10093).getHandlers().put("option:churn", this);
ObjectDefinition.forId(10094).getHandlers().put("option:churn", this);
ObjectDefinition.forId(25720).getHandlers().put("option:churn", this);
ObjectDefinition.forId(34800).getHandlers().put("option:churn", this);
ObjectDefinition.forId(35931).getHandlers().put("option:churn", this);
SceneryDefinition.forId(10093).getHandlers().put("option:churn", this);
SceneryDefinition.forId(10094).getHandlers().put("option:churn", this);
SceneryDefinition.forId(25720).getHandlers().put("option:churn", this);
SceneryDefinition.forId(34800).getHandlers().put("option:churn", this);
SceneryDefinition.forId(35931).getHandlers().put("option:churn", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.global.worldevents.shootingstar;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -24,7 +24,7 @@ public class ScoreboardHandler extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(38669).getHandlers().put("option:read",this);
SceneryDefinition.forId(38669).getHandlers().put("option:read",this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.global.worldevents.shootingstar;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -39,12 +39,12 @@ public class StarChartPlugin extends ComponentPlugin {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(25582).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25581).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25580).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25583).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25579).getHandlers().put("option:look-at",this);
ObjectDefinition.forId(25578).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25582).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25581).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25580).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25583).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25579).getHandlers().put("option:look-at",this);
SceneryDefinition.forId(25578).getHandlers().put("option:look-at",this);
return this;
}
}
@@ -3,7 +3,7 @@ import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -240,10 +240,10 @@ public class ChristmasEvent extends HolidayEvent {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(28296).getHandlers().put("option:collect", this);
SceneryDefinition.forId(28296).getHandlers().put("option:collect", this);
ItemDefinition.forId(BALL_OF_SNOW.getId()).getHandlers().put("option:build", this);
for (int i = 28266; i < 28296; i++) {
ObjectDefinition.forId(i).getHandlers().put("option:add-to", this);
SceneryDefinition.forId(i).getHandlers().put("option:add-to", this);
}
ItemDefinition.forId(SNOWGLOBE.getId()).getHandlers().put("option:shake", this);
return this;
@@ -276,7 +276,7 @@ public class ChristmasEvent extends HolidayEvent {
}
break;
case "add-to":
if (node.asObject().getId() == 28295) {
if (node.asScenery().getId() == 28295) {
player.sendMessage("You need a " + (player.getZoneMonitor().isInZone(getName()) ? "weapon or hat " : "hat") + " to complete this snowman.");
return true;
}
@@ -291,9 +291,9 @@ public class ChristmasEvent extends HolidayEvent {
}
player.sendMessage("You add some snow to the snowman.");
player.lock(1);
player.animate(Animation.create(node.asObject().getId() <= 28278 ? 7532 : 7533));
SceneryBuilder.replace(node.asObject(), node.asObject().transform(node.asObject().getId() + 1));
if (node.asObject().getId() + 1 >= 28295) {
player.animate(Animation.create(node.asScenery().getId() <= 28278 ? 7532 : 7533));
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(node.asScenery().getId() + 1));
if (node.asScenery().getId() + 1 >= 28295) {
if (player.getZoneMonitor().isInZone(getName())) {
player.sendMessages("The snowman is almsot complete! Talk to a snow imp to get a hat or weapon to", "complete it.");
} else {
@@ -433,7 +433,7 @@ public class ChristmasEvent extends HolidayEvent {
id = 6748;
}
final int npcId = id;
SceneryBuilder.remove(event.getUsedWith().asObject());
SceneryBuilder.remove(event.getUsedWith().asScenery());
final NPC snowman = NPC.create(npcId, event.getUsedWith().getLocation());
snowman.init();
snowman.faceTemporary(player, 2);
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import rs09.ServerConstants;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import core.game.content.dialogue.DialogueAction;
@@ -223,10 +223,10 @@ public class DeathMansionEvent extends HolidayEvent {
player.teleport(PORTAL_LOCATION);
return true;
case 27276:
handlePassageWay(player, target.asObject());
handlePassageWay(player, target.asScenery());
return true;
case 27266:
passSpiderWeb(player, target.asObject());
passSpiderWeb(player, target.asScenery());
return true;
case 27242:
case 27243:
@@ -304,7 +304,7 @@ public class DeathMansionEvent extends HolidayEvent {
@Override
public void handle(Player player, int buttonId) {
if (buttonId == 2) {
item.search(player, target.asObject());
item.search(player, target.asScenery());
} else {
player.animate(Animation.create(7271));
player.getDialogueInterpreter().sendDialogues(player, FacialExpression.SUSPICIOUS, "Arrghhh! My eyes!");
@@ -318,9 +318,9 @@ public class DeathMansionEvent extends HolidayEvent {
@Override
public void handle(Player player, int buttonId) {
if (buttonId == 1) {
item.search(player, target.asObject());
item.search(player, target.asScenery());
} else {
player.getPacketDispatch().sendSceneryAnimation(target.asObject(), Animation.create(7278));
player.getPacketDispatch().sendSceneryAnimation(target.asScenery(), Animation.create(7278));
player.animate(Animation.create(7272));
player.getDialogueInterpreter().sendDialogues(player, FacialExpression.DISGUSTED, "That wasn't such a good idea.");
}
@@ -328,7 +328,7 @@ public class DeathMansionEvent extends HolidayEvent {
});
return true;
}
item.search(player, target.asObject());
item.search(player, target.asScenery());
return true;
case 27278:
final Location end = target.getLocation().equals(new Location(1633, 4824, 0)) ? new Location(1630, 4824, 0) : target.getLocation().equals(new Location(1627, 4819, 0)) ? new Location(1627, 4819, 0) : target.getLocation().equals(new Location(1630, 4819, 0)) ? new Location(1627, 4819, 0) : target.getLocation().equals(1624, 4822, 0) ? new Location(1624, 4828, 0) : new Location(1637, 4820, 0);
@@ -359,7 +359,7 @@ public class DeathMansionEvent extends HolidayEvent {
});
}
player.getPacketDispatch().sendSceneryAnimation(target.asObject(), Animation.create(7296));
player.getPacketDispatch().sendSceneryAnimation(target.asScenery(), Animation.create(7296));
AgilityHandler.walk(player, -1, player.getLocation(), target.getLocation(), null, 0.0, null);
GameWorld.getPulser().submit(new Pulse(1, player) {
@@ -749,7 +749,7 @@ public class DeathMansionEvent extends HolidayEvent {
if (item == null || event.getUsedItem().getId() != item.getItem().getId()) {
return false;
}
item.useWithEvent(player, event.getUsedWith().asObject());
item.useWithEvent(player, event.getUsedWith().asScenery());
return true;
}
@@ -1478,7 +1478,7 @@ public class DeathMansionEvent extends HolidayEvent {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new DarkPortalDialogue());
ObjectDefinition.forId(DEATH_PORTAL).getHandlers().put("option:enter", this);
SceneryDefinition.forId(DEATH_PORTAL).getHandlers().put("option:enter", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.free.blackknightsfortress;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
@@ -52,15 +52,15 @@ public final class BKFortressPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(9589).getHandlers().put("option:read", this);
ObjectDefinition.forId(74).getHandlers().put("option:open", this);
ObjectDefinition.forId(73).getHandlers().put("option:open", this);
ObjectDefinition.forId(2337).getHandlers().put("option:open", this);
ObjectDefinition.forId(2338).getHandlers().put("option:open", this);
ObjectDefinition.forId(2341).getHandlers().put("option:push", this);
ObjectDefinition.forId(17148).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(17149).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(17160).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(2342).getHandlers().put("option:listen-at", this);
SceneryDefinition.forId(74).getHandlers().put("option:open", this);
SceneryDefinition.forId(73).getHandlers().put("option:open", this);
SceneryDefinition.forId(2337).getHandlers().put("option:open", this);
SceneryDefinition.forId(2338).getHandlers().put("option:open", this);
SceneryDefinition.forId(2341).getHandlers().put("option:push", this);
SceneryDefinition.forId(17148).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(17149).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(17160).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(2342).getHandlers().put("option:listen-at", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.free.demonslayer;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -34,11 +34,11 @@ public final class DemonSlayerPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(881).getHandlers().put("option:open", this);
ObjectDefinition.forId(882).getHandlers().put("option:close", this);
ObjectDefinition.forId(882).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(DRAIN_ID).getHandlers().put("option:search", this);
ObjectDefinition.forId(17429).getHandlers().put("option:take", this);
SceneryDefinition.forId(881).getHandlers().put("option:open", this);
SceneryDefinition.forId(882).getHandlers().put("option:close", this);
SceneryDefinition.forId(882).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(DRAIN_ID).getHandlers().put("option:search", this);
SceneryDefinition.forId(17429).getHandlers().put("option:take", this);
NPCDefinition.forId(DemonSlayerCutscene.DELRITH).getHandlers().put("option:attack", this);
NPCDefinition.forId(DemonSlayerCutscene.WEAKENED_DELRITH).getHandlers().put("option:banish", this);
return this;
@@ -2,7 +2,7 @@ package core.game.content.quest.free.dragonslayer;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
@@ -40,63 +40,63 @@ public final class DragonSlayerPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(25115).getHandlers().put("option:open", this);// magic
SceneryDefinition.forId(25115).getHandlers().put("option:open", this);// magic
// door.
NPCDefinition.forId(747).getHandlers().put("option:trade", this);// oziach.
ObjectDefinition.forId(2595).getHandlers().put("option:open", this);// maze
SceneryDefinition.forId(2595).getHandlers().put("option:open", this);// maze
// main
// door.
// maze first floor.
ObjectDefinition.forId(32968).getHandlers().put("option:open", this);
ObjectDefinition.forId(2602).getHandlers().put("option:open", this);
ObjectDefinition.forId(2596).getHandlers().put("option:open", this);// red
SceneryDefinition.forId(32968).getHandlers().put("option:open", this);
SceneryDefinition.forId(2602).getHandlers().put("option:open", this);
SceneryDefinition.forId(2596).getHandlers().put("option:open", this);// red
// door.
ObjectDefinition.forId(1752).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(25038).getHandlers().put("option:climb-up", this);// trapdoor
SceneryDefinition.forId(1752).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(25038).getHandlers().put("option:climb-up", this);// trapdoor
// ladder
ObjectDefinition.forId(25214).getHandlers().put("option:open", this);// trapdoor
ObjectDefinition.forId(1746).getHandlers().put("option:climb-down", this);// ladder
ObjectDefinition.forId(2605).getHandlers().put("option:climb-down", this);// ladder
SceneryDefinition.forId(25214).getHandlers().put("option:open", this);// trapdoor
SceneryDefinition.forId(1746).getHandlers().put("option:climb-down", this);// ladder
SceneryDefinition.forId(2605).getHandlers().put("option:climb-down", this);// ladder
// maze second floor.
ObjectDefinition.forId(2597).getHandlers().put("option:open", this);// orange
SceneryDefinition.forId(2597).getHandlers().put("option:open", this);// orange
// door.
ObjectDefinition.forId(1747).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(25045).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(1747).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(25045).getHandlers().put("option:climb-down", this);
// maze third floor
ObjectDefinition.forId(2598).getHandlers().put("option:open", this);// yellow
SceneryDefinition.forId(2598).getHandlers().put("option:open", this);// yellow
// door.
// basement floor
ObjectDefinition.forId(2599).getHandlers().put("option:open", this);// blue
SceneryDefinition.forId(2599).getHandlers().put("option:open", this);// blue
// door.
ObjectDefinition.forId(2600).getHandlers().put("option:open", this);// purple
SceneryDefinition.forId(2600).getHandlers().put("option:open", this);// purple
// door.
ObjectDefinition.forId(2601).getHandlers().put("option:open", this);// green
SceneryDefinition.forId(2601).getHandlers().put("option:open", this);// green
// door.
ObjectDefinition.forId(2603).getHandlers().put("option:open", this);// closed
SceneryDefinition.forId(2603).getHandlers().put("option:open", this);// closed
// chest.
ObjectDefinition.forId(2604).getHandlers().put("option:search", this);// search
SceneryDefinition.forId(2604).getHandlers().put("option:search", this);// search
// chest.
ObjectDefinition.forId(2604).getHandlers().put("option:close", this);// search
SceneryDefinition.forId(2604).getHandlers().put("option:close", this);// search
// chest.
ObjectDefinition.forId(1755).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(1755).getHandlers().put("option:climb-up", this);
// map parts
ItemDefinition.forId(DragonSlayer.MAZE_PIECE.getId()).getHandlers().put("option:study", this);
ItemDefinition.forId(DragonSlayer.MAGIC_PIECE.getId()).getHandlers().put("option:study", this);
ItemDefinition.forId(DragonSlayer.WORMBRAIN_PIECE.getId()).getHandlers().put("option:study", this);
ItemDefinition.forId(DragonSlayer.CRANDOR_MAP.getId()).getHandlers().put("option:study", this);
// dwarv mine
ObjectDefinition.forId(2587).getHandlers().put("option:open", this);
SceneryDefinition.forId(2587).getHandlers().put("option:open", this);
NPCDefinition.forId(745).getHandlers().put("option:talk-to", this);
// lady lumby
ObjectDefinition.forId(25036).getHandlers().put("option:repair", this);
ObjectDefinition.forId(2589).getHandlers().put("option:repair", this);
SceneryDefinition.forId(25036).getHandlers().put("option:repair", this);
SceneryDefinition.forId(2589).getHandlers().put("option:repair", this);
// crandor
ObjectDefinition.forId(25154).getHandlers().put("option:enter", this);
ObjectDefinition.forId(2606).getHandlers().put("option:open", this);
ObjectDefinition.forId(25213).getHandlers().put("option:climb", this);
ObjectDefinition.forId(25161).getHandlers().put("option:climb-over", this);
SceneryDefinition.forId(25154).getHandlers().put("option:enter", this);
SceneryDefinition.forId(2606).getHandlers().put("option:open", this);
SceneryDefinition.forId(25213).getHandlers().put("option:climb", this);
SceneryDefinition.forId(25161).getHandlers().put("option:climb-over", this);
NPCDefinition.forId(742).getHandlers().put("option:attack", this);
NPCDefinition.forId(745).getHandlers().put("option:attack", this);
// reward items
@@ -106,9 +106,9 @@ public final class DragonSlayerPlugin extends OptionHandler {
ItemDefinition.forId(2669).getHandlers().put("option:wear", this);
ItemDefinition.forId(2661).getHandlers().put("option:wear", this);
// guild
ObjectDefinition.forId(24357).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(10558).getHandlers().put("option:open", this);
ObjectDefinition.forId(10560).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(24357).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(10558).getHandlers().put("option:open", this);
SceneryDefinition.forId(10560).getHandlers().put("option:climb-up", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.free.goblindiplomacy;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.NodeUsageEvent;
import core.game.interaction.OptionHandler;
import core.game.interaction.UseWithHandler;
@@ -37,7 +37,7 @@ public final class GoblinDiplomacyPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
ItemDefinition.forId(288).getHandlers().put("option:wear", this);
for (int object : CRATES) {
ObjectDefinition.forId(object).getHandlers().put("option:search", this);
SceneryDefinition.forId(object).getHandlers().put("option:search", this);
}
for (GoblinMailPlugin.GoblinMail mail : GoblinMailPlugin.GoblinMail.values()) {
ItemDefinition.forId(mail.getProduct().getId()).getHandlers().put("option:wear", this);
@@ -1,7 +1,7 @@
package core.game.content.quest.free.piratestreasure;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DigAction;
import core.game.content.global.action.DigSpadeHandler;
import core.game.interaction.OptionHandler;
@@ -30,7 +30,7 @@ public final class PiratesTreasurePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2079).getHandlers().put("option:open", this);// blue
SceneryDefinition.forId(2079).getHandlers().put("option:open", this);// blue
// moon
// chest(pirates
// treasure
@@ -1,7 +1,7 @@
package core.game.content.quest.free.princealirescue;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -24,9 +24,9 @@ public class PrinceAliRescuePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2881).getHandlers().put("option:open", this);// prison
SceneryDefinition.forId(2881).getHandlers().put("option:open", this);// prison
// door.
ObjectDefinition.forId(4639).getHandlers().put("option:open", this);// door
SceneryDefinition.forId(4639).getHandlers().put("option:open", this);// door
// to
// jail
NPCDefinition.forId(925).getHandlers().put("option:talk-to", this);
@@ -1,7 +1,7 @@
package core.game.content.quest.free.shieldofarrav;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
@@ -38,19 +38,19 @@ public final class ShieldArravPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2402).getHandlers().put("option:search", this);
ObjectDefinition.forId(2397).getHandlers().put("option:open", this);
ObjectDefinition.forId(2399).getHandlers().put("option:open", this);
ObjectDefinition.forId(2398).getHandlers().put("option:open", this);
SceneryDefinition.forId(2402).getHandlers().put("option:search", this);
SceneryDefinition.forId(2397).getHandlers().put("option:open", this);
SceneryDefinition.forId(2399).getHandlers().put("option:open", this);
SceneryDefinition.forId(2398).getHandlers().put("option:open", this);
ItemDefinition.forId(761).getHandlers().put("option:read", this);
ObjectDefinition.forId(2403).getHandlers().put("option:open", this);
ObjectDefinition.forId(2404).getHandlers().put("option:close", this);
ObjectDefinition.forId(2404).getHandlers().put("option:search", this);
SceneryDefinition.forId(2403).getHandlers().put("option:open", this);
SceneryDefinition.forId(2404).getHandlers().put("option:close", this);
SceneryDefinition.forId(2404).getHandlers().put("option:search", this);
ItemDefinition.forId(767).getHandlers().put("option:take", this);
ObjectDefinition.forId(24356).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2400).getHandlers().put("option:open", this);
ObjectDefinition.forId(2401).getHandlers().put("option:search", this);
ObjectDefinition.forId(2401).getHandlers().put("option:shut", this);
SceneryDefinition.forId(24356).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2400).getHandlers().put("option:open", this);
SceneryDefinition.forId(2401).getHandlers().put("option:search", this);
SceneryDefinition.forId(2401).getHandlers().put("option:shut", this);
ItemDefinition.forId(ShieldofArrav.PHOENIX_CERTIFICATE.getId()).getHandlers().put("option:read", this);
ItemDefinition.forId(ShieldofArrav.BLACKARM_CERTIFICATE.getId()).getHandlers().put("option:read", this);
ItemDefinition.forId(769).getHandlers().put("option:read", this);
@@ -1,6 +1,6 @@
package core.game.content.quest.free.therestlessghost;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.Entity;
@@ -61,7 +61,7 @@ public final class RestlessGhostPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
for (int coffin : COFFIN_IDS) {
for (String option : OPTIONS) {
ObjectDefinition.forId(coffin).getHandlers().put("option:" + option, this);
SceneryDefinition.forId(coffin).getHandlers().put("option:" + option, this);
}
}
new RestlessGhostNPC().newInstance(arg);
@@ -5,7 +5,7 @@ import java.util.Map;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -48,7 +48,7 @@ public final class AnimalMagnetismPlugin extends OptionHandler {
ItemDefinition.forId(4251).getHandlers().put("option:drop", this);
ItemDefinition.forId(4252).getHandlers().put("option:drop", this);
NPCDefinition.forId(5198).getHandlers().put("option:trade", this);
ObjectDefinition.forId(5167).getHandlers().put("option:push", this);
SceneryDefinition.forId(5167).getHandlers().put("option:push", this);
AnimalMagnetism.RESEARCH_NOTES.getDefinition().getHandlers().put("option:translate", this);
ItemDefinition.forId(AnimalMagnetism.CRONE_AMULET.getId()).getHandlers().put("option:wear", this);
ItemDefinition.forId(AnimalMagnetism.CRONE_AMULET.getId()).getHandlers().put("option:equip", this);
@@ -1,6 +1,6 @@
package core.game.content.quest.members.dwarfcannon;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -37,16 +37,16 @@ public class DwarfCannonPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3).getHandlers().put("option:open", this);
ObjectDefinition.forId(5).getHandlers().put("option:inspect", this);
ObjectDefinition.forId(2).getHandlers().put("option:enter", this);
ObjectDefinition.forId(13).getHandlers().put("option:climb-over", this);
ObjectDefinition.forId(15601).getHandlers().put("option:inspect", this);
SceneryDefinition.forId(3).getHandlers().put("option:open", this);
SceneryDefinition.forId(5).getHandlers().put("option:inspect", this);
SceneryDefinition.forId(2).getHandlers().put("option:enter", this);
SceneryDefinition.forId(13).getHandlers().put("option:climb-over", this);
SceneryDefinition.forId(15601).getHandlers().put("option:inspect", this);
for (int i = 15; i < 21; i++) {
ObjectDefinition.forId(i).getHandlers().put("option:inspect", this);
SceneryDefinition.forId(i).getHandlers().put("option:inspect", this);
}
ObjectDefinition.forId(15596).getHandlers().put("option:take", this);
ObjectDefinition.forId(1).getHandlers().put("option:search", this);
SceneryDefinition.forId(15596).getHandlers().put("option:take", this);
SceneryDefinition.forId(1).getHandlers().put("option:search", this);
UseWithHandler.addHandler(5, UseWithHandler.OBJECT_TYPE, new UseWithHandler(1) {
@Override
@@ -85,13 +85,13 @@ public class DwarfCannonPlugin extends OptionHandler {
switch (node.getId()) {
case 3:
if (!node.getLocation().equals(new Location(3015, 3453, 0))) {
return DoorActionHandler.handleAutowalkDoor(player, node.asObject());
return DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
}
if (quest.getStage(player) < 70) {
player.sendMessage("The door is locked.");
break;
}
return DoorActionHandler.handleAutowalkDoor(player, node.asObject());
return DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
case 5:
if (quest.getStage(player) == 50) {
player.getDialogueInterpreter().sendDialogues(player, null, "I guess I'd better fix it with the toolkit I was given.");
@@ -110,7 +110,7 @@ public class DwarfCannonPlugin extends OptionHandler {
ClimbActionHandler.climb(player, new Animation(828), new Location(2623, 3391, 0));
break;
case 15601:
if (node.getId() != node.asObject().getWrapper().getId()) {
if (node.getId() != node.asScenery().getWrapper().getId()) {
player.getDialogueInterpreter().sendDialogues(player, null, "I think I've already fixed this one.");
}
return true;
@@ -245,7 +245,7 @@ public class DwarfCannonPlugin extends OptionHandler {
@Override
public Location getDestination(Node node, Node n) {
if (n.getId() == 3) {
return DoorActionHandler.getDestination(node.asPlayer(), n.asObject());
return DoorActionHandler.getDestination(node.asPlayer(), n.asScenery());
} else if (n.getId() == 15601) {
if (n.getLocation().equals(new Location(2565, 3456, 0))) {
return new Location(2566, 3456, 0);
@@ -23,7 +23,7 @@ public class FenceInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(player.getLocation().getX() == node.getLocation().getX() ? 0 : -1, 0, 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(player.getLocation().getX() == node.getLocation().getX() ? 0 : -1, 0, 0)) {
@Override
public boolean pulse() {
GameWorld.getPulser().submit(new SqueezePulse(player));
@@ -27,7 +27,7 @@ public class GarlicPipeInteraction extends PluginInteraction {
public boolean handle(Player player, NodeUsageEvent event) {
System.out.println("Trying to handle it");
if(event.getUsed() instanceof Item && event.getUsedWith() instanceof Scenery){
Scenery usedWith = event.getUsedWith().asObject();
Scenery usedWith = event.getUsedWith().asScenery();
Item used = event.getUsedItem();
if(used.getId() == Items.GARLIC_1550 && usedWith.getId() == 41 && usedWith.getLocation().equals(Location.create(2638, 3446, 0)) && player.getQuestRepository().getStage("Fishing Contest") > 0){
@@ -49,7 +49,7 @@ public class GarlicPipeInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
if(node instanceof Scenery){
Scenery object = node.asObject();
Scenery object = node.asScenery();
if(object.getId() == 41 && object.getLocation().equals(Location.create(2638, 3446, 0)) && player.getAttribute("fishing_contest:garlic",false)){
player.getPulseManager().run(new MovementPulse(player, object.getLocation().transform(0, -1, 0)) {
@Override
@@ -27,7 +27,7 @@ public class GateInteraction extends PluginInteraction {
public boolean handleGate(Player player, Node node){
if(!player.getAttribute("fishing_contest:pass-shown",false) || player.getQuestRepository().getStage("Fishing Contest") < 10) {
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(1, 0, 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(1, 0, 0)) {
@Override
public boolean pulse() {
if(player.getQuestRepository().getStage("Fishing Contest") >= 10){
@@ -49,7 +49,7 @@ public class GateInteraction extends PluginInteraction {
public boolean handleGruborGate(Player player, Node node){
if(node.getLocation().withinDistance(Location.create(2650, 3469, 0),4)) {
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(0,-1 , 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(0,-1 , 0)) {
@Override
public boolean pulse() {
player.getDialogueInterpreter().sendDialogue("This gate is locked.");
@@ -15,7 +15,7 @@ public class StairInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
if(!player.getQuestRepository().isComplete("Fishing Contest")) {
Scenery object = node.asObject();
Scenery object = node.asScenery();
switch (object.getId()) {
case 57:
handleStairs(player,232,object);
@@ -23,9 +23,9 @@ public class VineInteraction extends PluginInteraction {
@Override
public boolean handle(Player player, Node node) {
if(node instanceof Scenery){
Scenery obj = node.asObject();
Scenery obj = node.asScenery();
if(player.getQuestRepository().getStage("Fishing Contest") > 0 && player.getQuestRepository().getStage("Fishing Contest") < 100){
player.getPulseManager().run(new MovementPulse(player, node.asObject().getLocation().transform(0, 0, 0)) {
player.getPulseManager().run(new MovementPulse(player, node.asScenery().getLocation().transform(0, 0, 0)) {
@Override
public boolean pulse() {
if(player.getInventory().containsItem(FishingContest.SPADE)) {
@@ -1,6 +1,6 @@
package core.game.content.quest.members.junglepotion;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueInterpreter;
import core.game.content.dialogue.DialoguePlugin;
import core.game.interaction.OptionHandler;
@@ -22,10 +22,10 @@ public final class JunglePotionPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2584).getHandlers().put("option:search", this);
ObjectDefinition.forId(2585).getHandlers().put("option:climb", this);
SceneryDefinition.forId(2584).getHandlers().put("option:search", this);
SceneryDefinition.forId(2585).getHandlers().put("option:climb", this);
for (JungleObjective s : JungleObjective.values()) {
ObjectDefinition.forId(s.getObjectId()).getHandlers().put("option:search", this);
SceneryDefinition.forId(s.getObjectId()).getHandlers().put("option:search", this);
}
SceneryBuilder.add(new Scenery(2585, Location.create(2828, 9522, 0), 8, 0));
return this;
@@ -1,7 +1,7 @@
package core.game.content.quest.members.lostcity;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.FacialExpression;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
@@ -42,9 +42,9 @@ public final class LostCityPlugin extends OptionHandler {
ItemDefinition.forId(1215).getHandlers().put("option:wield", this);
ItemDefinition.forId(1231).getHandlers().put("option:wield", this);
ItemDefinition.forId(5680).getHandlers().put("option:wield", this);
ObjectDefinition.forId(2409).getHandlers().put("option:chop", this);
ObjectDefinition.forId(2406).getHandlers().put("option:open", this);
ObjectDefinition.forId(1292).getHandlers().put("option:chop down", this);
SceneryDefinition.forId(2409).getHandlers().put("option:chop", this);
SceneryDefinition.forId(2406).getHandlers().put("option:open", this);
SceneryDefinition.forId(1292).getHandlers().put("option:chop down", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.members.merlinscrystal;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityManager;
import core.game.content.activity.CutscenePlugin;
import core.game.content.dialogue.DialogueInterpreter;
@@ -61,14 +61,14 @@ public final class MerlinCrystalPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new MerlinCrystalDialogue());
PluginManager.definePlugin(new MerlinCrystalItemHandler());
ObjectDefinition.forId(63).getHandlers().put("option:hide-in", this);
ObjectDefinition.forId(40026).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(72).getHandlers().put("option:open", this);
ObjectDefinition.forId(71).getHandlers().put("option:open", this);
ObjectDefinition.forId(71).getHandlers().put("option:knock-at", this);
ObjectDefinition.forId(72).getHandlers().put("option:knock-at", this);
SceneryDefinition.forId(63).getHandlers().put("option:hide-in", this);
SceneryDefinition.forId(40026).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(72).getHandlers().put("option:open", this);
SceneryDefinition.forId(71).getHandlers().put("option:open", this);
SceneryDefinition.forId(71).getHandlers().put("option:knock-at", this);
SceneryDefinition.forId(72).getHandlers().put("option:knock-at", this);
ItemDefinition.forId(530).getHandlers().put("option:drop", this);
ObjectDefinition.forId(62).getHandlers().put("option:smash", this);
SceneryDefinition.forId(62).getHandlers().put("option:smash", this);
return this;
}
@@ -82,7 +82,7 @@ public final class MerlinCrystalPlugin extends OptionHandler {
player.sendMessages("You attempt to smash the crystal...", "... and it shatters under the force of Excalibur!");
player.animate(Animation.create(390));
player.lock();
SceneryBuilder.remove(node.asObject(), 60);
SceneryBuilder.remove(node.asScenery(), 60);
quest.setStage(player, 99);
final NPC merlin = NPC.create(249, Location.create(2767, 3493, 2));
merlin.init();
@@ -125,7 +125,7 @@ public final class MerlinCrystalPlugin extends OptionHandler {
break;
}
} else {
DoorActionHandler.handleAutowalkDoor(player, node.asObject());
DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
}
return true;
case 530:
@@ -1,6 +1,6 @@
package core.game.content.quest.members.rovingelves;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.node.entity.skill.agility.AgilityHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -21,14 +21,14 @@ public final class RovingElvesObstacles extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3999).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3939).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3998).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3938).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3937).getHandlers().put("option:enter", this);
ObjectDefinition.forId(3924).getHandlers().put("option:jump", this);
ObjectDefinition.forId(3925).getHandlers().put("option:jump", this);
ObjectDefinition.forId(8742).getHandlers().put("option:pass", this);
SceneryDefinition.forId(3999).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3939).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3998).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3938).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3937).getHandlers().put("option:enter", this);
SceneryDefinition.forId(3924).getHandlers().put("option:jump", this);
SceneryDefinition.forId(3925).getHandlers().put("option:jump", this);
SceneryDefinition.forId(8742).getHandlers().put("option:pass", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.members.rovingelves;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -21,7 +21,7 @@ public final class RovingElvesPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(5252).getHandlers().put("option:search", this);
SceneryDefinition.forId(5252).getHandlers().put("option:search", this);
ItemDefinition.forId(RovingElves.CONSECRATION_SEED_CHARGED.getId()).getHandlers().put("option:plant", this);
return this;
}
@@ -2,7 +2,7 @@ package core.game.content.quest.members.thetouristrap;
import core.cache.def.impl.AnimationDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.activity.ActivityManager;
import core.game.content.activity.ActivityPlugin;
@@ -48,66 +48,66 @@ public final class TouristTrapPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2673).getHandlers().put("option:open", this);
ObjectDefinition.forId(2674).getHandlers().put("option:open", this);
ObjectDefinition.forId(2673).getHandlers().put("option:search", this);
ObjectDefinition.forId(2674).getHandlers().put("option:search", this);
ObjectDefinition.forId(2688).getHandlers().put("option:open", this);
ObjectDefinition.forId(2688).getHandlers().put("option:search", this);
ObjectDefinition.forId(2687).getHandlers().put("option:open", this);
ObjectDefinition.forId(2687).getHandlers().put("option:search", this);
ObjectDefinition.forId(2685).getHandlers().put("option:open", this);
ObjectDefinition.forId(2685).getHandlers().put("option:open", this);
ObjectDefinition.forId(2686).getHandlers().put("option:search", this);
ObjectDefinition.forId(2686).getHandlers().put("option:search", this);
ObjectDefinition.forId(18958).getHandlers().put("option:search", this);
ObjectDefinition.forId(18958).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18959).getHandlers().put("option:search", this);
ObjectDefinition.forId(18959).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18888).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18888).getHandlers().put("option:operate", this);
ObjectDefinition.forId(36748).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(18869).getHandlers().put("option:bend", this);
ObjectDefinition.forId(18870).getHandlers().put("option:escape", this);
ObjectDefinition.forId(2689).getHandlers().put("option:open", this);
ObjectDefinition.forId(1528).getHandlers().put("option:open", this);
ObjectDefinition.forId(1529).getHandlers().put("option:close", this);
ObjectDefinition.forId(18899).getHandlers().put("option:search", this);
ObjectDefinition.forId(18899).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18878).getHandlers().put("option:search", this);
ObjectDefinition.forId(18878).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18879).getHandlers().put("option:search", this);
ObjectDefinition.forId(18879).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18898).getHandlers().put("option:search", this);
ObjectDefinition.forId(18898).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18902).getHandlers().put("option:search", this);
ObjectDefinition.forId(18871).getHandlers().put("option:climb", this);
ObjectDefinition.forId(18923).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(18924).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(2676).getHandlers().put("option:open", this);
ObjectDefinition.forId(2675).getHandlers().put("option:open", this);
ObjectDefinition.forId(2676).getHandlers().put("option:watch", this);
ObjectDefinition.forId(2675).getHandlers().put("option:watch", this);
ObjectDefinition.forId(2690).getHandlers().put("option:open", this);
ObjectDefinition.forId(2691).getHandlers().put("option:open", this);
ObjectDefinition.forId(2698).getHandlers().put("option:walk through", this);
ObjectDefinition.forId(2699).getHandlers().put("option:walk through", this);
ObjectDefinition.forId(2677).getHandlers().put("option:open", this);
ObjectDefinition.forId(2678).getHandlers().put("option:search", this);
ObjectDefinition.forId(2684).getHandlers().put("option:search", this);
ObjectDefinition.forId(2684).getHandlers().put("option:look at", this);
ObjectDefinition.forId(2680).getHandlers().put("option:search", this);
ObjectDefinition.forId(2680).getHandlers().put("option:look-in", this);
ObjectDefinition.forId(2681).getHandlers().put("option:search", this);
ObjectDefinition.forId(2681).getHandlers().put("option:look in", this);
ObjectDefinition.forId(18962).getHandlers().put("option:search", this);
ObjectDefinition.forId(18962).getHandlers().put("option:look in", this);
ObjectDefinition.forId(18963).getHandlers().put("option:search", this);
ObjectDefinition.forId(18963).getHandlers().put("option:look in", this);
ObjectDefinition.forId(18951).getHandlers().put("option:look at", this);
ObjectDefinition.forId(18951).getHandlers().put("option:use", this);
ObjectDefinition.forId(2684).getHandlers().put("option:search", this);
ObjectDefinition.forId(2684).getHandlers().put("option:look at", this);
SceneryDefinition.forId(2673).getHandlers().put("option:open", this);
SceneryDefinition.forId(2674).getHandlers().put("option:open", this);
SceneryDefinition.forId(2673).getHandlers().put("option:search", this);
SceneryDefinition.forId(2674).getHandlers().put("option:search", this);
SceneryDefinition.forId(2688).getHandlers().put("option:open", this);
SceneryDefinition.forId(2688).getHandlers().put("option:search", this);
SceneryDefinition.forId(2687).getHandlers().put("option:open", this);
SceneryDefinition.forId(2687).getHandlers().put("option:search", this);
SceneryDefinition.forId(2685).getHandlers().put("option:open", this);
SceneryDefinition.forId(2685).getHandlers().put("option:open", this);
SceneryDefinition.forId(2686).getHandlers().put("option:search", this);
SceneryDefinition.forId(2686).getHandlers().put("option:search", this);
SceneryDefinition.forId(18958).getHandlers().put("option:search", this);
SceneryDefinition.forId(18958).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18959).getHandlers().put("option:search", this);
SceneryDefinition.forId(18959).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18888).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18888).getHandlers().put("option:operate", this);
SceneryDefinition.forId(36748).getHandlers().put("option:talk-to", this);
SceneryDefinition.forId(18869).getHandlers().put("option:bend", this);
SceneryDefinition.forId(18870).getHandlers().put("option:escape", this);
SceneryDefinition.forId(2689).getHandlers().put("option:open", this);
SceneryDefinition.forId(1528).getHandlers().put("option:open", this);
SceneryDefinition.forId(1529).getHandlers().put("option:close", this);
SceneryDefinition.forId(18899).getHandlers().put("option:search", this);
SceneryDefinition.forId(18899).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18878).getHandlers().put("option:search", this);
SceneryDefinition.forId(18878).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18879).getHandlers().put("option:search", this);
SceneryDefinition.forId(18879).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18898).getHandlers().put("option:search", this);
SceneryDefinition.forId(18898).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18902).getHandlers().put("option:search", this);
SceneryDefinition.forId(18871).getHandlers().put("option:climb", this);
SceneryDefinition.forId(18923).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(18924).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(2676).getHandlers().put("option:open", this);
SceneryDefinition.forId(2675).getHandlers().put("option:open", this);
SceneryDefinition.forId(2676).getHandlers().put("option:watch", this);
SceneryDefinition.forId(2675).getHandlers().put("option:watch", this);
SceneryDefinition.forId(2690).getHandlers().put("option:open", this);
SceneryDefinition.forId(2691).getHandlers().put("option:open", this);
SceneryDefinition.forId(2698).getHandlers().put("option:walk through", this);
SceneryDefinition.forId(2699).getHandlers().put("option:walk through", this);
SceneryDefinition.forId(2677).getHandlers().put("option:open", this);
SceneryDefinition.forId(2678).getHandlers().put("option:search", this);
SceneryDefinition.forId(2684).getHandlers().put("option:search", this);
SceneryDefinition.forId(2684).getHandlers().put("option:look at", this);
SceneryDefinition.forId(2680).getHandlers().put("option:search", this);
SceneryDefinition.forId(2680).getHandlers().put("option:look-in", this);
SceneryDefinition.forId(2681).getHandlers().put("option:search", this);
SceneryDefinition.forId(2681).getHandlers().put("option:look in", this);
SceneryDefinition.forId(18962).getHandlers().put("option:search", this);
SceneryDefinition.forId(18962).getHandlers().put("option:look in", this);
SceneryDefinition.forId(18963).getHandlers().put("option:search", this);
SceneryDefinition.forId(18963).getHandlers().put("option:look in", this);
SceneryDefinition.forId(18951).getHandlers().put("option:look at", this);
SceneryDefinition.forId(18951).getHandlers().put("option:use", this);
SceneryDefinition.forId(2684).getHandlers().put("option:search", this);
SceneryDefinition.forId(2684).getHandlers().put("option:look at", this);
NPCDefinition.forId(830).getHandlers().put("option:watch", this);
NPCDefinition.forId(4975).getHandlers().put("option:talk-to", this);
NPCDefinition.forId(4976).getHandlers().put("option:talk-to", this);
@@ -5,7 +5,7 @@ import java.util.List;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.FacialExpression;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
@@ -103,26 +103,26 @@ public final class WaterfallPlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new WaterfallUseWithHandler());
NPCDefinition.forId(305).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(1987).getHandlers().put("option:board", this);
ObjectDefinition.forId(2020).getHandlers().put("option:climb", this);
ObjectDefinition.forId(2022).getHandlers().put("option:get in", this);
ObjectDefinition.forId(10283).getHandlers().put("option:swim", this);
ObjectDefinition.forId(1996).getHandlers().put("option:swim to", this);
ObjectDefinition.forId(1989).getHandlers().put("option:search", this);
ObjectDefinition.forId(1990).getHandlers().put("option:search", this);
ObjectDefinition.forId(1991).getHandlers().put("option:open", this);
ObjectDefinition.forId(37247).getHandlers().put("option:open", this);
ObjectDefinition.forId(32711).getHandlers().put("option:open", this);
ObjectDefinition.forId(33046).getHandlers().put("option:open", this);
ObjectDefinition.forId(42313).getHandlers().put("option:open",this);
ObjectDefinition.forId(33047).getHandlers().put("option:search", this);
ObjectDefinition.forId(33047).getHandlers().put("option:close", this);
ObjectDefinition.forId(33066).getHandlers().put("option:search", this);
ObjectDefinition.forId(1999).getHandlers().put("option:search", this);
ObjectDefinition.forId(42319).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(2002).getHandlers().put("option:open", this);
ObjectDefinition.forId(1992).getHandlers().put("option:read", this);
ObjectDefinition.forId(2014).getHandlers().put("option:take treasure", this);
SceneryDefinition.forId(1987).getHandlers().put("option:board", this);
SceneryDefinition.forId(2020).getHandlers().put("option:climb", this);
SceneryDefinition.forId(2022).getHandlers().put("option:get in", this);
SceneryDefinition.forId(10283).getHandlers().put("option:swim", this);
SceneryDefinition.forId(1996).getHandlers().put("option:swim to", this);
SceneryDefinition.forId(1989).getHandlers().put("option:search", this);
SceneryDefinition.forId(1990).getHandlers().put("option:search", this);
SceneryDefinition.forId(1991).getHandlers().put("option:open", this);
SceneryDefinition.forId(37247).getHandlers().put("option:open", this);
SceneryDefinition.forId(32711).getHandlers().put("option:open", this);
SceneryDefinition.forId(33046).getHandlers().put("option:open", this);
SceneryDefinition.forId(42313).getHandlers().put("option:open",this);
SceneryDefinition.forId(33047).getHandlers().put("option:search", this);
SceneryDefinition.forId(33047).getHandlers().put("option:close", this);
SceneryDefinition.forId(33066).getHandlers().put("option:search", this);
SceneryDefinition.forId(1999).getHandlers().put("option:search", this);
SceneryDefinition.forId(42319).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2002).getHandlers().put("option:open", this);
SceneryDefinition.forId(1992).getHandlers().put("option:read", this);
SceneryDefinition.forId(2014).getHandlers().put("option:take treasure", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.content.quest.members.whatliesbelow;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.content.activity.ActivityManager;
@@ -38,9 +38,9 @@ public class WLBelowPlugin extends OptionHandler {
PluginManager.definePlugin(new AnnaJonesDialogue());
PluginManager.definePlugin(new SurokMagisDialogue());
PluginManager.definePlugin(new RatBurgissDialogue());
ObjectDefinition.forId(23095).getHandlers().put("option:use", this);
ObjectDefinition.forId(23058).getHandlers().put("option:enter", this);
ObjectDefinition.forId(23057).getHandlers().put("option:excavate", this);
SceneryDefinition.forId(23095).getHandlers().put("option:use", this);
SceneryDefinition.forId(23058).getHandlers().put("option:enter", this);
SceneryDefinition.forId(23057).getHandlers().put("option:excavate", this);
WhatLiesBelow.RATS_PAPER.getDefinition().getHandlers().put("option:read", this);
WhatLiesBelow.EMPTY_FOLDER.getDefinition().getHandlers().put("option:read", this);
WhatLiesBelow.USED_FOLDER.getDefinition().getHandlers().put("option:read", this);
@@ -1,7 +1,7 @@
package core.game.content.quest.members.witchshouse;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.NodeUsageEvent;
import core.game.interaction.OptionHandler;
@@ -174,19 +174,19 @@ public class WitchsHousePlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
PluginManager.definePlugin(new WitchsHouseUseWithHandler());
PluginManager.definePlugin(new MouseNPC());
ObjectDefinition.forId(2867).getHandlers().put("option:look-under", this);
ObjectDefinition.forId(2861).getHandlers().put("option:open", this);
ObjectDefinition.forId(2865).getHandlers().put("option:open", this);
ObjectDefinition.forId(2866).getHandlers().put("option:open", this);
ObjectDefinition.forId(2862).getHandlers().put("option:open", this);
ObjectDefinition.forId(24724).getHandlers().put("option:wind-up", this);
ObjectDefinition.forId(24673).getHandlers().put("option:walk-down", this);
ObjectDefinition.forId(24672).getHandlers().put("option:walk-up", this);
ObjectDefinition.forId(24721).getHandlers().put("option:play", this);
ObjectDefinition.forId(24692).getHandlers().put("option:search", this);
ObjectDefinition.forId(2869).getHandlers().put("option:search", this);
ObjectDefinition.forId(2863).getHandlers().put("option:open", this);
ObjectDefinition.forId(2864).getHandlers().put("option:check", this);
SceneryDefinition.forId(2867).getHandlers().put("option:look-under", this);
SceneryDefinition.forId(2861).getHandlers().put("option:open", this);
SceneryDefinition.forId(2865).getHandlers().put("option:open", this);
SceneryDefinition.forId(2866).getHandlers().put("option:open", this);
SceneryDefinition.forId(2862).getHandlers().put("option:open", this);
SceneryDefinition.forId(24724).getHandlers().put("option:wind-up", this);
SceneryDefinition.forId(24673).getHandlers().put("option:walk-down", this);
SceneryDefinition.forId(24672).getHandlers().put("option:walk-up", this);
SceneryDefinition.forId(24721).getHandlers().put("option:play", this);
SceneryDefinition.forId(24692).getHandlers().put("option:search", this);
SceneryDefinition.forId(2869).getHandlers().put("option:search", this);
SceneryDefinition.forId(2863).getHandlers().put("option:open", this);
SceneryDefinition.forId(2864).getHandlers().put("option:check", this);
ItemDefinition.forId(2408).getHandlers().put("option:read", this);
return this;
@@ -1,6 +1,6 @@
package core.game.content.quest.miniquest.surok;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -21,7 +21,7 @@ public class HuntForSurokPlugin extends OptionHandler {
PluginManager.definePlugin(new MishkalunDornDialogue());
PluginManager.definePlugin(new SilasDahcsnuDialogue());
PluginManager.definePlugin(new SurokMagisDialogue());
ObjectDefinition.forId(28780).getHandlers().put("option:use", this);
SceneryDefinition.forId(28780).getHandlers().put("option:use", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.quest.tutorials.tutorialisland;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
@@ -24,25 +24,25 @@ public class TutorialIslandPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3015).getHandlers().put("option:open", this);
ObjectDefinition.forId(3016).getHandlers().put("option:open", this);
SceneryDefinition.forId(3015).getHandlers().put("option:open", this);
SceneryDefinition.forId(3016).getHandlers().put("option:open", this);
NPCDefinition.forId(2796).getHandlers().put("option:skip-tutorial", this);
ObjectDefinition.forId(3014).getHandlers().put("option:open", this);
ObjectDefinition.forId(3017).getHandlers().put("option:open", this);
ObjectDefinition.forId(3018).getHandlers().put("option:open", this);
ObjectDefinition.forId(3019).getHandlers().put("option:open", this);
ObjectDefinition.forId(3020).getHandlers().put("option:open", this);
ObjectDefinition.forId(3021).getHandlers().put("option:open", this);
ObjectDefinition.forId(3022).getHandlers().put("option:open", this);
ObjectDefinition.forId(3023).getHandlers().put("option:open", this);
ObjectDefinition.forId(3024).getHandlers().put("option:open", this);
ObjectDefinition.forId(3025).getHandlers().put("option:open", this);
ObjectDefinition.forId(3026).getHandlers().put("option:open", this);
ObjectDefinition.forId(3029).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(3030).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(3031).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(1740).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(3028).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(3014).getHandlers().put("option:open", this);
SceneryDefinition.forId(3017).getHandlers().put("option:open", this);
SceneryDefinition.forId(3018).getHandlers().put("option:open", this);
SceneryDefinition.forId(3019).getHandlers().put("option:open", this);
SceneryDefinition.forId(3020).getHandlers().put("option:open", this);
SceneryDefinition.forId(3021).getHandlers().put("option:open", this);
SceneryDefinition.forId(3022).getHandlers().put("option:open", this);
SceneryDefinition.forId(3023).getHandlers().put("option:open", this);
SceneryDefinition.forId(3024).getHandlers().put("option:open", this);
SceneryDefinition.forId(3025).getHandlers().put("option:open", this);
SceneryDefinition.forId(3026).getHandlers().put("option:open", this);
SceneryDefinition.forId(3029).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(3030).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(3031).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(1740).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(3028).getHandlers().put("option:climb-up", this);
// PluginManager.definePlugin(new BrotherBraceDialogue(), new CombatInstructorDialogue(), new TutorialBook(), new FinancialAdvisorDialogue(), new MasterChefDialogue(), new MiningInstructorDialogue(), new QuestGuideDialogue(), new RSGuideDialogue(), new SurvivalExpertDialogue(), new TutorialCompletionDialogue());
return this;
}
@@ -1,7 +1,7 @@
package core.game.content.ttrail;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.component.ComponentDefinition;
import core.game.component.ComponentPlugin;
@@ -91,7 +91,7 @@ public final class TreasureTrailPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(19171).getHandlers().put("option:squeeze-through", this);
SceneryDefinition.forId(19171).getHandlers().put("option:squeeze-through", this);
return this;
}
@@ -4,7 +4,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityManager;
import core.game.interaction.Option;
import core.game.interaction.OptionHandler;
@@ -61,10 +61,10 @@ public final class ChaosTunnelZone extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
for (int i = 0; i < ENTRANCE_DATA.length; i++) {
ObjectDefinition.forId((int) ENTRANCE_DATA[i][0]).getHandlers().put("option:enter", this);
ObjectDefinition.forId((int) ENTRANCE_DATA[i][2]).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId((int) ENTRANCE_DATA[i][0]).getHandlers().put("option:enter", this);
SceneryDefinition.forId((int) ENTRANCE_DATA[i][2]).getHandlers().put("option:climb-up", this);
}
ObjectDefinition.forId(23074).getHandlers().put("option:climb", this);
SceneryDefinition.forId(23074).getHandlers().put("option:climb", this);
return this;
}
@@ -122,7 +122,7 @@ public final class ChaosTunnelZone extends MapZone implements Plugin<Object> {
entity.asPlayer().sendMessage("You can't go back throught his portal.");
return true;
}
teleport(entity.asPlayer(), target.asObject());
teleport(entity.asPlayer(), target.asScenery());
break;
}
}
@@ -78,7 +78,7 @@ public class WildernessAreaZone extends MapZone implements Plugin<Object> {
switch (buttonId) {
case 2:
if (player.getInventory().remove(new Item(995, 7500))) {
DoorActionHandler.handleDoor(player, node.asObject());
DoorActionHandler.handleDoor(player, node.asScenery());
player.sendMessage("You pay 7500 coins and enter the resource arena.");
}
break;
@@ -91,7 +91,7 @@ public class WildernessAreaZone extends MapZone implements Plugin<Object> {
player.sendMessage("You do not have enough coins to enter the Arena.");
return true;
}
DoorActionHandler.handleDoor(player, node.asObject());
DoorActionHandler.handleDoor(player, node.asScenery());
return true;
case "Players-inside":
if (player.getLocation().getY() < 3495) {
@@ -82,7 +82,7 @@ public class YanilleAgilityDungeon extends MapZone implements Plugin<Object> {
return true;
case 35969:
case 2303:
handleBalancingLedge(player, target.asObject());
handleBalancingLedge(player, target.asScenery());
return true;
case 377:
if (!player.getInventory().contains(993, 1)) {
@@ -99,7 +99,7 @@ public class YanilleAgilityDungeon extends MapZone implements Plugin<Object> {
for (Item item : HERBS) {
player.getInventory().add(item, player);
}
SceneryBuilder.replace(target.asObject(), target.asObject().transform(target.getId() + 1), 5);
SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(target.getId() + 1), 5);
}
return true;
case 378:
@@ -90,12 +90,12 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
return true;
case 7434: // Trapdoors in bar
if (option.getName().equalsIgnoreCase("open")) {
SceneryBuilder.replace(target.asObject(), target.asObject().transform(7435));
SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(7435));
}
break;
case 7435: // open trapdoor in bar
if (option.getName().equalsIgnoreCase("close")) {
SceneryBuilder.replace(target.asObject(), target.asObject().transform(7434));
SceneryBuilder.replace(target.asScenery(), target.asScenery().transform(7434));
}
break;
case 9308:
@@ -1,6 +1,6 @@
package core.game.content.zone.rellekka;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -19,8 +19,8 @@ public class LightHousePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(4577).getHandlers().put("option:walk-through", this);
ObjectDefinition.forId(4383).getHandlers().put("option:climb", this);
SceneryDefinition.forId(4577).getHandlers().put("option:walk-through", this);
SceneryDefinition.forId(4383).getHandlers().put("option:climb", this);
return this;
}
@@ -28,7 +28,7 @@ public class LightHousePlugin extends OptionHandler {
public boolean handle(Player player, Node node, String option) {
switch (node.getId()) {
case 4577:
DoorActionHandler.handleDoor(player, node.asObject());
DoorActionHandler.handleDoor(player, node.asScenery());
return true;
case 4383:
return false;
@@ -39,7 +39,7 @@ public class LightHousePlugin extends OptionHandler {
@Override
public Location getDestination(Node node, Node n) {
if (n.getName().equals("Door")) {
return DoorActionHandler.getDestination((Entity) node, n.asObject());
return DoorActionHandler.getDestination((Entity) node, n.asScenery());
}
return null;
}
@@ -1,7 +1,7 @@
package core.game.content.zone.rellekka;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import core.game.node.entity.skill.agility.AgilityHandler;
@@ -164,10 +164,10 @@ public final class RellekkaZone extends MapZone implements Plugin<Object> {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(4616).getHandlers().put("option:cross", this);
ObjectDefinition.forId(4615).getHandlers().put("option:cross", this);
ObjectDefinition.forId(5847).getHandlers().put("option:climb-over", this);
ObjectDefinition.forId(5008).getHandlers().put("option:enter",this);
SceneryDefinition.forId(4616).getHandlers().put("option:cross", this);
SceneryDefinition.forId(4615).getHandlers().put("option:cross", this);
SceneryDefinition.forId(5847).getHandlers().put("option:climb-over", this);
SceneryDefinition.forId(5008).getHandlers().put("option:enter",this);
return this;
}
@@ -4,7 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.DialogueAction;
import core.game.content.global.action.ClimbActionHandler;
import core.game.node.entity.skill.Skills;
@@ -221,9 +221,9 @@ public final class WaterBirthDungeonZone extends MapZone implements Plugin<Objec
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(8958).getHandlers().put("option:open", this);
ObjectDefinition.forId(8959).getHandlers().put("option:open", this);
ObjectDefinition.forId(8960).getHandlers().put("option:open", this);
SceneryDefinition.forId(8958).getHandlers().put("option:open", this);
SceneryDefinition.forId(8959).getHandlers().put("option:open", this);
SceneryDefinition.forId(8960).getHandlers().put("option:open", this);
NPCDefinition.forId(2440).getHandlers().put("option:destroy", this);
NPCDefinition.forId(2443).getHandlers().put("option:destroy", this);
NPCDefinition.forId(2446).getHandlers().put("option:destroy", this);
@@ -249,7 +249,7 @@ public final class WaterBirthDungeonZone extends MapZone implements Plugin<Objec
if (!node.isActive()) {
return true;
}
SceneryBuilder.replace(node.asObject(), node.asObject().transform(8962), 30);
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(8962), 30);
break;
case 2440:
case 2443:
@@ -2,7 +2,7 @@ package core.game.interaction;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
import core.game.node.item.Item;
@@ -80,7 +80,7 @@ public final class Option {
return NPCDefinition.getOptionHandler(nodeId, name);
}
if (node instanceof Scenery) {
return ObjectDefinition.getOptionHandler(nodeId, name);
return SceneryDefinition.getOptionHandler(nodeId, name);
}
if (node instanceof Item) {
return ItemDefinition.getOptionHandler(nodeId, name);
@@ -1,6 +1,6 @@
package core.game.interaction;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.node.Node;
import core.game.node.entity.player.Player;
import rs09.game.system.SystemLogger;
@@ -68,7 +68,7 @@ public abstract class OptionHandler implements Plugin<Object> {
* @return the valid children.
*/
public int[] getValidChildren(int wrapper) {
final ObjectDefinition definition = ObjectDefinition.forId(wrapper);
final SceneryDefinition definition = SceneryDefinition.forId(wrapper);
final List<Integer> list = new ArrayList<>(20);
if (definition.getChildrenIds() == null) {
SystemLogger.logErr("Null child wrapper in option handler wrapperId=" + wrapper);
@@ -1,6 +1,6 @@
package core.game.interaction;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
@@ -203,7 +203,7 @@ public abstract class UseWithHandler implements Plugin<Object> {
* @return the valid children.
*/
public int[] getValidChildren(int wrapper) {
final ObjectDefinition definition = ObjectDefinition.forId(wrapper);
final SceneryDefinition definition = SceneryDefinition.forId(wrapper);
final List<Integer> list = new ArrayList<>(20);
if (definition.getChildrenIds() == null) {
SystemLogger.logErr("Null child wrapper in option handler wrapperId=" + wrapper);
@@ -1,7 +1,7 @@
package core.game.interaction.city;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
@@ -23,8 +23,8 @@ public final class BedabinPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2700).getHandlers().put("option:walk-through", this);
ObjectDefinition.forId(2672).getHandlers().put("option:use", this);
SceneryDefinition.forId(2700).getHandlers().put("option:walk-through", this);
SceneryDefinition.forId(2672).getHandlers().put("option:use", this);
NPCDefinition.forId(834).getHandlers().put("option:talk-to", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -19,7 +19,7 @@ public final class BurthorpePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(4627).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(4627).getHandlers().put("option:climb-up", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -19,7 +19,7 @@ public final class CamelotNodePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(26017).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(26017).getHandlers().put("option:climb-down", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.dialogue.FacialExpression;
import core.game.content.global.action.ClimbActionHandler;
import core.game.content.global.action.DoorActionHandler;
@@ -61,17 +61,17 @@ public final class DraynorManorPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(156).getHandlers().put("option:search", this);
ObjectDefinition.forId(155).getHandlers().put("option:search", this);
ObjectDefinition.forId(160).getHandlers().put("option:pull", this);
ObjectDefinition.forId(131).getHandlers().put("option:open", this);
ObjectDefinition.forId(133).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(134).getHandlers().put("option:open", this);
ObjectDefinition.forId(135).getHandlers().put("option:open", this);
ObjectDefinition.forId(152).getHandlers().put("option:search", this);
ObjectDefinition.forId(153).getHandlers().put("option:search", this);
ObjectDefinition.forId(11498).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(37703).getHandlers().put("option:squeeze-through", this);
SceneryDefinition.forId(156).getHandlers().put("option:search", this);
SceneryDefinition.forId(155).getHandlers().put("option:search", this);
SceneryDefinition.forId(160).getHandlers().put("option:pull", this);
SceneryDefinition.forId(131).getHandlers().put("option:open", this);
SceneryDefinition.forId(133).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(134).getHandlers().put("option:open", this);
SceneryDefinition.forId(135).getHandlers().put("option:open", this);
SceneryDefinition.forId(152).getHandlers().put("option:search", this);
SceneryDefinition.forId(153).getHandlers().put("option:search", this);
SceneryDefinition.forId(11498).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(37703).getHandlers().put("option:squeeze-through", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.interaction.city;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.node.object.SceneryBuilder;
@@ -37,8 +37,8 @@ public final class DraynorNodePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
NPCDefinition.forId(922).getHandlers().put("option:make-dyes", this);
ObjectDefinition.forId(7092).getHandlers().put("option:observe", this);
ObjectDefinition.forId(6434).getHandlers().put("option:open", this);
SceneryDefinition.forId(7092).getHandlers().put("option:observe", this);
SceneryDefinition.forId(6434).getHandlers().put("option:open", this);
ActivityManager.register(new TelescopeCutscene());
return this;
}
@@ -55,7 +55,7 @@ public final class DraynorNodePlugin extends OptionHandler {
break;
case 6434: // Trapdoors above NW and SE corners of Draynor sewer
if (option.equalsIgnoreCase("open")) {
SceneryBuilder.replace(node.asObject(), node.asObject().transform(6435), 500);
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(6435), 500);
}
break;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -22,15 +22,15 @@ public final class EdgevilleNodePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(9262).getHandlers().put("option:take-seed", this);
ObjectDefinition.forId(9261).getHandlers().put("option:take-seed", this);
ObjectDefinition.forId(30806).getHandlers().put("option:take-seed", this);
ObjectDefinition.forId(12265).getHandlers().put("option:climb", this);
SceneryDefinition.forId(9262).getHandlers().put("option:take-seed", this);
SceneryDefinition.forId(9261).getHandlers().put("option:take-seed", this);
SceneryDefinition.forId(30806).getHandlers().put("option:take-seed", this);
SceneryDefinition.forId(12265).getHandlers().put("option:climb", this);
ObjectDefinition.forId(12266).getHandlers().put("option:open", this);
SceneryDefinition.forId(12266).getHandlers().put("option:open", this);
ObjectDefinition.forId(26933).getHandlers().put("option:open", this);
ObjectDefinition.forId(26934).getHandlers().put("option:close", this);
SceneryDefinition.forId(26933).getHandlers().put("option:open", this);
SceneryDefinition.forId(26934).getHandlers().put("option:close", this);
return this;
}
@@ -55,12 +55,12 @@ public final class EdgevilleNodePlugin extends OptionHandler {
break;
case 26933: // Trapdoors at edgeville dungeon entrance
if (option.equalsIgnoreCase("open")) {
SceneryBuilder.replace(node.asObject(), node.asObject().transform(26934), 500);
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(26934), 500);
}
break;
case 26934: // Trapdoors at edgeville dungeon entrance
if (option.equalsIgnoreCase("close")) {
SceneryBuilder.replace(node.asObject(), node.asObject().transform(26933));
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(26933));
}
}
return true;
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -25,8 +25,8 @@ public final class EntranaObjectPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2408).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(2407).getHandlers().put("option:open", this);// magic door
SceneryDefinition.forId(2408).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(2407).getHandlers().put("option:open", this);// magic door
return this;
}
@@ -2,7 +2,7 @@ package core.game.interaction.city;
import core.cache.def.impl.ItemDefinition;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.plugin.Initializable;
import core.game.node.entity.skill.Skills;
@@ -46,25 +46,25 @@ public final class FaladorNodePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2271).getHandlers().put("option:open", this);// sir
SceneryDefinition.forId(2271).getHandlers().put("option:open", this);// sir
// vyvans
// cupboard
// (closed)
ObjectDefinition.forId(2272).getHandlers().put("option:shut", this);// sir
SceneryDefinition.forId(2272).getHandlers().put("option:shut", this);// sir
// vyvans
// cupboard
// (open)
ObjectDefinition.forId(2272).getHandlers().put("option:search", this);// sir
SceneryDefinition.forId(2272).getHandlers().put("option:search", this);// sir
// vyvans
// cupboard
// (open)
// dwarven mine
ObjectDefinition.forId(30868).getHandlers().put("option:squeeze-through", this);
ObjectDefinition.forId(5020).getHandlers().put("option:ride", this);
SceneryDefinition.forId(30868).getHandlers().put("option:squeeze-through", this);
SceneryDefinition.forId(5020).getHandlers().put("option:ride", this);
ItemDefinition.forId(245).getHandlers().put("option:take", this);
// fally park.
NPCDefinition.forId(2290).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(11708).getHandlers().put("option:close", this);
SceneryDefinition.forId(11708).getHandlers().put("option:close", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.node.entity.skill.Skills;
import core.game.node.entity.skill.agility.AgilityHandler;
import core.game.interaction.OptionHandler;
@@ -26,11 +26,11 @@ public final class GnomeStrongholdPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(190).getHandlers().put("option:open", this);
ObjectDefinition.forId(1967).getHandlers().put("option:open", this);
ObjectDefinition.forId(1968).getHandlers().put("option:open", this);
ObjectDefinition.forId(9316).getHandlers().put("option:climb",this);
ObjectDefinition.forId(9317).getHandlers().put("option:climb",this);
SceneryDefinition.forId(190).getHandlers().put("option:open", this);
SceneryDefinition.forId(1967).getHandlers().put("option:open", this);
SceneryDefinition.forId(1968).getHandlers().put("option:open", this);
SceneryDefinition.forId(9316).getHandlers().put("option:climb",this);
SceneryDefinition.forId(9317).getHandlers().put("option:climb",this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -29,11 +29,11 @@ public final class HamHideoutPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(5490).getHandlers().put("option:open", this);
ObjectDefinition.forId(5490).getHandlers().put("option:pick-lock", this);
ObjectDefinition.forId(5491).getHandlers().put("option:close", this);
ObjectDefinition.forId(5491).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(5493).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(5490).getHandlers().put("option:open", this);
SceneryDefinition.forId(5490).getHandlers().put("option:pick-lock", this);
SceneryDefinition.forId(5491).getHandlers().put("option:close", this);
SceneryDefinition.forId(5491).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(5493).getHandlers().put("option:climb-up", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.interaction.city;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.plugin.Initializable;
import org.rs09.consts.Items;
@@ -73,26 +73,26 @@ public final class KaramajaOptionPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2072).getHandlers().put("option:search", this);// banana crate.
ObjectDefinition.forId(2072).getHandlers().put("option:fill", this);// banana crate.
ObjectDefinition.forId(2078).getHandlers().put("option:search", this);// random crate.
ObjectDefinition.forId(492).getHandlers().put("option:climb-down", this);// musa point rock
ObjectDefinition.forId(1764).getHandlers().put("option:climb", this);// musa dungeon rope
ObjectDefinition.forId(3617).getHandlers().put("option:climb-down", this);// agility ladder
ObjectDefinition.forId(3618).getHandlers().put("option:climb-up", this);// agility ladder
SceneryDefinition.forId(2072).getHandlers().put("option:search", this);// banana crate.
SceneryDefinition.forId(2072).getHandlers().put("option:fill", this);// banana crate.
SceneryDefinition.forId(2078).getHandlers().put("option:search", this);// random crate.
SceneryDefinition.forId(492).getHandlers().put("option:climb-down", this);// musa point rock
SceneryDefinition.forId(1764).getHandlers().put("option:climb", this);// musa dungeon rope
SceneryDefinition.forId(3617).getHandlers().put("option:climb-down", this);// agility ladder
SceneryDefinition.forId(3618).getHandlers().put("option:climb-up", this);// agility ladder
NPCDefinition.forId(437).getHandlers().put("option:pay", this);// capn izzy
NPCDefinition.forId(1055).getHandlers().put("option:trade", this);// capn izzy trader (tickets)
ObjectDefinition.forId(2626).getHandlers().put("option:open", this);// grubors locked door
ObjectDefinition.forId(2628).getHandlers().put("option:open", this);// the shrimp and parrot door (chef)
ObjectDefinition.forId(2627).getHandlers().put("option:open", this);// garv door
ObjectDefinition.forId(1591).getHandlers().put("option:open", this);// garv door
SceneryDefinition.forId(2626).getHandlers().put("option:open", this);// grubors locked door
SceneryDefinition.forId(2628).getHandlers().put("option:open", this);// the shrimp and parrot door (chef)
SceneryDefinition.forId(2627).getHandlers().put("option:open", this);// garv door
SceneryDefinition.forId(1591).getHandlers().put("option:open", this);// garv door
NPCDefinition.forId(1178).getHandlers().put("option:fish", this);// lubufu fishing spot
ObjectDefinition.forId(5083).getHandlers().put("option:enter", this);// sanibock dungeon entrance
ObjectDefinition.forId(2439).getHandlers().put("option:open", this);
SceneryDefinition.forId(5083).getHandlers().put("option:enter", this);// sanibock dungeon entrance
SceneryDefinition.forId(2439).getHandlers().put("option:open", this);
for (int pineapple : PINEAPPLE_OBJECTS) {
ObjectDefinition.forId(pineapple).getHandlers().put("option:pick", this);// pineapple picking
SceneryDefinition.forId(pineapple).getHandlers().put("option:pick", this);// pineapple picking
}
ObjectDefinition.forId(2975).getHandlers().put("option:shake", this); // leafy palm tree
SceneryDefinition.forId(2975).getHandlers().put("option:shake", this); // leafy palm tree
return this;
}
@@ -245,7 +245,7 @@ public final class KaramajaOptionPlugin extends OptionHandler {
case "shake":
if (player.getInventory().hasSpaceFor(new Item(Items.PALM_LEAF_2339))) {
player.getPacketDispatch().sendMessage("You shake the tree...");
SceneryBuilder.replace(node.asObject(), node.asObject().transform(2976), 60); // 35 second cool-down
SceneryBuilder.replace(node.asScenery(), node.asScenery().transform(2976), 60); // 35 second cool-down
player.lock();
final Pulse palmPulse = new Pulse(2) {
@Override
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -19,10 +19,10 @@ public final class KhardianDesertPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(6481).getHandlers().put("option:enter", this);
ObjectDefinition.forId(6545).getHandlers().put("option:open", this);
ObjectDefinition.forId(6547).getHandlers().put("option:open", this);
ObjectDefinition.forId(6551).getHandlers().put("option:use", this);
SceneryDefinition.forId(6481).getHandlers().put("option:enter", this);
SceneryDefinition.forId(6545).getHandlers().put("option:open", this);
SceneryDefinition.forId(6547).getHandlers().put("option:open", this);
SceneryDefinition.forId(6551).getHandlers().put("option:use", this);
return this;
}
@@ -35,7 +35,7 @@ public final class KhardianDesertPlugin extends OptionHandler {
case 6545:
case 6547:
// player.getPacketDispatch().sendMessage("A mystical power has sealed this door...");
DoorActionHandler.handleAutowalkDoor(player, node.asObject());
DoorActionHandler.handleAutowalkDoor(player, node.asScenery());
break;
case 6551:
player.teleport(new Location(3233, 2887, 0));
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.component.Component;
import core.game.content.activity.ActivityManager;
@@ -38,13 +38,13 @@ public final class LumbridgeNodePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(36978).getHandlers().put("option:play", this);
ObjectDefinition.forId(37335).getHandlers().put("option:raise", this);
ObjectDefinition.forId(37095).getHandlers().put("option:shoot-at", this);
ObjectDefinition.forId(36976).getHandlers().put("option:ring", this);
ObjectDefinition.forId(22114).getHandlers().put("option:open", this);
ObjectDefinition.forId(29355).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(37655).getHandlers().put("option:view", this);
SceneryDefinition.forId(36978).getHandlers().put("option:play", this);
SceneryDefinition.forId(37335).getHandlers().put("option:raise", this);
SceneryDefinition.forId(37095).getHandlers().put("option:shoot-at", this);
SceneryDefinition.forId(36976).getHandlers().put("option:ring", this);
SceneryDefinition.forId(22114).getHandlers().put("option:open", this);
SceneryDefinition.forId(29355).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(37655).getHandlers().put("option:view", this);
return this;
}
@@ -57,7 +57,7 @@ public final class LumbridgeNodePlugin extends OptionHandler {
ClimbActionHandler.climb(player, ClimbActionHandler.CLIMB_UP, new Location(3210, 3216, 0));
break;
}
ClimbActionHandler.climbLadder(player, node.asObject(), "climb-up");
ClimbActionHandler.climbLadder(player, node.asScenery(), "climb-up");
return true;
case 37095:
if (!player.getEquipment().contains(9706, 1) || !player.getEquipment().contains(9705, 1)) {
@@ -1,7 +1,7 @@
package core.game.interaction.city;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -20,8 +20,8 @@ public final class LunarIslePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(16777).getHandlers().put("option:close", this);
ObjectDefinition.forId(16774).getHandlers().put("option:open", this);
SceneryDefinition.forId(16777).getHandlers().put("option:close", this);
SceneryDefinition.forId(16774).getHandlers().put("option:open", this);
NPCDefinition.forId(4512).getHandlers().put("option:go-inside", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -19,7 +19,7 @@ public final class MonasteryPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2641).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(2641).getHandlers().put("option:climb-up", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.interaction.city;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.npc.NPC;
@@ -48,16 +48,16 @@ public final class PortSarimPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
NPCDefinition.forId(2704).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(9565).getHandlers().put("option:open", this);
ObjectDefinition.forId(9565).getHandlers().put("option:pick-lock", this);
ObjectDefinition.forId(9563).getHandlers().put("option:open", this);
SceneryDefinition.forId(9565).getHandlers().put("option:open", this);
SceneryDefinition.forId(9565).getHandlers().put("option:pick-lock", this);
SceneryDefinition.forId(9563).getHandlers().put("option:open", this);
for (int i : MONKS) {
NPCDefinition.forId(i).getHandlers().put("option:take-boat", this);
}
ObjectDefinition.forId(2071).getHandlers().put("option:search", this);
SceneryDefinition.forId(2071).getHandlers().put("option:search", this);
NPCDefinition.forId(745).getHandlers().put("option:attack", this);
ObjectDefinition.forId(33173).getHandlers().put("option:exit", this);
ObjectDefinition.forId(33174).getHandlers().put("option:enter", this);
SceneryDefinition.forId(33173).getHandlers().put("option:exit", this);
SceneryDefinition.forId(33174).getHandlers().put("option:enter", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -15,7 +15,7 @@ public class RCGuildMap extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(38422).getHandlers().put("option:study",this);
SceneryDefinition.forId(38422).getHandlers().put("option:study",this);
return null;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
@@ -16,8 +16,8 @@ import core.plugin.Plugin;
public class RCGuildPortal extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(38279).getHandlers().put("option:examine",this);
ObjectDefinition.forId(38279).getHandlers().put("option:enter",this);
SceneryDefinition.forId(38279).getHandlers().put("option:examine",this);
SceneryDefinition.forId(38279).getHandlers().put("option:enter",this);
return null;
}
@@ -1,7 +1,7 @@
package core.game.interaction.city;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.plugin.Initializable;
import core.game.content.dialogue.DialoguePlugin;
import core.game.interaction.OptionHandler;
@@ -26,13 +26,13 @@ public final class ShiloVillagePlugin extends OptionHandler {
public Plugin<Object> newInstance(Object arg) throws Throwable {
NPCDefinition.forId(511).getHandlers().put("option:pay-fare", this);
NPCDefinition.forId(510).getHandlers().put("option:pay-fare", this);
ObjectDefinition.forId(2230).getHandlers().put("option:board", this);// cart
SceneryDefinition.forId(2230).getHandlers().put("option:board", this);// cart
// travel.
ObjectDefinition.forId(2230).getHandlers().put("option:pay-fare", this);// cart
SceneryDefinition.forId(2230).getHandlers().put("option:pay-fare", this);// cart
// travel.
ObjectDefinition.forId(2265).getHandlers().put("option:board", this);// cart
SceneryDefinition.forId(2265).getHandlers().put("option:board", this);// cart
// travel.
ObjectDefinition.forId(2265).getHandlers().put("option:pay-fare", this);// cart
SceneryDefinition.forId(2265).getHandlers().put("option:pay-fare", this);// cart
// travel.
PluginManager.definePlugin(new VillageCartDialogue());
return this;
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -22,8 +22,8 @@ public class SophanemPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(20277).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(20275).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(20277).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(20275).getHandlers().put("option:climb-down", this);
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.global.action.DoorActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
@@ -28,8 +28,8 @@ public final class TaverlyDungeonPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(2143).getHandlers().put("option:open", this);
ObjectDefinition.forId(2144).getHandlers().put("option:open", this);
SceneryDefinition.forId(2143).getHandlers().put("option:open", this);
SceneryDefinition.forId(2144).getHandlers().put("option:open", this);
return this;
}
@@ -1,7 +1,7 @@
package core.game.interaction.city;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.activity.ActivityManager;
import core.game.content.activity.ActivityPlugin;
@@ -76,86 +76,86 @@ public final class TrollheimPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(3735).getHandlers().put("option:enter", this);
ObjectDefinition.forId(32738).getHandlers().put("option:exit", this);
SceneryDefinition.forId(3735).getHandlers().put("option:enter", this);
SceneryDefinition.forId(32738).getHandlers().put("option:exit", this);
NPCDefinition.forId(1069).getHandlers().put("option:talk-to", this);
ObjectDefinition.forId(3742).getHandlers().put("option:read", this);
ObjectDefinition.forId(3774).getHandlers().put("option:leave", this);
ObjectDefinition.forId(3723).getHandlers().put("option:climb", this);// located
SceneryDefinition.forId(3742).getHandlers().put("option:read", this);
SceneryDefinition.forId(3774).getHandlers().put("option:leave", this);
SceneryDefinition.forId(3723).getHandlers().put("option:climb", this);// located
// in
// circle
// area.
ObjectDefinition.forId(3722).getHandlers().put("option:climb", this);// located
SceneryDefinition.forId(3722).getHandlers().put("option:climb", this);// located
// in
// circle
// area.
ObjectDefinition.forId(3748).getHandlers().put("option:climb", this);
ObjectDefinition.forId(3790).getHandlers().put("option:climb", this);// pos=Location.create(2858,
SceneryDefinition.forId(3748).getHandlers().put("option:climb", this);
SceneryDefinition.forId(3790).getHandlers().put("option:climb", this);// pos=Location.create(2858,
// 3627,
// 0)
ObjectDefinition.forId(3791).getHandlers().put("option:climb", this);// pos=Location.create(2858,
SceneryDefinition.forId(3791).getHandlers().put("option:climb", this);// pos=Location.create(2858,
// 3627,
// 0)
ObjectDefinition.forId(3782).getHandlers().put("option:open", this);// arena
SceneryDefinition.forId(3782).getHandlers().put("option:open", this);// arena
// entrance
ObjectDefinition.forId(3783).getHandlers().put("option:open", this);// arena
SceneryDefinition.forId(3783).getHandlers().put("option:open", this);// arena
// entrance
ObjectDefinition.forId(3762).getHandlers().put("option:open", this);// secret
SceneryDefinition.forId(3762).getHandlers().put("option:open", this);// secret
// door.
ObjectDefinition.forId(4499).getHandlers().put("option:enter", this);// entrance
SceneryDefinition.forId(4499).getHandlers().put("option:enter", this);// entrance
// near
// golden
// apple.
ObjectDefinition.forId(4500).getHandlers().put("option:enter", this);// entrance
SceneryDefinition.forId(4500).getHandlers().put("option:enter", this);// entrance
// near
// golden
// apple.
ObjectDefinition.forId(9303).getHandlers().put("option:climb", this);// lvl
SceneryDefinition.forId(9303).getHandlers().put("option:climb", this);// lvl
// 41.
ObjectDefinition.forId(3782).getHandlers().put("option:open", this);// arena
SceneryDefinition.forId(3782).getHandlers().put("option:open", this);// arena
// entrance.
ObjectDefinition.forId(3783).getHandlers().put("option:open", this);// arena
SceneryDefinition.forId(3783).getHandlers().put("option:open", this);// arena
// entrance.
ObjectDefinition.forId(3785).getHandlers().put("option:open", this);// arena
SceneryDefinition.forId(3785).getHandlers().put("option:open", this);// arena
// exit.
ObjectDefinition.forId(3786).getHandlers().put("option:open", this);// arena
SceneryDefinition.forId(3786).getHandlers().put("option:open", this);// arena
// exit.
ObjectDefinition.forId(3757).getHandlers().put("option:enter", this);// arena
SceneryDefinition.forId(3757).getHandlers().put("option:enter", this);// arena
// cave
// entrance.
ObjectDefinition.forId(3758).getHandlers().put("option:exit", this);// arena
SceneryDefinition.forId(3758).getHandlers().put("option:exit", this);// arena
// cave
// exit.
ObjectDefinition.forId(9327).getHandlers().put("option:climb", this);// lvl
SceneryDefinition.forId(9327).getHandlers().put("option:climb", this);// lvl
// 64
ObjectDefinition.forId(9304).getHandlers().put("option:climb", this);
SceneryDefinition.forId(9304).getHandlers().put("option:climb", this);
;// lvl
// 43
ObjectDefinition.forId(3803).getHandlers().put("option:climb", this);
SceneryDefinition.forId(3803).getHandlers().put("option:climb", this);
;// lvl
// 43
// near
// trollheim
// top.
ObjectDefinition.forId(3804).getHandlers().put("option:climb", this);
SceneryDefinition.forId(3804).getHandlers().put("option:climb", this);
;// lvl
// 43
// near
// trollheim
// top.
ObjectDefinition.forId(9306).getHandlers().put("option:climb", this);// lvl
SceneryDefinition.forId(9306).getHandlers().put("option:climb", this);// lvl
// 47
ObjectDefinition.forId(9305).getHandlers().put("option:climb", this);// lvl
SceneryDefinition.forId(9305).getHandlers().put("option:climb", this);// lvl
// 44
ObjectDefinition.forId(3759).getHandlers().put("option:enter", this);// top
SceneryDefinition.forId(3759).getHandlers().put("option:enter", this);// top
// cave.
ObjectDefinition.forId(3771).getHandlers().put("option:enter", this);// stronghold
SceneryDefinition.forId(3771).getHandlers().put("option:enter", this);// stronghold
// to
// herb
// patch
ObjectDefinition.forId(18834).getHandlers().put("option:climb-up", this);// stronghold
SceneryDefinition.forId(18834).getHandlers().put("option:climb-up", this);// stronghold
// ladder
ObjectDefinition.forId(18833).getHandlers().put("option:climb-down", this);// stronghold
SceneryDefinition.forId(18833).getHandlers().put("option:climb-down", this);// stronghold
// ladder
PluginManager.definePlugin(new SabaDialogue());
PluginManager.definePlugin(new WoundedSoldier());
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.content.activity.ActivityManager;
import core.game.content.dialogue.DialoguePlugin;
import core.game.interaction.OptionHandler;
@@ -27,12 +27,12 @@ public final class TzhaarCityPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(31284).getHandlers().put("option:enter", this);// karamja
SceneryDefinition.forId(31284).getHandlers().put("option:enter", this);// karamja
// cave.
ObjectDefinition.forId(9359).getHandlers().put("option:enter", this);// tzhaar
SceneryDefinition.forId(9359).getHandlers().put("option:enter", this);// tzhaar
// exit
ObjectDefinition.forId(9356).getHandlers().put("option:enter", this);
ObjectDefinition.forId(9369).getHandlers().put("option:pass", this);
SceneryDefinition.forId(9356).getHandlers().put("option:enter", this);
SceneryDefinition.forId(9369).getHandlers().put("option:pass", this);
new TzhaarDialogue().init();
return this;
}
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.dialogue.FacialExpression;
@@ -39,19 +39,19 @@ public final class VarrockNodePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(24357).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(5581).getHandlers().put("option:take-axe", this);
ObjectDefinition.forId(36974).getHandlers().put("option:take-axe", this);
ObjectDefinition.forId(24427).getHandlers().put("option:walk-up", this);
ObjectDefinition.forId(24428).getHandlers().put("option:walk-down", this);
ObjectDefinition.forId(1749).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(23636).getHandlers().put("option:read", this);
ObjectDefinition.forId(24389).getHandlers().put("option:knock-at", this);
ObjectDefinition.forId(9662).getHandlers().put("option:take", this);
ObjectDefinition.forId(17974).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(29534).getHandlers().put("option:enter", this);
ObjectDefinition.forId(17985).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(24366).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(24357).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(5581).getHandlers().put("option:take-axe", this);
SceneryDefinition.forId(36974).getHandlers().put("option:take-axe", this);
SceneryDefinition.forId(24427).getHandlers().put("option:walk-up", this);
SceneryDefinition.forId(24428).getHandlers().put("option:walk-down", this);
SceneryDefinition.forId(1749).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(23636).getHandlers().put("option:read", this);
SceneryDefinition.forId(24389).getHandlers().put("option:knock-at", this);
SceneryDefinition.forId(9662).getHandlers().put("option:take", this);
SceneryDefinition.forId(17974).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(29534).getHandlers().put("option:enter", this);
SceneryDefinition.forId(17985).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(24366).getHandlers().put("option:climb-up", this);
SceneryBuilder.add(new Scenery(17974, new Location(3204, 9911), 10, 0));
new KnockatDoorDialogue().init();
return this;
@@ -1,6 +1,6 @@
package core.game.interaction.city;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
@@ -26,12 +26,12 @@ public final class WildernessPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
new KBDPlugin().newInstance(arg);
ObjectDefinition.forId(37749).getHandlers().put("option:go-through", this);
ObjectDefinition.forId(37928).getHandlers().put("option:go-through", this);
ObjectDefinition.forId(37929).getHandlers().put("option:go-through", this);
ObjectDefinition.forId(38811).getHandlers().put("option:go-through", this);
ObjectDefinition.forId(39191).getHandlers().put("option:climb-up", this);
ObjectDefinition.forId(39188).getHandlers().put("option:open", this);
SceneryDefinition.forId(37749).getHandlers().put("option:go-through", this);
SceneryDefinition.forId(37928).getHandlers().put("option:go-through", this);
SceneryDefinition.forId(37929).getHandlers().put("option:go-through", this);
SceneryDefinition.forId(38811).getHandlers().put("option:go-through", this);
SceneryDefinition.forId(39191).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(39188).getHandlers().put("option:open", this);
return this;
}
@@ -77,10 +77,10 @@ public final class WildernessPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(1765).getHandlers().put("option:climb-down", this);// ladder
ObjectDefinition.forId(1766).getHandlers().put("option:climb-up", this);// ladder
ObjectDefinition.forId(1816).getHandlers().put("option:pull", this);// kbd
ObjectDefinition.forId(1817).getHandlers().put("option:pull", this);// kbd
SceneryDefinition.forId(1765).getHandlers().put("option:climb-down", this);// ladder
SceneryDefinition.forId(1766).getHandlers().put("option:climb-up", this);// ladder
SceneryDefinition.forId(1816).getHandlers().put("option:pull", this);// kbd
SceneryDefinition.forId(1817).getHandlers().put("option:pull", this);// kbd
return this;
}
@@ -2,7 +2,7 @@ package core.game.interaction.city;
import api.ContentAPI;
import core.cache.def.impl.NPCDefinition;
import core.cache.def.impl.ObjectDefinition;
import core.cache.def.impl.SceneryDefinition;
import core.game.component.Component;
import core.game.content.dialogue.DialoguePlugin;
import core.game.content.global.Skillcape;
@@ -16,7 +16,6 @@ import core.game.node.entity.combat.CombatStyle;
import core.game.node.entity.npc.AbstractNPC;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.game.node.entity.player.link.RunScript;
import core.game.node.entity.player.link.SpellBookManager.SpellBook;
import core.game.node.entity.player.link.diary.DiaryType;
import core.game.node.entity.player.link.quest.Quest;
@@ -62,12 +61,12 @@ public final class WizardTowerPlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
ObjectDefinition.forId(12540).getHandlers().put("option:search", this);
ObjectDefinition.forId(12539).getHandlers().put("option:search", this);
ObjectDefinition.forId(2147).getHandlers().put("option:climb-down", this);
ObjectDefinition.forId(32015).getHandlers().put("option:climb-up", this);
SceneryDefinition.forId(12540).getHandlers().put("option:search", this);
SceneryDefinition.forId(12539).getHandlers().put("option:search", this);
SceneryDefinition.forId(2147).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(32015).getHandlers().put("option:climb-up", this);
NPCDefinition.forId(300).getHandlers().put("option:teleport", this);
ObjectDefinition.forId(11993).getHandlers().put("option:open", this);
SceneryDefinition.forId(11993).getHandlers().put("option:open", this);
PluginManager.definePlugin(new WizardtowerWizardNPC());
PluginManager.definePlugin(new WizardTowerDialogue());
PluginManager.definePlugin(new WizardMisgogDialogue());
@@ -105,7 +104,7 @@ public final class WizardTowerPlugin extends OptionHandler {
return true;
}
if (!Location.create(3103, 9576, 0).equals(((Scenery) node).getLocation())) {
return ObjectDefinition.getOptionHandler(2147, "climb-up").handle(player, node, option);
return SceneryDefinition.getOptionHandler(2147, "climb-up").handle(player, node, option);
}
player.getProperties().setTeleportLocation(GROUND_FLOOR);
break;

Some files were not shown because too many files have changed in this diff Show More