Small Update

* Disabled The Old Dialogue System
* Converted CooksAssistant/Lumbridge Cook Dialogue
* Only Show Log Info For New Dialogue System When Server Is In Debug Mode
This commit is contained in:
Dark98
2021-12-15 02:08:54 +00:00
parent 8d0000de0b
commit 3c61ba69f3
8 changed files with 183 additions and 168 deletions
@@ -670,7 +670,9 @@ public final class DialogueFactoryPlugin {
private final String[] splitLines(String... text) {
if(text.length > 1){
logger.log(Level.INFO, "Detected more than 1 Dialogue line. Assuming Dialogues have been split already.");
if(GameConstants.SERVER_DEBUG) {
logger.log(Level.INFO, "Detected more than 1 Dialogue line. Assuming Dialogues have been split already.");
}
return text;
}
int characters = text[0].length();
@@ -317,140 +317,6 @@ public class DialogueHandler {
player.nextChat = 0;
player.ptjob = 2;
break;
case 50:
sendNpcChat1("What am I to do?", player.talkingNpc, "Cook");
player.nextChat = 51;
break;
case 51:
sendOption("What's wrong?", "Can you cook me a cake?",
"You don't look very happy.", "Nice hat.");
player.dialogueAction = 52;
break;
case 52:
sendPlayerChat("What's wrong?");
player.nextChat = 54;
break;
case 54:
sendNpcChat3(
"Oh dear, oh dear, oh dear, I'm in a terrible terrible",
"mess! It's the Duke's birthday today, and I should be",
"making him a lovely big birthday cake!",
player.talkingNpc, "Cook");
player.nextChat = 55;
break;
case 55:
sendNpcChat4(
"I've forgotten to buy the ingredients. I'll never get",
"them in time now. He'll sack me! What will I do? I have",
"four children and a goat to look after. Would you help",
"me? Please?", player.talkingNpc, "Cook");
player.nextChat = 56;
break;
case 56:
sendOption("I'm always happy to help a cook in distress.",
"I can't right now, Maybe later.");
player.dialogueAction = 57;
break;
case 57:
sendPlayerChat("Yes, I'll help you.");// 9157
player.nextChat = 60;
break;
case 58:
sendPlayerChat("I can't right now, Maybe later.");// 9158
player.nextChat = 59;
break;
case 59:
sendNpcChat1("Oh please! Hurry then!", player.talkingNpc, "Cook");
player.nextChat = 0;
break;
case 60:
sendNpcChat2("Oh thank you, thank you. I need milk, an egg, and",
"flour. I'd be very grateful if you can get them for me.",
player.talkingNpc, "Cook");
player.cookAss = 1;
QuestAssistant.sendStages(player);
player.nextChat = 61;
break;
case 61:
sendPlayerChat("So where do I find these ingredients then?");
player.nextChat = 62;
break;
case 62:
sendNpcChat3("You can find flour in any of the shops here.",
"You can find eggs by killing chickens.",
"You can find milk by using a bucket on a cow",
player.talkingNpc, "Cook");
player.nextChat = 0;
break;
case 63:
sendNpcChat1("I don't have time for your jibber-jabber!",
player.talkingNpc, "Cook");
player.nextChat = 0;
break;
case 64:
sendNpcChat1("Does it look like I have the time?",
player.talkingNpc, "Cook");
player.nextChat = 0;
break;
case 65:
sendPlayerChat("You don't look so happy.");
player.nextChat = 54;
break;
case 66:
sendNpcChat1(
"How are you getting on with finding the ingredients?",
player.talkingNpc, "Cook");
player.nextChat = 67;
break;
case 67:
if (player.getItemAssistant().playerHasItem(1944, 1)
&& player.getItemAssistant().playerHasItem(1927, 1)
&& player.getItemAssistant().playerHasItem(1933, 1)) {
sendPlayerChat("Here's all the items!");
player.nextChat = 68;
} else {
sendPlayerChat("I don't have all the items yet.");
player.nextChat = 59;
}
break;
case 68:
player.getItemAssistant().deleteItem(1944, 1);
player.getItemAssistant().deleteItem(1927, 1);
player.getItemAssistant().deleteItem(1933, 1);
player.cookAss = 2;
sendNpcChat2("You brought me everything I need! I'm saved!",
"Thank you!", player.talkingNpc, "Cook");
player.nextChat = 69;
break;
case 69:
sendPlayerChat("So do I get to go to the Duke's Party?");
player.nextChat = 70;
break;
case 70:
sendNpcChat2(
"I'm afraid not, only the big cheeses get to dine with the",
"Duke.", player.talkingNpc, "Cook");
player.nextChat = 72;
break;
case 72:
sendPlayerChat(
"Well, maybe one day I'll be important enough to sit on",
"the Duke's table");
player.nextChat = 74;
break;
case 74:
sendNpcChat1("Maybe, but I won't be holding my breath.",
player.talkingNpc, "Cook");
player.nextChat = 75;
break;
case 75:
QuestRewards.cookReward(player);
break;
case 76:
sendNpcChat1("Thanks for helping me out friend!",
player.talkingNpc, "Cook");
player.nextChat = 0;
break;
case 84:
sendNpcChat1("How are you getting on finding all my supplies",
player.talkingNpc, "Doric");
@@ -393,9 +393,6 @@ public class DialogueOptions {
} else if (player.dialogueAction == 56) {
player.getDialogueHandler().sendDialogues(96, player.npcType);
return;
} else if (player.dialogueAction == 57) {
player.getDialogueHandler().sendDialogues(57, player.npcType);
return;
} else if (player.dialogueAction == 3222) {
player.getBarrows().checkCoffins();
player.getPacketSender().closeAllWindows();
@@ -692,9 +689,6 @@ public class DialogueOptions {
} else if (player.dialogueAction == 74) {
player.getDialogueHandler().sendDialogues(535, player.npcType);
return;
} else if (player.dialogueAction == 57) {
player.getDialogueHandler().sendDialogues(58, player.npcType);
return;
} else if (player.dialogueAction == 62) {
player.getDialogueHandler().sendDialogues(309, player.npcType);
return;
@@ -944,9 +938,6 @@ public class DialogueOptions {
if (player.dialogueAction == 113) {
player.getDialogueHandler().sendDialogues(3540, player.npcType);
}
if (player.dialogueAction == 52) {
player.getDialogueHandler().sendDialogues(52, player.npcType);
}
if (player.dialogueAction == 1000) {
player.getDialogueHandler().sendDialogues(3524,player.npcType);
}
@@ -1017,9 +1008,6 @@ public class DialogueOptions {
player.getPlayerAssistant().gloryTeleport(3293, 3174, 0, "modern");
Teles.necklaces(player);
}
if (player.dialogueAction == 52) {
player.getDialogueHandler().sendDialogues(64, player.npcType);
}
if (player.dialogueAction == 1000) {
player.getDialogueHandler().sendDialogues(3523, player.npcType);
}
@@ -1093,9 +1081,6 @@ public class DialogueOptions {
player.getPlayerAssistant().gloryTeleport(2911, 3152, 0, "modern");
Teles.necklaces(player);
}
if (player.dialogueAction == 52) {
player.getDialogueHandler().sendDialogues(65, player.npcType);
}
if (player.dialogueAction == 1000) {
player.getDialogueHandler().sendDialogues(3523,player.npcType);
}
@@ -1154,9 +1139,6 @@ public class DialogueOptions {
player.getPlayerAssistant().gloryTeleport(3103, 3249, 0, "modern");
Teles.necklaces(player);
}
if (player.dialogueAction == 52) {
player.getDialogueHandler().sendDialogues(63, player.npcType);
}
if (player.dialogueAction == 1000) {
player.getDialogueHandler().sendDialogues(3523, player.npcType);
}