mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 00:32:06 +00:00
Create second dialogue (#469)
* Add fix for maven encoding on Linux machines * Fix dialoguehandler length
This commit is contained in:
@@ -41,8 +41,6 @@ public class DialogueHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendDialogues(int dialogue, int npcId) {
|
public void sendDialogues(int dialogue, int npcId) {
|
||||||
int MOLE_SKIN = player.getItemAssistant().getItemAmount(7418), MOLE_CLAW = player.getItemAssistant().getItemAmount(7416);
|
|
||||||
Farmers.FarmersData farmersData = Farmers.FarmersData.forId(player.npcType);
|
|
||||||
player.talkingNpc = npcId;
|
player.talkingNpc = npcId;
|
||||||
switch (dialogue) {
|
switch (dialogue) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -4967,6 +4965,16 @@ public class DialogueHandler {
|
|||||||
player.canWalkTutorial = true;
|
player.canWalkTutorial = true;
|
||||||
player.nextChat = 0;
|
player.nextChat = 0;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
sendDialogues2(dialogue, npcId); // Used to prevent Java error where method is too long
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void sendDialogues2(int dialogue, int npcId) {
|
||||||
|
int MOLE_SKIN = player.getItemAssistant().getItemAmount(7418), MOLE_CLAW = player.getItemAssistant().getItemAmount(7416);
|
||||||
|
Farmers.FarmersData farmersData = Farmers.FarmersData.forId(player.npcType);
|
||||||
|
player.talkingNpc = npcId;
|
||||||
|
switch (dialogue) {
|
||||||
/*
|
/*
|
||||||
* RS guide section
|
* RS guide section
|
||||||
*/
|
*/
|
||||||
@@ -6788,7 +6796,7 @@ public class DialogueHandler {
|
|||||||
if (player.getItemAssistant().freeSlots() >= 4) {
|
if (player.getItemAssistant().freeSlots() >= 4) {
|
||||||
sendNpcChat1("Here is your cannon, try not to lose it again.", player.talkingNpc, "Nulodion");
|
sendNpcChat1("Here is your cannon, try not to lose it again.", player.talkingNpc, "Nulodion");
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
player.getItemAssistant().addItem(player.getCannon().ITEM_PARTS[i], 1);
|
player.getItemAssistant().addItem(player.getCannon().ITEM_PARTS[i], 1);
|
||||||
}
|
}
|
||||||
player.lostCannon = false;
|
player.lostCannon = false;
|
||||||
player.nextChat = 0;
|
player.nextChat = 0;
|
||||||
@@ -6984,10 +6992,10 @@ public class DialogueHandler {
|
|||||||
//24 - 32:
|
//24 - 32:
|
||||||
//=700
|
//=700
|
||||||
case 3555:
|
case 3555:
|
||||||
player.getDialogueHandler().sendNpcChat(player.npcType, ChatEmotes.DEFAULT, "Hello Fair Traveler.",
|
player.getDialogueHandler().sendNpcChat(player.npcType, ChatEmotes.DEFAULT, "Hello Fair Traveler.",
|
||||||
"Can I interest you in a ride back to Shantay",
|
"Can I interest you in a ride back to Shantay",
|
||||||
"for 200 coins?");
|
"for 200 coins?");
|
||||||
player.getDialogueHandler().setNextDialogue(3556);
|
player.getDialogueHandler().setNextDialogue(3556);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3556:
|
case 3556:
|
||||||
@@ -7073,36 +7081,35 @@ public class DialogueHandler {
|
|||||||
"Can I interest you in a ride back to Pollnivneach",
|
"Can I interest you in a ride back to Pollnivneach",
|
||||||
"for 200 coins?");
|
"for 200 coins?");
|
||||||
player.getDialogueHandler().setNextDialogue(3571);
|
player.getDialogueHandler().setNextDialogue(3571);
|
||||||
break;
|
break;
|
||||||
case 3571:
|
case 3571:
|
||||||
player.getDialogueHandler().sendOption("Yes please", "No thanks");
|
player.getDialogueHandler().sendOption("Yes please", "No thanks");
|
||||||
player.getDialogueHandler().setOptionId(703);
|
player.getDialogueHandler().setOptionId(703);
|
||||||
break;
|
break;
|
||||||
case 3572:
|
case 3572:
|
||||||
CarpetTravel.carpetTravel(player, 3347, 2944);
|
CarpetTravel.carpetTravel(player, 3347, 2944);
|
||||||
break;
|
break;
|
||||||
case 3573:
|
case 3573:
|
||||||
player.getDialogueHandler().sendPlayerChat(ChatEmotes.DEFAULT, "No thanks.");
|
player.getDialogueHandler().sendPlayerChat(ChatEmotes.DEFAULT, "No thanks.");
|
||||||
player.getDialogueHandler().endDialogue();
|
player.getDialogueHandler().endDialogue();
|
||||||
break;
|
break;
|
||||||
case 3574:
|
case 3574:
|
||||||
player.getDialogueHandler().sendNpcChat(player.talkingNpc, ChatEmotes.DEFAULT, "Hello there, would you like me to enchant a battlestaff", "for 40k coins for you?");
|
player.getDialogueHandler().sendNpcChat(player.talkingNpc, ChatEmotes.DEFAULT, "Hello there, would you like me to enchant a battlestaff", "for 40k coins for you?");
|
||||||
break;
|
break;
|
||||||
case 3575:
|
case 3575:
|
||||||
player.getDialogueHandler().sendOption("Yes.", "No thanks.");
|
player.getDialogueHandler().sendOption("Yes.", "No thanks.");
|
||||||
player.dialogueAction = 3575;
|
player.dialogueAction = 3575;
|
||||||
break;
|
break;
|
||||||
case 3576:
|
case 3576:
|
||||||
player.getDialogueHandler().endDialogue();
|
player.getDialogueHandler().endDialogue();
|
||||||
player.getPacketSender().showInterface(205);
|
player.getPacketSender().showInterface(205);
|
||||||
break;
|
break;
|
||||||
case 3577:
|
case 3577:
|
||||||
player.getDialogueHandler().sendPlayerChat(ChatEmotes.HAPPY_JOYFUL, "No thanks.");
|
player.getDialogueHandler().sendPlayerChat(ChatEmotes.HAPPY_JOYFUL, "No thanks.");
|
||||||
player.getDialogueHandler().endDialogue();
|
player.getDialogueHandler().endDialogue();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void chatboxText(String text, String text1, String text2,
|
public void chatboxText(String text, String text1, String text2,
|
||||||
String text3, String title) {
|
String text3, String title) {
|
||||||
player.getPacketSender().sendString(title, 6180);
|
player.getPacketSender().sendString(title, 6180);
|
||||||
|
|||||||
Reference in New Issue
Block a user