Burthorpe Immersion Improvements

Harrallak Menarous isn't sliding around the floor now
Corrected Bernald's Dialogue to be the the one before Garden of Tranquility's quest
Swapped Ocga and Penda's Dialogue (minor) because Penda is the crazy one in the bar
Added drops for killing the Servant
Made Eadburg the chef drops (bones only) and adjusted fighting values
Adjusted guards attack animation
Added Sam and Rachael the gamesroom barmaids
Moved Bernald and Tostig's dialogue from Taverley to Burthorpe
Swapped out default archers on level 2 castle to Burthorpe archers instead
Reserve one archer on level 2 for Death Plateau later
Added more examine texts
Added Unferth as the new spawn and moved Ocga out of that house
Updated Hild's dialogue
This commit is contained in:
Oven Bread
2023-07-23 14:49:09 +00:00
committed by Ryan
parent defe780c39
commit cb34966f38
19 changed files with 1040 additions and 631 deletions
@@ -0,0 +1,46 @@
package content.region.asgarnia.burthorpe.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
/**
* Bernald Dialogue
* @author ovenbread
*
* https://www.youtube.com/watch?v=4odb7qhBPfA
* https://www.youtube.com/watch?v=nisJKOtqWIo 1:08:53
*/
@Initializable
class BernaldDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
// // Garden of Tranquility has not been implemented.
// if(hasRequirement(player!!, "Garden of Tranquility")) {
// if (isQuestComplete(player!!, DeathPlateau.questName)) {
// when (stage) {
// 0 -> playerl(FacialExpression.FRIENDLY, "How are your grapes coming along?").also { stage++ }
// 1 -> npc(FacialExpression.FRIENDLY, "Marvellous, thanks to your help, " + player.username + "!").also { stage = END_DIALOGUE }
// }
// }
// }
when (stage) {
START_DIALOGUE -> npcl(FacialExpression.WORRIED, "Do you know anything about grapevine diseases?").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "No, I'm afraid I don't.").also { stage++ }
2 -> npcl(FacialExpression.GUILTY, "Oh, that's a shame. I hope I find someone soon, otherwise I could lose all of this year's crop.").also { stage = END_DIALOGUE }
}
return true
}
override fun newInstance(player: Player): DialoguePlugin {
return BernaldDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.BERNALD_2580)
}
}
@@ -1,303 +0,0 @@
package content.region.asgarnia.burthorpe.dialogue;
import core.game.dialogue.DialoguePlugin;
import core.game.dialogue.FacialExpression;
import core.game.node.entity.npc.NPC;
import core.plugin.Initializable;
import core.game.node.entity.player.Player;
/**
* Represents the dialogue plugin used for the harrallak menarous npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HarrallakMenarous extends DialoguePlugin {
/**
* Constructs a new {@code HarrallakMenarous} {@code Object}.
*/
public HarrallakMenarous() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HarrallakMenarous} {@code Object}.
* @param player the player.
*/
public HarrallakMenarous(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HarrallakMenarous(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Welcome to my humble guild, " + player.getUsername() + ".");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
interpreter.sendOptions("Select an Option", "Quite a place you've got here.", "You any good with a sword?", "Bye!");
stage = 1;
break;
case 1:
if (buttonId == 1) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Quite a place you've got here. Tell me more about it.");
stage = 53;
} else if (buttonId == 2) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "You any good with a sword?");
stage = 5;
} else if (buttonId == 3) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Bye!");
stage = 2;
}
break;
case 2:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Farewell, brave warrior, I do hope you enjoy my guild.");
stage = 120;
break;
case 3:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "You any good with a sword?");
stage = 4;
break;
case 4:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Am I any good with a sword'? Have you any clue who I", "am?");
stage = 5;
break;
case 5:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Not really, no.");
stage = 6;
break;
case 6:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Why, I could best any person alive in a rapier duel!");
stage = 7;
break;
case 7:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Try me, then!");
stage = 8;
break;
case 8:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "My dear man, I couldn't possibly duel you, I might hurt", "you and then what would happen to my reputation!", "Besides, I have this wonderful guild to run. Why don't", " you take a look at the various activities we have.");
stage = -8;
break;
case -8:
npc("You might even collect enough tokens to be allowed in", "to kill the strange beasts from the east!");
stage = 10;
break;
case 10:
interpreter.sendOptions("Select an Option", "Tell me about the Strength training Area.", "Tell me about the Attack training area.", "Tell me about the Defence training area.", "Tell me about the Combat training area.", "Tell me about tokens.");
stage = 11;
break;
case 11:
if (buttonId == 1) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Tell me about the Strength training area.");
stage = 12;
} else if (buttonId == 2) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Tell me about the Attack training area.");
stage = 29;
} else if (buttonId == 3) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Tell me about the Defence training area");
stage = 16;
} else if (buttonId == 4) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Tell me about the Combat training area");
stage = 35;
} else if (buttonId == 5) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Tell me about tokens.");
stage = 42;
}
break;
case 12:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ahh, the mighty warrior, Sloane, guards the Strength", "training area. This intriguing little area consits of two", "shotput lanes for different weights of shot. It's fairly", "simple, the referee or Sloane can explain more. There's");
stage = 13;
break;
case 13:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "also the store room next door where Jimmy might share", "his talents with you, but don't tell him that I know", "he's not on guard duty!");
stage = 14;
break;
case 14:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Oh? Why?");
stage = 15;
break;
case 15:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Well, he's doing no harm and let's face it, with all these", "warriors around, the guild is hardly unguarded. You can", "find the strength area just up the stairs behind the bank.");
stage = 10;
break;
case 16:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "To polish your defensive skills to the very highest level,", "we've employed a most intentive dwarf and a catapult.");
stage = 17;
break;
case 17:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "You're going to throw dwarves at me?");
stage = 18;
break;
case 18:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Oh my, no! I think Gamfred would object to that most", "strongly.");
stage = 19;
break;
case 19:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "He's an inventor, you see, and has built a marvellous", "contraptiont hat can throw all sorts of things at you.", "Things such as magic missiles...");
stage = 20;
break;
case 20:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Mmmm?");
stage = 21;
break;
case 21:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...spiked iron balls...");
stage = 22;
break;
case 22:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Er...");
stage = 23;
break;
case 23:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...spinning, slashing bladed...");
stage = 24;
break;
case 24:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Ummm...");
stage = 25;
break;
case 25:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...and anvils.");
stage = 26;
break;
case 26:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...and anvils.");
stage = 27;
break;
case 27:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "ANVILS?");
stage = 28;
break;
case 28:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "No need to be afraid, it's all under very controlled", "conditions! You can find it just up the stairs and", "behind the bank.");
stage = 10;
break;
case 29:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ahhh, dummies.");
stage = 30;
break;
case 30:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "I'm no dummy, I just want to know what is there!");
stage = 31;
break;
case 31:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Oh no, my dear man, I did not mean you at all! The", "training area has mechanical dummies that pop up out of", "holes in the floor. The noble dward, Gamfred, invented the", "mechanism and Ajjat can explain more about what to do");
stage = 32;
break;
case 32:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "there.");
stage = 33;
break;
case 33:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Oh, okay, I'll have to try it out.");
stage = 34;
break;
case 34:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You can find it just down the corridor and on", "your right.");
stage = 10;
break;
case 35:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ahh, yes, our redient magician from foreign lands", "created a most amazing gadget that can turn your own", "armour against you! It's really quite intriguing.");
stage = 36;
break;
case 36:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "That sounds dangerous. What if I'm wearing it at the", "time?");
stage = 37;
break;
case 37:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "So far, that's not happend. You need to speak to", "Shanomi about the specifics of the process, but as I", "understand it, putting a suit of armour in one of these", "devices will make it come to life somehow. The better the");
stage = 38;
break;
case 38:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "armour, the harder it is to defeat.");
stage = 39;
break;
case 39:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Fighting my own armour sounds weird. I could be", "killed by it...");
stage = 40;
break;
case 40:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Indeed, we have had a few fatalities from warriors", "overstretching themselves and not knowing their limits.", "Start small and work up, is my motto! That and go see", "Lidio for some food if you need it.");
stage = 41;
break;
case 41:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Okay, thanks for the warning.");
stage = 10;
break;
case 42:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ahh, yes! The tokens allow you to spend an amount of", "time with my 'discovery', located on the top floor of the", "guild. Now, the amount of tokens you collect from the", "five activities around the guild will dictate how");
stage = -43;
break;
case -43:
npc("long Kamfreena will allow in the enclosure on the very", "top floor. More tokens equals more time. There are", "also some bonuses available should you take part in all of", "the activites around the guild.");
stage = 44;
break;
case 43:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "will allow in the enclosure on the very top floor. More", "tokens equals more time. There are also some bonuses", "available should you take part in all of the activites", "around the guild.");
stage = 44;
break;
case 44:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Okay, okay. So, how do i earn these tokens?");
stage = 45;
break;
case 45:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "You can earn them by simply using the traning exercises", "around the guild. The staff will enter your token", "earning into a ledger as you play.");
stage = 46;
break;
case 46:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Sounds easy enough.");
stage = 120;
break;
case 47:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Should you part in all five activites around the guild", "you can choose to pay for your time on the top floor with", "tokens of all types. Should you do this then you'll find you", "spend less tokens overall and have a better chance of");
stage = 48;
break;
case 48:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "getting the dragon defender, amongst other things.");
stage = 49;
break;
case 49:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Excellent, sounds good. So, what's up on the top floor?");
stage = 50;
break;
case 50:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Well, wit giving too much away, they're big and mean,", "and you get to fight them for defenders. If you're really", "lucky, they'll summon a cyclossus...although that be", "unlucky. Still, if you manage to defeat him, you could win");
stage = 51;
break;
case 51:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "his hat.");
stage = 52;
break;
case 52:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Interesting...I will have to explore the top floor then!");
stage = 10;
break;
case 53:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Yes indeed. What would you like to know?");
stage = 10;
break;
case 120:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 4286 };
}
}
@@ -0,0 +1,539 @@
package content.region.asgarnia.burthorpe.dialogue
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
import org.rs09.consts.NPCs
/**
* Harrallak Menarous Dialogue
* Warrior's Guildmaster
* NOTE: org.rs09.consts.NPCs enums are wrong
* NPCs.RESOURCE_NPC_8267 is the correct Harrallak Menarous that animates properly
* NPCs.HARRALLAK_MENAROUS_8299 is the wrong Harrallak Menarous that is stuck in animation
* @author 'Vexia
* @author ovenbread
*/
@Initializable
class HarrallakMenarous(player: Player? = null) : DialoguePlugin(player) {
override fun open(vararg args: Any): Boolean {
npc = args[0] as NPC
npc.isWalks = true
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Welcome to my humble guild, " + player.username + "."
)
stage = 0
return true
}
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) {
0 -> {
interpreter.sendOptions(
"Select an Option",
"Quite a place you've got here.",
"You any good with a sword?",
"Bye!"
)
stage = 1
}
1 -> if (buttonId == 1) {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Quite a place you've got here. Tell me more about it."
)
stage = 53
} else if (buttonId == 2) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "You any good with a sword?")
stage = 5
} else if (buttonId == 3) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Bye!")
stage = 2
}
2 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Farewell, brave warrior, I do hope you enjoy my guild."
)
stage = 120
}
3 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "You any good with a sword?")
stage = 4
}
4 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Am I any good with a sword'? Have you any clue who I",
"am?"
)
stage = 5
}
5 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Not really, no.")
stage = 6
}
6 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Why, I could best any person alive in a rapier duel!"
)
stage = 7
}
7 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Try me, then!")
stage = 8
}
8 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"My dear man, I couldn't possibly duel you, I might hurt",
"you and then what would happen to my reputation!",
"Besides, I have this wonderful guild to run. Why don't",
" you take a look at the various activities we have."
)
stage = -8
}
-8 -> {
npc(
"You might even collect enough tokens to be allowed in",
"to kill the strange beasts from the east!"
)
stage = 10
}
10 -> {
interpreter.sendOptions(
"Select an Option",
"Tell me about the Strength training Area.",
"Tell me about the Attack training area.",
"Tell me about the Defence training area.",
"Tell me about the Combat training area.",
"Tell me about tokens."
)
stage = 11
}
11 -> if (buttonId == 1) {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Tell me about the Strength training area."
)
stage = 12
} else if (buttonId == 2) {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Tell me about the Attack training area."
)
stage = 29
} else if (buttonId == 3) {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Tell me about the Defence training area"
)
stage = 16
} else if (buttonId == 4) {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Tell me about the Combat training area"
)
stage = 35
} else if (buttonId == 5) {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Tell me about tokens.")
stage = 42
}
12 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Ahh, the mighty warrior, Sloane, guards the Strength",
"training area. This intriguing little area consits of two",
"shotput lanes for different weights of shot. It's fairly",
"simple, the referee or Sloane can explain more. There's"
)
stage = 13
}
13 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"also the store room next door where Jimmy might share",
"his talents with you, but don't tell him that I know",
"he's not on guard duty!"
)
stage = 14
}
14 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Oh? Why?")
stage = 15
}
15 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Well, he's doing no harm and let's face it, with all these",
"warriors around, the guild is hardly unguarded. You can",
"find the strength area just up the stairs behind the bank."
)
stage = 10
}
16 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"To polish your defensive skills to the very highest level,",
"we've employed a most intentive dwarf and a catapult."
)
stage = 17
}
17 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "You're going to throw dwarves at me?")
stage = 18
}
18 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Oh my, no! I think Gamfred would object to that most",
"strongly."
)
stage = 19
}
19 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"He's an inventor, you see, and has built a marvellous",
"contraptiont hat can throw all sorts of things at you.",
"Things such as magic missiles..."
)
stage = 20
}
20 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Mmmm?")
stage = 21
}
21 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...spiked iron balls...")
stage = 22
}
22 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Er...")
stage = 23
}
23 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...spinning, slashing bladed...")
stage = 24
}
24 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Ummm...")
stage = 25
}
25 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...and anvils.")
stage = 26
}
26 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "...and anvils.")
stage = 27
}
27 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "ANVILS?")
stage = 28
}
28 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"No need to be afraid, it's all under very controlled",
"conditions! You can find it just up the stairs and",
"behind the bank."
)
stage = 10
}
29 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Ahhh, dummies.")
stage = 30
}
30 -> {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"I'm no dummy, I just want to know what is there!"
)
stage = 31
}
31 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Oh no, my dear man, I did not mean you at all! The",
"training area has mechanical dummies that pop up out of",
"holes in the floor. The noble dward, Gamfred, invented the",
"mechanism and Ajjat can explain more about what to do"
)
stage = 32
}
32 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "there.")
stage = 33
}
33 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Oh, okay, I'll have to try it out.")
stage = 34
}
34 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"You can find it just down the corridor and on",
"your right."
)
stage = 10
}
35 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Ahh, yes, our redient magician from foreign lands",
"created a most amazing gadget that can turn your own",
"armour against you! It's really quite intriguing."
)
stage = 36
}
36 -> {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"That sounds dangerous. What if I'm wearing it at the",
"time?"
)
stage = 37
}
37 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"So far, that's not happend. You need to speak to",
"Shanomi about the specifics of the process, but as I",
"understand it, putting a suit of armour in one of these",
"devices will make it come to life somehow. The better the"
)
stage = 38
}
38 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "armour, the harder it is to defeat.")
stage = 39
}
39 -> {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Fighting my own armour sounds weird. I could be",
"killed by it..."
)
stage = 40
}
40 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Indeed, we have had a few fatalities from warriors",
"overstretching themselves and not knowing their limits.",
"Start small and work up, is my motto! That and go see",
"Lidio for some food if you need it."
)
stage = 41
}
41 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Okay, thanks for the warning.")
stage = 10
}
42 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Ahh, yes! The tokens allow you to spend an amount of",
"time with my 'discovery', located on the top floor of the",
"guild. Now, the amount of tokens you collect from the",
"five activities around the guild will dictate how"
)
stage = -43
}
-43 -> {
npc(
"long Kamfreena will allow in the enclosure on the very",
"top floor. More tokens equals more time. There are",
"also some bonuses available should you take part in all of",
"the activites around the guild."
)
stage = 44
}
43 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"will allow in the enclosure on the very top floor. More",
"tokens equals more time. There are also some bonuses",
"available should you take part in all of the activites",
"around the guild."
)
stage = 44
}
44 -> {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Okay, okay. So, how do i earn these tokens?"
)
stage = 45
}
45 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"You can earn them by simply using the traning exercises",
"around the guild. The staff will enter your token",
"earning into a ledger as you play."
)
stage = 46
}
46 -> {
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Sounds easy enough.")
stage = 120
}
47 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Should you part in all five activites around the guild",
"you can choose to pay for your time on the top floor with",
"tokens of all types. Should you do this then you'll find you",
"spend less tokens overall and have a better chance of"
)
stage = 48
}
48 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"getting the dragon defender, amongst other things."
)
stage = 49
}
49 -> {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Excellent, sounds good. So, what's up on the top floor?"
)
stage = 50
}
50 -> {
interpreter.sendDialogues(
npc,
FacialExpression.HALF_GUILTY,
"Well, wit giving too much away, they're big and mean,",
"and you get to fight them for defenders. If you're really",
"lucky, they'll summon a cyclossus...although that be",
"unlucky. Still, if you manage to defeat him, you could win"
)
stage = 51
}
51 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "his hat.")
stage = 52
}
52 -> {
interpreter.sendDialogues(
player,
FacialExpression.HALF_GUILTY,
"Interesting...I will have to explore the top floor then!"
)
stage = 10
}
53 -> {
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Yes indeed. What would you like to know?")
stage = 10
}
120 -> end()
}
return true
}
override fun newInstance(player: Player): DialoguePlugin {
return HarrallakMenarous(player)
}
override fun getIds(): IntArray {
// This has the wrong enum.
return intArrayOf(NPCs.RESOURCE_NPC_8267)
}
}
@@ -1,65 +0,0 @@
package content.region.asgarnia.burthorpe.dialogue;
import core.game.dialogue.DialoguePlugin;
import core.game.dialogue.FacialExpression;
import core.game.node.entity.npc.NPC;
import core.plugin.Initializable;
import core.game.node.entity.player.Player;
/**
* Represent the hild dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HildDialogue extends DialoguePlugin {
/**
* Constructs a new {@code HildDialogue} {@code Object}.
*/
public HildDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HildDialogue} {@code Object}.
* @param player the player.
*/
public HildDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HildDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hi!");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Hi!");
stage = 1;
break;
case 1:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1090 };
}
}
@@ -0,0 +1,47 @@
package content.region.asgarnia.burthorpe.dialogue
import core.api.isQuestComplete
import core.api.toIntArray
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
/**
* Hild Dialogue
* @author 'Vexia
* @author ovenbread
*/
@Initializable
class HildDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.HAPPY, "Thank you so much!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.HAPPY, "Surely we are safe now!").also { stage = END_DIALOGUE }
}
} else {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.FRIENDLY, "Hello stranger.").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.FRIENDLY, "Hi!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.FRIENDLY, "Welcome to Burthorpe!").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return CeolburgDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.HILD_1090)
}
}
@@ -21,29 +21,18 @@ class OcgaDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..5).toIntArray().random() }
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.WORRIED, "The White Knights are still going to take over.").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.PANICKED, "I hear the Imperial Guard are preparing an attack!").also { stage = END_DIALOGUE }
4 -> npcl(FacialExpression.HAPPY, "Thank you so much!").also { stage = END_DIALOGUE }
5 -> npcl(FacialExpression.HAPPY, "Surely we are safe now!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.HAPPY, "Thank you so much!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.HAPPY, "Surely we are safe now!").also { stage = END_DIALOGUE }
}
} else {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..12).toIntArray().random() }
1 -> npcl(FacialExpression.ANGRY, "Let me at 'em!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.ANGRY, "Trolls? Schmolls!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.PANICKED, "The trolls are coming!").also { stage = END_DIALOGUE }
4 -> npcl(FacialExpression.PANICKED, "The trolls took my baby son!").also { stage = END_DIALOGUE }
5 -> npcl(FacialExpression.PANICKED, "Trolls!").also { stage = END_DIALOGUE }
6 -> npcl(FacialExpression.FRIENDLY, "Hello stranger.").also { stage = END_DIALOGUE }
7 -> npcl(FacialExpression.ANGRY, "Go away!").also { stage = END_DIALOGUE }
8 -> npcl(FacialExpression.PANICKED, "Run!").also { stage = END_DIALOGUE }
9 -> npcl(FacialExpression.FRIENDLY, "Hi!").also { stage = END_DIALOGUE }
10 -> npcl(FacialExpression.SAD, "The Imperial Guard can no longer protect us!").also { stage = END_DIALOGUE }
11 -> npcl(FacialExpression.WORRIED, "The White Knights will soon have control!").also { stage = END_DIALOGUE }
12 -> npcl(FacialExpression.FRIENDLY, "Welcome to Burthorpe!").also { stage++ }
13 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.FRIENDLY, "Hello stranger.").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.FRIENDLY, "Hi!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.FRIENDLY, "Welcome to Burthorpe!").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
}
}
return true
@@ -20,18 +20,29 @@ class PendaDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
if(isQuestComplete(player!!, "Death Plateau")) {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..5).toIntArray().random() }
1 -> npcl(FacialExpression.HAPPY, "I heard about what you did, thank you!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.HAPPY, "Thank you so much!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.HAPPY, "Surely we are safe now!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.WORRIED, "The White Knights are still going to take over.").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.PANICKED, "I hear the Imperial Guard are preparing an attack!").also { stage = END_DIALOGUE }
4 -> npcl(FacialExpression.HAPPY, "Thank you so much!").also { stage = END_DIALOGUE }
5 -> npcl(FacialExpression.HAPPY, "Surely we are safe now!").also { stage = END_DIALOGUE }
}
} else {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..3).toIntArray().random() }
1 -> npcl(FacialExpression.FRIENDLY, "Hello stranger.").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.FRIENDLY, "Hi!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.FRIENDLY, "Welcome to Burthorpe!").also { stage++ }
4 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage = (1..12).toIntArray().random() }
1 -> npcl(FacialExpression.ANGRY, "Let me at 'em!").also { stage = END_DIALOGUE }
2 -> npcl(FacialExpression.ANGRY, "Trolls? Schmolls!").also { stage = END_DIALOGUE }
3 -> npcl(FacialExpression.PANICKED, "The trolls are coming!").also { stage = END_DIALOGUE }
4 -> npcl(FacialExpression.PANICKED, "The trolls took my baby son!").also { stage = END_DIALOGUE }
5 -> npcl(FacialExpression.PANICKED, "Trolls!").also { stage = END_DIALOGUE }
6 -> npcl(FacialExpression.FRIENDLY, "Hello stranger.").also { stage = END_DIALOGUE }
7 -> npcl(FacialExpression.ANGRY, "Go away!").also { stage = END_DIALOGUE }
8 -> npcl(FacialExpression.PANICKED, "Run!").also { stage = END_DIALOGUE }
9 -> npcl(FacialExpression.FRIENDLY, "Hi!").also { stage = END_DIALOGUE }
10 -> npcl(FacialExpression.SAD, "The Imperial Guard can no longer protect us!").also { stage = END_DIALOGUE }
11 -> npcl(FacialExpression.WORRIED, "The White Knights will soon have control!").also { stage = END_DIALOGUE }
12 -> npcl(FacialExpression.FRIENDLY, "Welcome to Burthorpe!").also { stage++ }
13 -> playerl(FacialExpression.FRIENDLY, "Thanks!").also { stage = END_DIALOGUE }
}
}
return true
@@ -0,0 +1,58 @@
package content.region.asgarnia.burthorpe.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class RachaelDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
when (stage) {
START_DIALOGUE -> npcl(FacialExpression.FRIENDLY, "Welcome to the Burthorpe Games Rooms!").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "How do I play board games?", 10),
Topic(FacialExpression.FRIENDLY, "What games can I play?", 30),
Topic(FacialExpression.FRIENDLY, "Can I buy a drink please?", 20),
Topic(FacialExpression.FRIENDLY, "Thanks!", END_DIALOGUE),
)
10 -> npcl(FacialExpression.FRIENDLY, "You can challenge someone to a game anywhere in the games rooms by using the right click option. Choose the type of game and then choose the options you want such as time per move. If you want to play a particular").also { stage++ }
11 -> npcl(FacialExpression.FRIENDLY, "game there are challenge rooms dedicated to that game. In the challenge rooms you can see other players ranks by right clicking them, their skill will be displayed instead of their combat level. Once you have enough").also { stage++ }
12 -> npcl(FacialExpression.FRIENDLY, "experience you will be able to use the challenge rooms on the first floor! If your opponent accepts the challenge you will be taken to one of the tables in the main room where you will play your game of choice.").also { stage++ }
13 -> npcl(FacialExpression.FRIENDLY, "Once you have finished your game you will go back to the challenge room where you can challenge again!").also { stage = 1 }
20 -> npcl(FacialExpression.FRIENDLY, "Certainly ${if (player.isMale) "sir" else "miss"}, our speciality is Asgarnian Ale, we also serve Wizard's Mind Bomb and Dwarven Stout.").also { stage++ }
21 -> openNpcShop(player, npc.id).also {
end()
stage = END_DIALOGUE
}
30 -> npcl(FacialExpression.FRIENDLY, "Currently we offer Draughts, Runelink, Runesquares, and Runeversi.").also { stage++ }
31 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Draughts?", 35),
Topic(FacialExpression.FRIENDLY, "Runelink?", 36),
Topic(FacialExpression.FRIENDLY, "Runesquares?", 37),
Topic(FacialExpression.FRIENDLY, "Runeversi?", 38),
)
35 -> npcl(FacialExpression.FRIENDLY, "Draughts uses standard rules, apart from: a draw is declared if no piece has been taken or promoted for forty moves. To play Draughts go to the challenge room in the SW corner.").also { stage = 1 }
36 -> npcl(FacialExpression.FRIENDLY, "Yup, you have to get four runes in row. The challenge room for Runelink is in the SE corner.").also { stage = 1 }
37 -> npcl(FacialExpression.FRIENDLY, "Yes, you take it in turns to add a line with the goal of making squares. Everytime you make a square you take another turn. The challenge room for Runesquares is in the SW corner.").also { stage = 1 }
38 -> npcl(FacialExpression.FRIENDLY, "Yep, the aim is to have more of your runes on the board than your opponent. You can take your opponents pieces by trapping them between your own. The challenge room for Runeversi is in the SE corner.").also { stage = 1 }
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return RachaelDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.RACHAEL_1358)
}
}
@@ -0,0 +1,57 @@
package content.region.asgarnia.burthorpe.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
@Initializable
class SamDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int) : Boolean {
when (stage) {
START_DIALOGUE -> npcl(FacialExpression.FRIENDLY, "Welcome to the Burthorpe Games Rooms!").also { stage++ }
1 -> showTopics(
Topic(FacialExpression.FRIENDLY, "How do I play board games?", 10),
Topic(FacialExpression.FRIENDLY, "What games can I play?", 30),
Topic(FacialExpression.FRIENDLY, "Can I buy a drink please?", 20),
Topic(FacialExpression.FRIENDLY, "Thanks!", END_DIALOGUE),
)
10 -> npcl(FacialExpression.FRIENDLY, "You can challenge someone to a game anywhere in the games rooms by using the right click option. Choose the type of game and then choose the options you want such as time per move. If you want to play a particular").also { stage++ }
11 -> npcl(FacialExpression.FRIENDLY, "game there are challenge rooms dedicated to that game. In the challenge rooms you can see other players ranks by right clicking them, their skill will be displayed instead of their combat level. Once you have enough").also { stage++ }
12 -> npcl(FacialExpression.FRIENDLY, "experience you will be able to use the challenge rooms on the first floor! If your opponent accepts the challenge you will be taken to one of the tables in the main room where you will play your game of choice.").also { stage++ }
13 -> npcl(FacialExpression.FRIENDLY, "Once you have finished your game you will go back to the challenge room where you can challenge again!").also { stage = 1 }
20 -> npcl(FacialExpression.FRIENDLY, "Certainly ${if (player.isMale) "sir" else "miss"}, our speciality is Asgarnian Ale, we also serve Wizard's Mind Bomb and Dwarven Stout.").also { stage++ }
21 -> openNpcShop(player, npc.id).also {
end()
stage = END_DIALOGUE
}
30 -> npcl(FacialExpression.FRIENDLY, "Currently we offer Draughts, Runelink, Runesquares, and Runeversi.").also { stage++ }
31 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Draughts?", 35),
Topic(FacialExpression.FRIENDLY, "Runelink?", 36),
Topic(FacialExpression.FRIENDLY, "Runesquares?", 37),
Topic(FacialExpression.FRIENDLY, "Runeversi?", 38),
)
35 -> npcl(FacialExpression.FRIENDLY, "Draughts uses standard rules, apart from: a draw is declared if no piece has been taken or promoted for forty moves. To play Draughts go to the challenge room in the SW corner.").also { stage = 1 }
36 -> npcl(FacialExpression.FRIENDLY, "Yup, you have to get four runes in row. The challenge room for Runelink is in the SE corner.").also { stage = 1 }
37 -> npcl(FacialExpression.FRIENDLY, "Yes, you take it in turns to add a line with the goal of making squares. Everytime you make a square you take another turn. The challenge room for Runesquares is in the SW corner.").also { stage = 1 }
38 -> npcl(FacialExpression.FRIENDLY, "Yep, the aim is to have more of your runes on the board than your opponent. You can take your opponents pieces by trapping them between your own. The challenge room for Runeversi is in the SE corner.").also { stage = 1 }
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return SamDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.SAM_1357)
}
}
@@ -0,0 +1,48 @@
package content.region.asgarnia.burthorpe.dialogue
import core.api.openNpcShop
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.dialogue.Topic
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
/**
* Handles the TostigDialogue dialogue.
* @author 'Vexia
*/
@Initializable
class TostigDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) {
0 -> playerl(FacialExpression.FRIENDLY, "Hi, what ales are you serving?").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Well ${if (player.isMale) "mister" else "miss"}, our speciality is Asgarnian Ale, we also serve Wizard's Mind Bomb and Dwarven Stout.").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "Would you like to buy a drink?").also { stage++ }
3 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Yes, please.", 10),
Topic(FacialExpression.FRIENDLY, "No, thanks.", 20),
)
10 -> openNpcShop(player, npc.id).also {
end()
stage = END_DIALOGUE
}
20 -> npcl(FacialExpression.FRIENDLY, "Ah well... so um... does the grey squirrel sing in the grove?").also { stage++ }
21 -> showTopics(
Topic(FacialExpression.FRIENDLY, "Huh?", 30),
Topic(FacialExpression.FRIENDLY, "Yes, and the black cat dances in the sink.", 40),
Topic(FacialExpression.FRIENDLY, "No, squirrels can't sing.", 50),
)
30 -> npcl(FacialExpression.FRIENDLY, "Er... nevermind.").also { stage = END_DIALOGUE }
40 -> npcl(FacialExpression.FRIENDLY, "Ah you'll be wanting the trapdoor behind the bar.").also { stage = END_DIALOGUE }
50 -> npcl(FacialExpression.FRIENDLY, "No... of course they can't...").also { stage = END_DIALOGUE }
}
return true
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.TOSTIG_1079)
}
}
@@ -0,0 +1,41 @@
package content.region.asgarnia.burthorpe.dialogue
import core.game.dialogue.DialoguePlugin
import core.game.dialogue.FacialExpression
import core.game.node.entity.player.Player
import core.plugin.Initializable
import core.tools.END_DIALOGUE
import core.tools.START_DIALOGUE
import org.rs09.consts.NPCs
/**
* Unferth Dialogue
* @author ovenbread
*/
@Initializable
class UnferthDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
// when (stage) {
// START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi Unferth. How are you doing?").also { stage++ }
// 1 -> npcl(FacialExpression.FRIENDLY, "It's just not the same without Bob around.").also { stage++ }
// 2 -> playerl(FacialExpression.FRIENDLY, "I'm so sorry Unferth.").also { stage++ }
// 3 -> npcl(FacialExpression.FRIENDLY, "Gertrude asked me if I'd like one of her new kittens. I don't think I'm ready for that yet.").also { stage++ }
// 4 -> playerl(FacialExpression.FRIENDLY, "Give it time. Things will get better, I promise.").also { stage++ }
// 5 -> npcl(FacialExpression.FRIENDLY, "Thanks ${player.name}.").also { stage = END_DIALOGUE }
// }
when (stage) {
START_DIALOGUE -> npcl(FacialExpression.GUILTY, "Hello.").also { stage++ }
1 -> playerl(FacialExpression.FRIENDLY, "What's wrong?").also { stage++ }
2 -> npcl(FacialExpression.GUILTY, "It's fine. Nothing for you to worry about.").also { stage = END_DIALOGUE }
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return UnferthDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.UNFERTH_2655)
}
}
@@ -14,7 +14,7 @@ import core.plugin.Initializable;
import core.plugin.Plugin;
/**
* Represents the optione plugin to handle interactions with 'nodes' in
* Represents the option plugin to handle interactions with 'nodes' in
* burthorpe.
* @author 'Vexia
* @version 1.0
@@ -41,7 +41,7 @@ public final class BurthorpeOptionPlugin extends OptionHandler {
// guide
// passegeway.
SceneryDefinition.forId(4624).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(4627).getHandlers().put("option:climb-down", this);
SceneryDefinition.forId(4627).getHandlers().put("option:climb-up", this);
return this;
}
@@ -52,14 +52,14 @@ public final class BurthorpeOptionPlugin extends OptionHandler {
case "climb-down":
switch (id) {
case 4624:
ClimbActionHandler.climb(player, Animation.create(828), Location.create(2205, 4934, 1));
ClimbActionHandler.climb(player, null, Location.create(2205, 4934, 1));
break;
}
break;
case "climb-up":
switch (id) {
case 4627:
ClimbActionHandler.climb(player, Animation.create(828), Location.create(2899, 3565, 0));
ClimbActionHandler.climb(player, null, Location.create(2899, 3565, 0));
break;
}
break;
@@ -1,37 +0,0 @@
package content.region.asgarnia.burthorpe.handlers;
import core.cache.def.impl.SceneryDefinition;
import core.game.global.action.ClimbActionHandler;
import core.game.interaction.OptionHandler;
import core.game.node.Node;
import core.game.node.entity.player.Player;
import core.game.node.scenery.Scenery;
import core.game.world.map.Location;
import core.plugin.Initializable;
import core.plugin.Plugin;
/**
* Handles the burthorpe plugin.
* @author Emperor
*/
@Initializable
public final class BurthorpePlugin extends OptionHandler {
@Override
public Plugin<Object> newInstance(Object arg) throws Throwable {
SceneryDefinition.forId(4627).getHandlers().put("option:climb-up", this);
return this;
}
@Override
public boolean handle(Player player, Node node, String option) {
Scenery object = (Scenery) node;
switch (object.getId()) {
case 4627:
ClimbActionHandler.climb(player, null, Location.create(2899, 3565, 0));
return true;
}
return false;
}
}
@@ -1,64 +0,0 @@
package content.region.asgarnia.taverley.dialogue;
import core.game.dialogue.DialoguePlugin;
import core.game.node.entity.npc.NPC;
import core.plugin.Initializable;
import core.game.node.entity.player.Player;
/**
* Represents the dialogue plugin used for the bernald npc.
* @author 'Vexia
* @version 1.1
*/
@Initializable
public final class BernaldDialogue extends DialoguePlugin {
/**
* Constructs a new {@code BernaldDialogue} {@code Object}.
*/
public BernaldDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code BernaldDialogue} {@code Object}.
* @param player the player.
*/
public BernaldDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new BernaldDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
player("How are your grapes coming along?");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
npc("Marvellous, thanks to your help, " + player.getUsername() + "!");
stage = 1;
break;
case 1:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 2580 };
}
}
@@ -1,92 +0,0 @@
package content.region.asgarnia.taverley.dialogue;
import core.game.dialogue.DialoguePlugin;
import core.game.dialogue.FacialExpression;
import core.game.node.entity.npc.NPC;
import core.plugin.Initializable;
import core.game.node.entity.player.Player;
/**
* Handles the TostigDialogue dialogue.
* @author 'Vexia
*/
@Initializable
public class TostigDialogue extends DialoguePlugin {
public TostigDialogue() {
}
public TostigDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new TostigDialogue(player);
}
@Override
public boolean open(Object... args) {
npc = (NPC) args[0];
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "Hi, what ales are you serving?");
stage = 0;
return true;
}
@Override
public boolean handle(int interfaceId, int buttonId) {
switch (stage) {
case 0:
interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Well sir, our speciality is Asgarnian Ale, we also serve", "Wizard's Mind Bomb and Dwarven Stout.");
stage = 1;
break;
case 1:
interpreter.sendDialogues(npc, FacialExpression.FRIENDLY, "Would you like to buy a drink?");
stage = 2;
break;
case 2:
interpreter.sendOptions("Select An Option", "Yes, please.", "No, thanks.");
stage = 3;
break;
case 3:
switch (buttonId) {
case 1:
interpreter.sendDialogues(player, FacialExpression.HAPPY, "Yes, please.");
stage = 100;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.NEUTRAL, "No, thanks.");
stage = 4;
break;
}
break;
case 4:
interpreter.sendDialogues(npc, FacialExpression.HALF_ASKING, "Ah well... so um... does the grey squirrel sing in the", "grove?");
stage = 5;
break;
case 5:
interpreter.sendDialogues(player, FacialExpression.HALF_ASKING, "Huh?");
stage = 6;
break;
case 6:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Er... nevermind.");
stage = 7;
break;
case 7:
end();
break;
case 100:
end();
npc.openShop(player);
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1079 };
}
}