Dialogues updated for non-quest NPCs in Burthorpe:

Breoca
Ceolburg
Hygd
Ocga
Penda
Wistan the shopkeeper
Servant
This commit is contained in:
Oven Bread 2023-06-16 11:35:21 +00:00 committed by Ryan
parent 2a3ac5ffab
commit 30c9a752bf
17 changed files with 378 additions and 489 deletions

View file

@ -16,7 +16,7 @@
}
],
"charm": [],
"ids": "1,2,3,16,24,170,351,359,663,726,727,728,729,730,1086,2675,3223,3224,3225,3915,5923",
"ids": "1,2,3,16,24,170,351,359,663,726,727,728,729,730,1084,1085,1086,1087,1088,1089,2675,3223,3224,3225,3915,5923",
"description": "",
"main": [
{

View file

@ -11097,18 +11097,36 @@
"attack_level": "1"
},
{
"examine": "A citizen of Burthorpe.",
"melee_animation": "422",
"magic_level": "1",
"respawn_delay": "60",
"defence_animation": "425",
"death_animation": "836",
"name": "Ocga",
"defence_level": "1",
"name": "Breoca",
"defence_level": "3",
"safespot": null,
"lifepoints": "10",
"strength_level": "3",
"id": "1084",
"range_level": "1",
"attack_level": "3"
},
{
"examine": "A citizen of Burthorpe.",
"melee_animation": "422",
"strength_level": "1",
"magic_level": "1",
"respawn_delay": "60",
"defence_animation": "425",
"death_animation": "836",
"name": "Ocga",
"defence_level": "3",
"safespot": null,
"lifepoints": "10",
"strength_level": "3",
"id": "1085",
"range_level": "1",
"respawn_delay": "60",
"attack_level": "1",
"defence_animation": "425"
"attack_level": "3"
},
{
"name": "Man",
@ -11123,46 +11141,52 @@
"attack_level": "1"
},
{
"examine": "A citizen of Burthorpe.",
"melee_animation": "422",
"magic_level": "1",
"respawn_delay": "60",
"defence_animation": "425",
"death_animation": "836",
"name": "Penda",
"defence_level": "1",
"defence_level": "3",
"safespot": null,
"lifepoints": "10",
"melee_animation": "422",
"strength_level": "1",
"strength_level": "3",
"id": "1087",
"range_level": "1",
"respawn_delay": "60",
"attack_level": "1",
"defence_animation": "425"
"attack_level": "3"
},
{
"examine": "A citizen of Burthorpe.",
"melee_animation": "422",
"magic_level": "1",
"respawn_delay": "60",
"defence_animation": "425",
"death_animation": "836",
"name": "Hygd",
"defence_level": "1",
"defence_level": "3",
"safespot": null,
"lifepoints": "10",
"melee_animation": "422",
"strength_level": "1",
"strength_level": "2",
"id": "1088",
"range_level": "1",
"respawn_delay": "60",
"attack_level": "1",
"defence_animation": "425"
"attack_level": "3"
},
{
"examine": "A citizen of Burthorpe.",
"melee_animation": "422",
"magic_level": "1",
"respawn_delay": "60",
"defence_animation": "425",
"death_animation": "836",
"name": "Ceolburg",
"defence_level": "1",
"defence_level": "3",
"safespot": null,
"lifepoints": "10",
"melee_animation": "422",
"strength_level": "1",
"strength_level": "2",
"id": "1089",
"range_level": "1",
"respawn_delay": "60",
"attack_level": "1",
"defence_animation": "425"
"attack_level": "3"
},
{
"examine": "The knight seems to be watching something.",

View file

@ -2685,7 +2685,7 @@
},
{
"npc_id": "1084",
"loc_data": "{2915,3549,0,0,0}"
"loc_data": "{2915,3549,0,1,0}"
},
{
"npc_id": "1085",
@ -2697,15 +2697,15 @@
},
{
"npc_id": "1087",
"loc_data": "{2911,3540,0,0,7}"
"loc_data": "{2911,3540,0,1,7}"
},
{
"npc_id": "1088",
"loc_data": "{2918,3545,0,0,0}"
"loc_data": "{2918,3545,0,1,0}"
},
{
"npc_id": "1089",
"loc_data": "{2919,3529,0,0,0}"
"loc_data": "{2919,3529,0,1,0}"
},
{
"npc_id": "1090",

View file

@ -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;
/**
* Represents the breoca dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class BreocaDialogue extends DialoguePlugin {
/**
* Constructs a new {@code BreocaDialogue} {@code Object}.
*/
public BreocaDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code BreocaDialogue} {@code Object}.
* @param player the player.
*/
public BreocaDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new BreocaDialogue(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, "Hello stranger.");
stage = 1;
break;
case 1:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1084 };
}
}

View file

@ -0,0 +1,48 @@
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
/**
* Breoca Dialogue
* @author 'Vexia
* @author ovenbread
*/
@Initializable
class BreocaDialogue(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 BreocaDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.BREOCA_1084)
}
}

View file

@ -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;
/**
* Rerpesents the dialogue plugin used for the celburg npc.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class CeolburgDialogue extends DialoguePlugin {
/**
* Constructs a new {@code CeolburgDialogue} {@code Object}.
*/
public CeolburgDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code CeolburgDialogue} {@code Object}.
* @param player the player.
*/
public CeolburgDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new CeolburgDialogue(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, "Trolls!");
stage = 1;
break;
case 1:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1089 };
}
}

View file

@ -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
/**
* Ceolburg Dialogue
* @author 'Vexia
* @author ovenbread
*/
@Initializable
class CeolburgDialogue(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.CEOLBURG_1089)
}
}

View file

@ -1,89 +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 histan dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HistanDialogue extends DialoguePlugin {
/**
* Constructs a new {@code HistanDialogue} {@code Object}.
*/
public HistanDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HistanDialogue} {@code Object}.
* @param player the player.
*/
public HistanDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HistanDialogue(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, "Welcome to Burthorpe Supplies. Your last shop before", "heading north into the mountains!");
stage = 1;
break;
case 1:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Would you like to buy something?");
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.HALF_GUILTY, "Yes, please.");
stage = 10;
break;
case 2:
interpreter.sendDialogues(player, FacialExpression.HALF_GUILTY, "No, thanks.");
stage = 20;
break;
}
break;
case 10:
end();
npc.openShop(player);
break;
case 20:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1083 };
}
}

View file

@ -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;
/**
* Represents the hygd dialogue plugin.
* @author 'Vexia
* @version 1.0
*/
@Initializable
public final class HygdDialogue extends DialoguePlugin {
/**
* Constructs a new {@code HygdDialogue} {@code Object}.
*/
public HygdDialogue() {
/**
* empty.
*/
}
/**
* Constructs a new {@code HygdDialogue} {@code Object}.
* @param player the player.
*/
public HygdDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new HygdDialogue(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[] { 1088 };
}
}

View file

@ -0,0 +1,48 @@
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
/**
* Hygd Dialogue
* @author 'Vexia
* @author ovenbread
*/
@Initializable
class HygdDialogue(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 HygdDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.HYGD_1088)
}
}

View file

@ -1,56 +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;
/**
* Handles the OcaDialogue dialogue.
* @author 'Vexia
*/
@Initializable
public class OcaDialogue extends DialoguePlugin {
public OcaDialogue() {
}
public OcaDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new OcaDialogue(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, "Hello stranger.");
stage = 1;
break;
case 1:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1085 };
}
}

View file

@ -0,0 +1,59 @@
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
/**
* Ocga Dialogue
* @author 'Vexia
* @author ovenbread
*/
@Initializable
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() }
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 }
}
} 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 }
}
}
return true
}
override fun newInstance(player: Player?): DialoguePlugin {
return OcgaDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.OCGA_1085)
}
}

View file

@ -1,56 +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;
/**
* Handles the PendaDialogue dialogue.
* @author 'Vexia
*/
@Initializable
public class PendaDialogue extends DialoguePlugin {
public PendaDialogue() {
}
public PendaDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new PendaDialogue(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, "The trolls are coming!");
stage = 2;
break;
case 2:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1087 };
}
}

View file

@ -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
/**
* Penda Dialogue
* @author 'Vexia
* @author ovenbread
*/
@Initializable
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() }
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 PendaDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.PENDA_1087)
}
}

View file

@ -1,64 +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;
/**
* Handles the ServantDialogue dialogue.
* @author 'Vexia
*/
@Initializable
public class ServantDialogue extends DialoguePlugin {
public ServantDialogue() {
}
public ServantDialogue(Player player) {
super(player);
}
@Override
public DialoguePlugin newInstance(Player player) {
return new ServantDialogue(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:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "Look, I'd better not talk. I'll get in trouble.");
stage = 2;
break;
case 2:
interpreter.sendDialogues(npc, FacialExpression.HALF_GUILTY, "If you want someone to show you round the castle ask", "Eohric, the Head Servant.");
stage = 3;
break;
case 3:
end();
break;
}
return true;
}
@Override
public int[] getIds() {
return new int[] { 1081 };
}
}

View file

@ -0,0 +1,35 @@
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
/**
* Servant Dialogue
* @author 'Vexia
* @author ovenbread
*/
@Initializable
class ServantDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
1 -> npcl(FacialExpression.HALF_GUILTY, "Hi").also { stage++ }
2 -> npcl(FacialExpression.HALF_GUILTY, "Look, I'd better not talk. I'll get in trouble.").also { stage++ }
3 -> npcl(FacialExpression.HALF_GUILTY, "If you want someone to show you round the castle ask Eohric, the Head Servant.").also { stage = END_DIALOGUE }
}
return true
}
override fun newInstance(player: Player): DialoguePlugin {
return ServantDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.SERVANT_1081)
}
}

View file

@ -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
/**
* Represents the Wistan dialogue plugin.
* @author 'Vexia
* @author ovenbread
*/
@Initializable
class WistanDialogue(player: Player? = null) : DialoguePlugin(player) {
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
when (stage) {
START_DIALOGUE -> playerl(FacialExpression.FRIENDLY, "Hi!").also { stage++ }
1 -> npcl(FacialExpression.FRIENDLY, "Welcome to Burthorpe Supplies. Your last shop before heading north into the mountains!").also { stage++ }
2 -> npcl(FacialExpression.FRIENDLY, "Would you like to buy something?").also { stage++ }
3 -> options("Yes, please.", "No, thanks.").also { stage++ }
4 -> when (buttonId) {
1 -> playerl(FacialExpression.FRIENDLY, "Yes, please.").also { stage = 5 }
2 -> playerl(FacialExpression.FRIENDLY, "No, thanks.").also { stage = END_DIALOGUE }
}
5 -> npc.openShop(player).also { stage = END_DIALOGUE }
}
return true
}
override fun newInstance(player: Player): DialoguePlugin {
return WistanDialogue(player)
}
override fun getIds(): IntArray {
return intArrayOf(NPCs.WISTAN_1083)
}
}