mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
For some reason the switch statement won't work for all of them, so we need a plugin too
This commit is contained in:
parent
5fad3b5b2f
commit
5c6273036c
2 changed files with 1692 additions and 1626 deletions
27
Server/src/plugin/interaction/object/LookAtOptionPlugin.java
Normal file
27
Server/src/plugin/interaction/object/LookAtOptionPlugin.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package plugin.interaction.object;
|
||||
|
||||
import org.crandor.cache.def.impl.ObjectDefinition;
|
||||
import org.crandor.game.interaction.OptionHandler;
|
||||
import org.crandor.game.node.Node;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.plugin.InitializablePlugin;
|
||||
import org.crandor.plugin.Plugin;
|
||||
|
||||
@InitializablePlugin
|
||||
public class LookAtOptionPlugin extends OptionHandler {
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
for (int i = 18877; i <= 18900; i++)
|
||||
{
|
||||
ObjectDefinition.forId(i).getConfigurations().put("option:look at", this);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handle(Player player, Node node, String option) {
|
||||
player.getPacketDispatch().sendMessage("The " + node.getName().toLowerCase() + " seem to be going south-west.");
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -40,6 +40,7 @@ import plugin.quest.touristrap.TouristTrapPlugin.BedabinAnvilHandler.AnnaWinchHa
|
|||
|
||||
/**
|
||||
* Represents the plugin used to handle interactions for tourist trap.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -396,10 +397,20 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
case 18959:
|
||||
player.getDialogueInterpreter().sendDialogue("A sturdy looking cart for carrying barrels of rocks out of ", "the mining camp.");
|
||||
break;
|
||||
case 18900:
|
||||
case 18899:
|
||||
case 18898:
|
||||
case 18878:
|
||||
case 18887:
|
||||
case 18886:
|
||||
case 18885:
|
||||
case 18884:
|
||||
case 18883:
|
||||
case 18882:
|
||||
case 18881:
|
||||
case 18880:
|
||||
case 18879:
|
||||
case 18878:
|
||||
case 18877:
|
||||
player.getDialogueInterpreter().sendDialogue("This looks like some disturbed sand. Footseps seem to be heading off", "towards the South.");
|
||||
break;
|
||||
}
|
||||
|
|
@ -505,6 +516,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Checks if the player contains an item.
|
||||
*
|
||||
* @param player the player.
|
||||
* @param item the item.
|
||||
* @return the item.
|
||||
|
|
@ -515,6 +527,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The winch dialogue plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -531,6 +544,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code WinchDialogue} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public WinchDialogue(final Player player) {
|
||||
|
|
@ -662,13 +676,14 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { DialogueInterpreter.getDialogueKey("winch dialogue") };
|
||||
return new int[]{DialogueInterpreter.getDialogueKey("winch dialogue")};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The use with handler for anna on the cart.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -724,6 +739,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The ana cart cutscene plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -732,7 +748,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
/**
|
||||
* The paths.
|
||||
*/
|
||||
private static final Location[][] PATHS = new Location[][] { { Location.create(3315, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9428, 0) }, { Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3316, 9417, 0), Location.create(3314, 9417, 0), Location.create(3303, 9417, 0) } };
|
||||
private static final Location[][] PATHS = new Location[][]{{Location.create(3315, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9428, 0)}, {Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3316, 9417, 0), Location.create(3314, 9417, 0), Location.create(3303, 9417, 0)}};
|
||||
|
||||
/**
|
||||
* Constructs a new {@code AnnaCartCutscene} {@code Object}.
|
||||
|
|
@ -743,6 +759,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code AnnaCartCutscene} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public AnnaCartCutscene(final Player player) {
|
||||
|
|
@ -827,6 +844,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The cart dialogue plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -834,6 +852,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code CartDialogue} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public CartDialogue(final Player player) {
|
||||
|
|
@ -913,13 +932,14 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { DialogueInterpreter.getDialogueKey("ana cart dialogue") };
|
||||
return new int[]{DialogueInterpreter.getDialogueKey("ana cart dialogue")};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The minecart dialogue plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -951,6 +971,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code MineCartDialogue} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public MineCartDialogue(final Player player) {
|
||||
|
|
@ -1011,6 +1032,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Method used to enter the cart.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public void enterCart(final Player player) {
|
||||
|
|
@ -1033,6 +1055,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The mining cart cutscene plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1041,7 +1064,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
/**
|
||||
* The paths.
|
||||
*/
|
||||
private static final Location[][] PATHS = new Location[][] { { Location.create(3303, 9417, 0), Location.create(3316, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9430, 0) }, { Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3303, 9417, 0) } };
|
||||
private static final Location[][] PATHS = new Location[][]{{Location.create(3303, 9417, 0), Location.create(3316, 9417, 0), Location.create(3317, 9417, 0), Location.create(3318, 9418, 0), Location.create(3318, 9430, 0)}, {Location.create(3318, 9430, 0), Location.create(3318, 9418, 0), Location.create(3317, 9417, 0), Location.create(3303, 9417, 0)}};
|
||||
|
||||
/**
|
||||
* The path index.
|
||||
|
|
@ -1057,6 +1080,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code MiningCartCutscene} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public MiningCartCutscene(final Player player) {
|
||||
|
|
@ -1134,6 +1158,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Gets the path index.
|
||||
*
|
||||
* @return the location.
|
||||
*/
|
||||
public Location[] getPath() {
|
||||
|
|
@ -1143,13 +1168,14 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { DialogueInterpreter.getDialogueKey("cart dialogue") };
|
||||
return new int[]{DialogueInterpreter.getDialogueKey("cart dialogue")};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The winch cutscene plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1164,6 +1190,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code WinchCutscene} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public WinchCutscene(final Player player) {
|
||||
|
|
@ -1214,6 +1241,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The use with handler on the chest.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1243,6 +1271,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The barrel dialogue plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1269,6 +1298,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code BarrelDialogue} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public BarrelDialogue(final Player player) {
|
||||
|
|
@ -1351,13 +1381,14 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { DialogueInterpreter.getDialogueKey("barrel dialogue") };
|
||||
return new int[]{DialogueInterpreter.getDialogueKey("barrel dialogue")};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The use with handler for the bedabin anvil.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1393,6 +1424,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The handler used to handle the anna barrel on the winch.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1429,6 +1461,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The prototype dart creation handler.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1457,6 +1490,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The prototype dialogue plugin.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1469,6 +1503,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code ProtoTypeDialogue} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public ProtoTypeDialogue(final Player player) {
|
||||
|
|
@ -1526,7 +1561,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { DialogueInterpreter.getDialogueKey("prototype dart") };
|
||||
return new int[]{DialogueInterpreter.getDialogueKey("prototype dart")};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1534,6 +1569,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The bedabin dialogue plugin handler.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1550,6 +1586,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code BedabinAnvilDialogue} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public BedabinAnvilDialogue(final Player player) {
|
||||
|
|
@ -1595,6 +1632,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* The skill pulse used to make a prototype dart.
|
||||
*
|
||||
* @author 'Vexia
|
||||
* @version 1.0
|
||||
*/
|
||||
|
|
@ -1612,6 +1650,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
/**
|
||||
* Constructs a new {@code ProtoTypePulse} {@code Object}.
|
||||
*
|
||||
* @param player the player.
|
||||
*/
|
||||
public ProtoTypePulse(Player player) {
|
||||
|
|
@ -1666,7 +1705,7 @@ public final class TouristTrapPlugin extends OptionHandler {
|
|||
|
||||
@Override
|
||||
public int[] getIds() {
|
||||
return new int[] { DialogueInterpreter.getDialogueKey("bedabin-anvil") };
|
||||
return new int[]{DialogueInterpreter.getDialogueKey("bedabin-anvil")};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue