Added some missing dialogue (#83)

Adjusted some facial animations
Moved some of the code around to 'clean' it up
Adjusted some of the object ids to hopefully fix softlocks on the quest.
This commit is contained in:
Qweqker 2020-02-18 21:12:19 -05:00 committed by GitHub
parent 598b2fc722
commit 92cfe1ea6a
3 changed files with 117 additions and 110 deletions

View file

@ -29,103 +29,102 @@ public class AlmeraDialogue extends DialoguePlugin {
public boolean handle(int interfaceId, int buttonId) {
final Quest quest = player.getQuestRepository().getQuest(WaterFall.NAME);
switch (stage) {
/* Main dialogue sequence */
case 0:
if (quest.getStage(player) == 0) {
interpreter.sendDialogues(304, FacialExpression.ASKING, "Ah, hello there. Nice to see an outsider for a change,", "are you busy? I have a problem.");
stage = 1;
} else if (quest.getStage(player) == 10) {
interpreter.sendDialogues(304, FacialExpression.JOLLY, "Hello brave adventurer, have you seen my boy yet?");
stage = 200;
} else if (quest.getStage(player) >= 20) {
interpreter.sendDialogues(304, FacialExpression.JOLLY, "Well hello, you're still around then.");
stage = 202;
} else {
case 99:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Oh okay, never mind.");
stage = 100;
break;
case 100:
end();
break;
case 200:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid not, but I'm sure he hasn't gone far.");
stage = 201;
break;
case 201:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "I do hope so, you can't be too careful these days.");
stage = 100;
break;
case 202:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I saw Hudon by the river but he refused to come back", "with me.");
stage = 203;
break;
case 203:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Yes he told me, the foolish lad came in drenched to the", "bone, he had fallen into the waterfall, lucky he wasn't", "killed! Now he can spend the rest of the summer in his", "room.");
stage = 204;
break;
case 204:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Any ideas on what I could do while I'm here?");
stage = 205;
break;
case 205:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Why don't you visit the tourist centre south of the", "waterfall?");
stage = 100;
break;
/* Main dialogue sequence */
case 0:
if (quest.getStage(player) == 0) {
interpreter.sendDialogues(304, FacialExpression.JOLLY, "Ah, hello there. Nice to see an outsider for a change,", "are you busy? I have a problem.");
stage = 1;
} else if (quest.getStage(player) == 10) {
interpreter.sendDialogues(304, FacialExpression.JOLLY, "Hello brave adventurer, have you seen my boy yet?");
stage = 200;
} else if (quest.getStage(player) >= 20) {
interpreter.sendDialogues(304, FacialExpression.JOLLY, "Well hello, you're still around then.");
stage = 202;
} else {
}
break;
case 1:
interpreter.sendOptions("Select an Option", "I'm afraid I'm in a rush.", "How can I help?");
stage = 2;
break;
case 2:
switch (buttonId) {
}
break;
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid I am in a rush.");
stage = 99;
interpreter.sendOptions("Select an Option", "I'm afraid I'm in a rush.", "How can I help?");
stage = 2;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "How can I help?");
stage = 3;
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid I am in a rush.");
stage = 99;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "How can I help?");
stage = 3;
break;
}
break;
case 3:
interpreter.sendDialogues(304, FacialExpression.DISGUSTED, "It's my son Hudon, he's always getting to trouble, the", "boy's convinced there's hidden treasure in the river and", "I'm a bit worried about his safety, the poor lad can't", "even swim.");
stage = 4;
break;
case 4:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I could go and take a look for you if you like?");
stage = 5;
break;
case 5:
interpreter.sendDialogues(304, FacialExpression.DISGUSTED, "Would you? You are kind. You can use the small raft", "out back if you wish, do be careful, the current down", "stream is very strong.");
quest.start(player);
stage = 100;
break;
case 6:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Perhaps you can speak to Hadley a further bit down", "south for more information on how to find the treasure.");
stage = 100;
break;
case 7:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I did it, I found the treasure under the waterfall!");
stage = 8;
break;
case 8:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Ah, very well done, adventurer!", "My boy Hudon was searching for that treasure too.");
stage = 9;
break;
case 9:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Maybe you could share it with him, he's just a boy.");
stage = 10;
break;
case 10:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "On second thought, I really have to go.");
stage = 100;
break;
case 99:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Oh okay, never mind.");
stage = 100;
break;
case 100:
end();
break;
case 200:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm afraid not, but I'm sure he hasn't gone far.");
stage = 201;
break;
case 201:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "I do hope so, you can't be too careful these days.");
stage = 100;
break;
case 202:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I saw Hudon by the river but he refused to come back", "with me.");
stage = 203;
break;
case 203:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Yes he told me, the foolish lad came in drenched to the", "bone, he had fallen into the waterfall, lucky he wasn't", "killed! Now he can spend the rest of the summer in his", "room.");
stage = 204;
break;
case 204:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Any ideas on what I could do while I'm here?");
stage = 205;
break;
case 205:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Why don't you visit the tourist centre south of the", "waterfall?");
stage = 100;
break;
}
break;
case 3:
interpreter.sendDialogues(304, FacialExpression.DISGUSTED, "It's my son Hudon, he's always getting to trouble, the", "boy's convinced there's hidden treasure in the river and", "I'm a bit worried about his safety, the poor lad can't", "even swim.");
stage = 4;
break;
case 4:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I could go and take a look for you if you like?");
stage = 5;
break;
case 5:
interpreter.sendDialogues(304, FacialExpression.DISGUSTED, "Would you? You are kind. You can use the small raft", "out back if you wish, do be careful, the current down", "stream is very strong.");
quest.start(player);
stage = 100;
break;
case 6:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Perhaps you can speak to Hadley a further bit down", "south for more information on how to find the treasure.");
stage = 100;
break;
case 7:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I did it, I found the treasure under the waterfall!");
stage = 8;
break;
case 8:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Ah, very well done, adventurer!", "My boy Hudon was searching for that treasure too.");
stage = 9;
break;
case 9:
interpreter.sendDialogues(304, FacialExpression.HALF_GUILTY, "Maybe you could share it with him, he's just a boy.");
stage = 10;
break;
case 10:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "On second thought, I really have to go.");
stage = 100;
break;
}
return true;
}
@ -142,7 +141,7 @@ public class AlmeraDialogue extends DialoguePlugin {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hello Almera.");
stage = 7;
} else {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hello.");
interpreter.sendDialogues(player, FacialExpression.NEUTRAL, "Hello.");
stage = 0;
}
return true;

