Port Phasmatys ghosts now UwU when spoken to without ghostspeak amulet

This commit is contained in:
Skal Fate
2023-02-18 04:02:59 +00:00
committed by Ryan
parent 7600ac8b49
commit 4ee6f3f752
6 changed files with 28 additions and 23 deletions
@@ -4,11 +4,13 @@ import core.game.dialogue.DialoguePlugin;
import core.game.node.entity.npc.NPC; import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.game.node.item.Item; import core.game.node.item.Item;
import core.plugin.Initializable;
/** /**
* Handles the dialogue used for a ghost disciple. * Handles the dialogue used for a ghost disciple.
* @author Vexia * @author Vexia
*/ */
@Initializable
public final class GhostDiscipleDialogue extends DialoguePlugin { public final class GhostDiscipleDialogue extends DialoguePlugin {
/** /**
@@ -3,11 +3,13 @@ package content.region.morytania.phas.dialogue;
import core.game.dialogue.DialoguePlugin; import core.game.dialogue.DialoguePlugin;
import content.region.morytania.phas.handlers.PhasmatysZone; import content.region.morytania.phas.handlers.PhasmatysZone;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.plugin.Initializable;
/** /**
* Handles the ghost inkeeper dialogue. * Handles the ghost inkeeper dialogue.
* @author Vexia * @author Vexia
*/ */
@Initializable
public class GhostInkeeperDialogue extends DialoguePlugin { public class GhostInkeeperDialogue extends DialoguePlugin {
/** /**
@@ -105,9 +107,7 @@ public class GhostInkeeperDialogue extends DialoguePlugin {
stage++; stage++;
break; break;
case 31: case 31:
player("Nope, you are right. I am very busy!");// .. I dont want player("Nope, you are right. I am very busy!");// .. Might need future revision
// to do this
// dialogue.
stage++; stage++;
break; break;
case 32: case 32:
@@ -5,12 +5,14 @@ import core.game.dialogue.FacialExpression;
import content.region.morytania.phas.handlers.PhasmatysZone; import content.region.morytania.phas.handlers.PhasmatysZone;
import core.game.node.entity.npc.NPC; import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.plugin.Initializable;
/** /**
* Represents the ghost sailor dialogue plugin. * Represents the ghost sailor dialogue plugin.
* @author 'Vexia * @author 'Vexia
* @version 1.0 * @version 1.0
*/ */
@Initializable
public final class GhostSailorDialogue extends DialoguePlugin { public final class GhostSailorDialogue extends DialoguePlugin {
/** /**
@@ -40,10 +42,10 @@ public final class GhostSailorDialogue extends DialoguePlugin {
npc = (NPC) args[0]; npc = (NPC) args[0];
if (PhasmatysZone.hasAmulet(player)) { 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?"); 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 { } else {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Woooo wooo wooooo woooo"); interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Woooo wooo wooooo woooo");
stage = 0; stage = 10;
} }
return true; return true;
} }
@@ -51,26 +53,26 @@ public final class GhostSailorDialogue extends DialoguePlugin {
@Override @Override
public boolean handle(int interfaceId, int buttonId) { public boolean handle(int interfaceId, int buttonId) {
switch (stage) { switch (stage) {
case 0:
interpreter.sendDialogue("You cannot understand the ghost.");
stage = 1;
break;
case 1: 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."); 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++; stage++;
break; break;
case 11: case 2:
player("So, without traders to worship in the Temple you're", "history right?"); player("So, without traders to worship in the Temple you're", "history right?");
stage++; stage++;
break; break;
case 12: case 3:
npc("Aye, matey."); npc("Aye, matey.");
stage++; stage++;
break; break;
case 13: case 4:
end();
break;
case 10:
interpreter.sendDialogue("You cannot understand the ghost.");
stage = 11;
break;
case 11:
end(); end();
break; break;
} }
@@ -42,7 +42,7 @@ public final class GhostShopKeeperDialogue extends DialoguePlugin {
interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Can I help you at all?"); interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Can I help you at all?");
stage = 0; stage = 0;
} else { } else {
interpreter.sendDialogues(npc, FacialExpression.NEUTRAL, "Woooo wooo wooooo woooo"); interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Woooo wooo wooooo woooo");
stage = 10; stage = 10;
} }
return true; return true;
@@ -63,7 +63,7 @@ public final class GhostShopKeeperDialogue extends DialoguePlugin {
break; break;
case 2: 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."); 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; break;
case 3: case 3:
end(); end();
@@ -3,12 +3,15 @@ package content.region.morytania.phas.dialogue;
import core.game.dialogue.DialoguePlugin; import core.game.dialogue.DialoguePlugin;
import content.region.morytania.phas.handlers.PhasmatysZone; import content.region.morytania.phas.handlers.PhasmatysZone;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import core.plugin.Initializable;
import core.tools.RandomFunction; import core.tools.RandomFunction;
/** /**
* Handles the ghost villager dialogue. * Handles the ghost villager dialogue.
* @author Vexia * @author Vexia
*/ */
@Initializable
public final class GhostVillagerDialogue extends DialoguePlugin { public final class GhostVillagerDialogue extends DialoguePlugin {
/** /**
@@ -46,6 +49,7 @@ public final class GhostVillagerDialogue extends DialoguePlugin {
npc("Woooo wooo wooooo woooo"); npc("Woooo wooo wooooo woooo");
stage = 10; stage = 10;
} }
return true; return true;
} }
@@ -28,7 +28,7 @@ import org.rs09.consts.NPCs;
import core.plugin.ClassScanner; import core.plugin.ClassScanner;
/** /**
* Handles the phasmatyz zone area. * Handles the phasmatys zone area.
* *
* @author Vexia * @author Vexia
*/ */
@@ -53,11 +53,7 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
ZoneBuilder.configure(this); ZoneBuilder.configure(this);
ClassScanner.definePlugin(new GravingasNPC()); ClassScanner.definePlugin(new GravingasNPC());
ClassScanner.definePlugin(new NecrovarusDialogue()); ClassScanner.definePlugin(new NecrovarusDialogue());
ClassScanner.definePlugin(new GhostSailorDialogue());
ClassScanner.definePlugin(new EctoplasmFillPlugin()); ClassScanner.definePlugin(new EctoplasmFillPlugin());
ClassScanner.definePlugin(new GhostDiscipleDialogue());
ClassScanner.definePlugin(new GhostVillagerDialogue());
ClassScanner.definePlugin(new GhostInkeeperDialogue());
return this; return this;
} }
@@ -76,7 +72,8 @@ public final class PhasmatysZone extends MapZone implements Plugin<Object> {
} }
if ((npc.getName().toLowerCase().contains("ghost") || npc.getName().equalsIgnoreCase("velorina") || npc.getName().contains("husband")) && !hasAmulet(player)) { 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; return true;
} }
} }