diff --git a/Server/src/main/content/region/morytania/phas/dialogue/GhostDiscipleDialogue.java b/Server/src/main/content/region/morytania/phas/dialogue/GhostDiscipleDialogue.java index e66cb4491..23d8093fe 100644 --- a/Server/src/main/content/region/morytania/phas/dialogue/GhostDiscipleDialogue.java +++ b/Server/src/main/content/region/morytania/phas/dialogue/GhostDiscipleDialogue.java @@ -4,11 +4,13 @@ import core.game.dialogue.DialoguePlugin; import core.game.node.entity.npc.NPC; import core.game.node.entity.player.Player; import core.game.node.item.Item; +import core.plugin.Initializable; /** * Handles the dialogue used for a ghost disciple. * @author Vexia */ +@Initializable public final class GhostDiscipleDialogue extends DialoguePlugin { /** diff --git a/Server/src/main/content/region/morytania/phas/dialogue/GhostInkeeperDialogue.java b/Server/src/main/content/region/morytania/phas/dialogue/GhostInkeeperDialogue.java index 8a17783b4..107cc9800 100644 --- a/Server/src/main/content/region/morytania/phas/dialogue/GhostInkeeperDialogue.java +++ b/Server/src/main/content/region/morytania/phas/dialogue/GhostInkeeperDialogue.java @@ -3,11 +3,13 @@ package content.region.morytania.phas.dialogue; import core.game.dialogue.DialoguePlugin; import content.region.morytania.phas.handlers.PhasmatysZone; import core.game.node.entity.player.Player; +import core.plugin.Initializable; /** * Handles the ghost inkeeper dialogue. * @author Vexia */ +@Initializable public class GhostInkeeperDialogue extends DialoguePlugin { /** @@ -105,9 +107,7 @@ public class GhostInkeeperDialogue extends DialoguePlugin { stage++; break; case 31: - player("Nope, you are right. I am very busy!");// .. I dont want - // to do this - // dialogue. + player("Nope, you are right. I am very busy!");// .. Might need future revision stage++; break; case 32: diff --git a/Server/src/main/content/region/morytania/phas/dialogue/GhostSailorDialogue.java b/Server/src/main/content/region/morytania/phas/dialogue/GhostSailorDialogue.java index f911d8c2d..55a1f6e59 100644 --- a/Server/src/main/content/region/morytania/phas/dialogue/GhostSailorDialogue.java +++ b/Server/src/main/content/region/morytania/phas/dialogue/GhostSailorDialogue.java @@ -5,12 +5,14 @@ import core.game.dialogue.FacialExpression; import content.region.morytania.phas.handlers.PhasmatysZone; import core.game.node.entity.npc.NPC; import core.game.node.entity.player.Player; +import core.plugin.Initializable; /** * Represents the ghost sailor dialogue plugin. * @author 'Vexia * @version 1.0 */ +@Initializable public final class GhostSailorDialogue extends DialoguePlugin { /** @@ -40,10 +42,10 @@ public final class GhostSailorDialogue extends DialoguePlugin { npc = (NPC) args[0]; if (PhasmatysZone.hasAmulet(player)) { player("Hi there. Why do you still bother having ships here? I", "mean - you're dead, what use are they to you?"); - stage = 10; + stage = 1; } else { interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Woooo wooo wooooo woooo"); - stage = 0; + stage = 10; } return true; } @@ -51,26 +53,26 @@ public final class GhostSailorDialogue extends DialoguePlugin { @Override public boolean handle(int interfaceId, int buttonId) { switch (stage) { - case 0: - interpreter.sendDialogue("You cannot understand the ghost."); - stage = 1; - break; case 1: - end(); - break; - case 10: npc("We keep ships because we still need trade in", "Phasmatys. Every trader that comes to Phastmatys is", "made to worship the Ectofuntus, so that the Ectopower", "doesn't run out."); stage++; break; - case 11: + case 2: player("So, without traders to worship in the Temple you're", "history right?"); stage++; break; - case 12: + case 3: npc("Aye, matey."); stage++; break; - case 13: + case 4: + end(); + break; + case 10: + interpreter.sendDialogue("You cannot understand the ghost."); + stage = 11; + break; + case 11: end(); break; } diff --git a/Server/src/main/content/region/morytania/phas/dialogue/GhostShopKeeperDialogue.java b/Server/src/main/content/region/morytania/phas/dialogue/GhostShopKeeperDialogue.java index 97a369934..da88f6676 100644 --- a/Server/src/main/content/region/morytania/phas/dialogue/GhostShopKeeperDialogue.java +++ b/Server/src/main/content/region/morytania/phas/dialogue/GhostShopKeeperDialogue.java @@ -42,7 +42,7 @@ public final class GhostShopKeeperDialogue extends DialoguePlugin { interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Can I help you at all?"); stage = 0; } else { - interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Woooo wooo wooooo woooo"); + interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Woooo wooo wooooo woooo"); stage = 10; } return true; @@ -63,7 +63,7 @@ public final class GhostShopKeeperDialogue extends DialoguePlugin { break; case 2: interpreter.sendDialogues(npc, FacialExpression.HAPPY, "I'm glad you ask! You can buy as many of the items", "stocked as you wish. You can also sell most items to the", "shop."); - stage = 11; + stage = 3; break; case 3: end(); diff --git a/Server/src/main/content/region/morytania/phas/dialogue/GhostVillagerDialogue.java b/Server/src/main/content/region/morytania/phas/dialogue/GhostVillagerDialogue.java index 18a2cacc9..759c66f1b 100644 --- a/Server/src/main/content/region/morytania/phas/dialogue/GhostVillagerDialogue.java +++ b/Server/src/main/content/region/morytania/phas/dialogue/GhostVillagerDialogue.java @@ -3,12 +3,15 @@ package content.region.morytania.phas.dialogue; import core.game.dialogue.DialoguePlugin; import content.region.morytania.phas.handlers.PhasmatysZone; import core.game.node.entity.player.Player; +import core.plugin.Initializable; import core.tools.RandomFunction; /** * Handles the ghost villager dialogue. * @author Vexia */ + +@Initializable public final class GhostVillagerDialogue extends DialoguePlugin { /** @@ -46,6 +49,7 @@ public final class GhostVillagerDialogue extends DialoguePlugin { npc("Woooo wooo wooooo woooo"); stage = 10; } + return true; } diff --git a/Server/src/main/content/region/morytania/phas/handlers/PhasmatysZone.java b/Server/src/main/content/region/morytania/phas/handlers/PhasmatysZone.java index e22b7c3f6..199cdbd88 100644 --- a/Server/src/main/content/region/morytania/phas/handlers/PhasmatysZone.java +++ b/Server/src/main/content/region/morytania/phas/handlers/PhasmatysZone.java @@ -28,7 +28,7 @@ import org.rs09.consts.NPCs; import core.plugin.ClassScanner; /** - * Handles the phasmatyz zone area. + * Handles the phasmatys zone area. * * @author Vexia */ @@ -53,11 +53,7 @@ public final class PhasmatysZone extends MapZone implements Plugin { ZoneBuilder.configure(this); ClassScanner.definePlugin(new GravingasNPC()); ClassScanner.definePlugin(new NecrovarusDialogue()); - ClassScanner.definePlugin(new GhostSailorDialogue()); ClassScanner.definePlugin(new EctoplasmFillPlugin()); - ClassScanner.definePlugin(new GhostDiscipleDialogue()); - ClassScanner.definePlugin(new GhostVillagerDialogue()); - ClassScanner.definePlugin(new GhostInkeeperDialogue()); return this; } @@ -76,7 +72,8 @@ public final class PhasmatysZone extends MapZone implements Plugin { } if ((npc.getName().toLowerCase().contains("ghost") || npc.getName().equalsIgnoreCase("velorina") || npc.getName().contains("husband")) && !hasAmulet(player)) { - player.getDialogueInterpreter().open("ghosty dialogue", target); + //player.getDialogueInterpreter().open("ghosty dialogue", target); // Commented for ghost npcs to work from their individual plugin files + player.getDialogueInterpreter().open(target.getId() , target); return true; } }