View file

@ -34,41 +34,49 @@ public class GolrieDialogue extends DialoguePlugin {
/* Main dialogue sequence */
case 0:
interpreter.sendDialogues(306, FacialExpression.HALF_GUILTY, "That's me. I've been stuck in here for weeks, those", "goblins are trying to steal my family's heirlooms. My", "grandad gave me all sorts of old junk.");
interpreter.sendDialogues(306, FacialExpression.OSRS_NORMAL, "That's me. I've been stuck in here for weeks, those", "goblins are trying to steal my family's heirlooms. My", "grandad gave me all sorts of old junk.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Do you mind if I have a look?");
interpreter.sendDialogues(player, FacialExpression.ASKING, "Do you mind if I have a look?");
stage = 2;
break;
case 2:
interpreter.sendDialogues(306, FacialExpression.HALF_GUILTY, "No, of course not.");
interpreter.sendDialogues(306, FacialExpression.OSRS_HAPPY, "No, of course not.");
stage = 3;
break;
case 3:
//TODO: Possibly change this to chat message
interpreter.sendDialogue("You look amongst the junk on the floor.");
stage = 4;
break;
case 4:
//TODO: Possibly change this to chat message
interpreter.sendDialogue("Mixed with the junk on the floor you find Glarial's pebble.");
stage = 5;
break;
case 5:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Could I take this old pebble?");
//TODO: Possibly change to HAPPY
interpreter.sendDialogues(player, FacialExpression.ASKING, "Could I take this old pebble?");
stage = 6;
break;
case 6:
interpreter.sendDialogues(306, FacialExpression.HALF_GUILTY, "Oh that, yes have it, it's just some old elven junk I", "believe.");
interpreter.sendDialogues(306, FacialExpression.OSRS_NORMAL, "Oh that, yes have it, it's just some old elven junk I", "believe.");
player.getInventory().add(new Item(294, 1));
stage = 7;
break;
case 7:
interpreter.sendDialogues(306, FacialExpression.HALF_GUILTY, "Thanks a lot for the key traveller. I think I'll wait in", "here until those goblins get bored and leave.");
player.getInventory().remove(new Item(293, 1));
//TODO: Possibly change this to chat message
interpreter.sendDialogue("You give the key to Golrie.");
stage = 8;
break;
case 8:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "OK... Take care Golrie.");
interpreter.sendDialogues(306, FacialExpression.OSRS_HAPPY, "Thanks a lot for the key traveller. I think I'll wait in", "here until those goblins get bored and leave.");
player.getInventory().remove(new Item(293, 1));
stage = 9;
break;
case 9:
interpreter.sendDialogues(player, FacialExpression.NEUTRAL, "OK... Take care Golrie.");
stage = 100;
break;
}
@ -82,7 +90,7 @@ public class GolrieDialogue extends DialoguePlugin {
@Override
public boolean open(Object... args) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hello, is your name Golrie?");
interpreter.sendDialogues(player, FacialExpression.NEUTRAL, "Hello, is your name Golrie?");
stage = 0;
return true;
}

