Fixed Varrock sword shop shopkeeper and his assistant not being able to speak

Catherby's Vannessa no longer double prompts players about what they want to buy
Varrock sword shop staff and Catherby's Vannessa now have correct facial expressions
This commit is contained in:
Skal Fate
2023-02-04 09:14:47 +00:00
committed by Ryan
parent 9fc92f52f4
commit e1fa33b4dd
2 changed files with 12 additions and 16 deletions
@@ -30,10 +30,6 @@ public class VanessaDialogue extends DialoguePlugin {
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
interpreter.sendOptions("Select an Option", "What are you selling?", "Can you give me any Farming advice?", "I'm okay, thank you.");
stage = 1;
break;
case 1:
interpreter.sendOptions("Select an Option", "What are you selling?", "Can you give me any Farming advice?", "I'm okay, thank you.");
stage = 10;
break;
@@ -44,11 +40,11 @@ public class VanessaDialogue extends DialoguePlugin {
npc.openShop(player);
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Can you give me any Farming advice?");
interpreter.sendDialogues(player, FacialExpression.HALF_ASKING, "Can you give me any Farming advice?");
stage = 20;
break;
case 3:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm okay, thank you.");
interpreter.sendDialogues(player, FacialExpression.FRIENDLY, "I'm okay, thank you.");
stage = 30;
break;
@@ -56,10 +52,7 @@ public class VanessaDialogue extends DialoguePlugin {
break;
case 20:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Yes - ask a gardener.");
stage = 21;
break;
case 21:
end();
stage = 30;
break;
case 30:
end();
@@ -77,7 +70,7 @@ public class VanessaDialogue extends DialoguePlugin {
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hello. How can I help you?");
interpreter.sendDialogues(npc, FacialExpression.HAPPY, "Hello. How can I help you?");
stage = 0;
return true;
}
@@ -4,11 +4,14 @@ import core.game.dialogue.DialoguePlugin;
import core.game.dialogue.FacialExpression;
import core.game.node.entity.npc.NPC;
import core.game.node.entity.player.Player;
import core.plugin.Initializable;
/**
* Handles the VarrockSwordShopDialogue dialogue.
* @author 'Vexia
*/
@Initializable
public class VarrockSwordShopDialogue extends DialoguePlugin {
public VarrockSwordShopDialogue() {
@@ -21,7 +24,7 @@ public class VarrockSwordShopDialogue extends DialoguePlugin {
@Override
public int[] getIds() {
return new int[] { 551 };
return new int[] { 551, 552 };
}
@Override
@@ -36,11 +39,11 @@ public class VarrockSwordShopDialogue extends DialoguePlugin {
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Yes, please.");
interpreter.sendDialogues(player, FacialExpression.HAPPY, "Yes, please.");
stage = 2;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No, I'm okay for swords right now.");
interpreter.sendDialogues(player, FacialExpression.FRIENDLY, "No, I'm okay for swords right now.");
stage = 10;
break;
}
@@ -51,7 +54,7 @@ public class VarrockSwordShopDialogue extends DialoguePlugin {
npc.openShop(player);
break;
case 10:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Come back if you need any.");
interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Come back if you need any.");
stage = 11;
break;
case 11:
@@ -71,7 +74,7 @@ public class VarrockSwordShopDialogue extends DialoguePlugin {
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hello, adventurer. Can I interest you in some swords?");
interpreter.sendDialogues(npc, FacialExpression.HAPPY, "Hello, adventurer. Can I interest you in some swords?");
stage = 0;
return true;
}