Added Random Dialogue for Man and Woman NPCs (#476)

* Update DialogueHandler.java

* Update NpcActions.java

* Update DialogueHandler.java
This commit is contained in:
Olivier
2021-02-15 08:17:51 -08:00
committed by GitHub
parent 440a559c64
commit f22b9553c6
2 changed files with 36 additions and 0 deletions
@@ -7400,6 +7400,28 @@ public class DialogueHandler {
player.getDialogueHandler().sendNpcChat(player.talkingNpc, ChatEmotes.HAPPY_JOYFUL, "Enjoy your stay here. May it be spiritually uplifting!");
player.getDialogueHandler().endDialogue();
break;
case 3869:
player.getDialogueHandler().sendPlayerChat(ChatEmotes.DEFAULT, "Hello, how's it going?");
player.nextChat = 3870;
break;
case 3870:
player.getDialogueHandler().sendNpcChat(player.talkingNpc, ChatEmotes.HAPPY_JOYFUL, "I'm fine how are you?");
player.nextChat = 3871;
break;
case 3871:
player.getDialogueHandler().sendPlayerChat(ChatEmotes.DEFAULT, "Very well thank you.");
player.getDialogueHandler().endDialogue();
break;
case 3872:
player.getDialogueHandler().sendPlayerChat(ChatEmotes.DEFAULT, "Hello, how's it going?");
player.nextChat = 3873;
break;
case 3873:
player.getDialogueHandler().sendNpcChat(player.talkingNpc, ChatEmotes.HAPPY_JOYFUL, "Hello there! Nice weather we've been having.");
player.getDialogueHandler().endDialogue();
break;
}
}
public void chatboxText(String text, String text1, String text2,
@@ -38,6 +38,20 @@ public class NpcActions {
}
}
switch (npcType) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6: //1-3 Man, 4-6 Woman - We are playing random dialogues here
if (Misc.random(10) <= 5)
{
player.getDialogueHandler().sendDialogues(3869, npcType);
}
else {
player.getDialogueHandler().sendDialogues(3872, npcType);
}
break;
case 389 : //thormac
player.getDialogueHandler().sendDialogues(3574, npcType);
break;