View file

@ -111,11 +111,11 @@ public final class WaterfallPlugin extends OptionHandler {
ObjectDefinition.forId(37247).getConfigurations().put("option:open", this);
ObjectDefinition.forId(32711).getConfigurations().put("option:open", this);
ObjectDefinition.forId(33046).getConfigurations().put("option:open", this);
ObjectDefinition.forId(33047).getConfigurations().put("option:search", this);
ObjectDefinition.forId(33047).getConfigurations().put("option:close", this);
ObjectDefinition.forId(33066).getConfigurations().put("option:search", this);
ObjectDefinition.forId(42313).getConfigurations().put("option:search", this);
ObjectDefinition.forId(42313).getConfigurations().put("option:close", this);
ObjectDefinition.forId(1993).getConfigurations().put("option:search", this);
ObjectDefinition.forId(1999).getConfigurations().put("option:search", this);
ObjectDefinition.forId(1757).getConfigurations().put("option:climb-up", this);
ObjectDefinition.forId(42319).getConfigurations().put("option:climb-up", this);
ObjectDefinition.forId(2002).getConfigurations().put("option:open", this);
ObjectDefinition.forId(1992).getConfigurations().put("option:read", this);
ObjectDefinition.forId(2014).getConfigurations().put("option:take treasure", this);
@ -200,14 +200,14 @@ public final class WaterfallPlugin extends OptionHandler {
ObjectBuilder.add(new GameObject(33047, Location.create(2530, 9844, 0), 10, 1));
player.getPacketDispatch().sendMessage("You open the chest.");
break;
case 1757:
case 42319:
if (node.getLocation().equals(new Location(2556, 9844))) {
ClimbActionHandler.climb(player, new Animation(828), Location.create(2557, 3444, 0));
} else {
ClimbActionHandler.climbLadder(player, (GameObject) node, option);
}
break;
case 33047:
case 42313:
switch (option) {
case "search":
if (quest.getStage(player) >= 30) {
@ -220,11 +220,11 @@ public final class WaterfallPlugin extends OptionHandler {
}
break;
case "close":
ObjectBuilder.add(new GameObject(33046, Location.create(2530, 9844, 0), 10, 1));
ObjectBuilder.add(new GameObject(42313, Location.create(2530, 9844, 0), 10, 1));
break;
}
break;
case 33066:
case 1993:
if (quest.getStage(player) >= 30) {
if (!player.getInventory().contains(296, 1)) {
player.getPacketDispatch().sendMessage("You search the coffin and inside you find an urn full of ashes.");