Code cleanup
Reorganised imports Removed redundant qualifiers
This commit is contained in:
@@ -7,9 +7,9 @@ import core.plugin.Initializable
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
@Initializable
|
||||
class GPDTEmployeeDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
||||
class GPDTEmployeeDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
npcl(core.game.dialogue.FacialExpression.HAPPY,"Welcome to G.P.D.T.!")
|
||||
npcl(FacialExpression.HAPPY,"Welcome to G.P.D.T.!")
|
||||
stage = if(player.questRepository.getStage("Tribal Totem") == 20){
|
||||
5
|
||||
}else 0
|
||||
@@ -18,10 +18,10 @@ class GPDTEmployeeDialogue(player: Player? = null) : core.game.dialogue.Dialogue
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when(stage){
|
||||
0 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Thank you very much.").also { stage = 1000 }
|
||||
0 -> playerl(FacialExpression.HAPPY,"Thank you very much.").also { stage = 1000 }
|
||||
|
||||
5 -> playerl(core.game.dialogue.FacialExpression.ASKING,"So, when are you going to deliver this crate?").also { stage++ }
|
||||
6 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Well... I guess we could do it now...").also {
|
||||
5 -> playerl(FacialExpression.ASKING,"So, when are you going to deliver this crate?").also { stage++ }
|
||||
6 -> npcl(FacialExpression.THINKING,"Well... I guess we could do it now...").also {
|
||||
player.questRepository.getQuest("Tribal Totem").setStage(player,25)
|
||||
stage = 1000
|
||||
}
|
||||
@@ -31,7 +31,7 @@ class GPDTEmployeeDialogue(player: Player? = null) : core.game.dialogue.Dialogue
|
||||
return true
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return GPDTEmployeeDialogue(player)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@ import core.game.node.entity.player.Player
|
||||
import core.plugin.Initializable
|
||||
|
||||
@Initializable
|
||||
class HoracioDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
||||
class HoracioDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
if(player.questRepository.hasStarted("Tribal Totem")){
|
||||
npcl(core.game.dialogue.FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ")
|
||||
npcl(FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ")
|
||||
stage = 5
|
||||
}
|
||||
else{
|
||||
npcl(core.game.dialogue.FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ")
|
||||
npcl(FacialExpression.HAPPY,"It's a fine day to be out in a garden, isn't it? ")
|
||||
stage = 0
|
||||
}
|
||||
return true
|
||||
@@ -22,33 +22,33 @@ class HoracioDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugi
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int): Boolean {
|
||||
when(stage){
|
||||
0 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Yes it's very nice.").also { stage++ }
|
||||
1 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Days like these make me glad to be alive!").also { stage = 1000 }
|
||||
0 -> playerl(FacialExpression.HAPPY,"Yes it's very nice.").also { stage++ }
|
||||
1 -> npcl(FacialExpression.HAPPY,"Days like these make me glad to be alive!").also { stage = 1000 }
|
||||
|
||||
5 -> playerl(core.game.dialogue.FacialExpression.ASKING,"So... who are you?").also { stage++ }
|
||||
6 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"My name is Horacio Dobson. I'm a gardener to Lord Handlemort.").also { stage++ }
|
||||
7 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Take a look around this beautiful garden, all of this is my handiwork.").also { stage++ }
|
||||
5 -> playerl(FacialExpression.ASKING,"So... who are you?").also { stage++ }
|
||||
6 -> npcl(FacialExpression.HAPPY,"My name is Horacio Dobson. I'm a gardener to Lord Handlemort.").also { stage++ }
|
||||
7 -> npcl(FacialExpression.HAPPY,"Take a look around this beautiful garden, all of this is my handiwork.").also { stage++ }
|
||||
8 -> options("So... do you garden round the back too?","Do you need any help?").also { stage++ }
|
||||
9 -> when(buttonId){
|
||||
1 -> playerl(core.game.dialogue.FacialExpression.THINKING,"So... do you garden round the back, too?").also { stage = 10 }
|
||||
2 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Do you need any help?").also { stage = 20 }
|
||||
1 -> playerl(FacialExpression.THINKING,"So... do you garden round the back, too?").also { stage = 10 }
|
||||
2 -> playerl(FacialExpression.ASKING,"Do you need any help?").also { stage = 20 }
|
||||
}
|
||||
|
||||
10 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"That I do!").also { stage++ }
|
||||
11 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Doesn't all of the security around the house get in your way then?").also { stage++ }
|
||||
12 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Ah. I'm used to all that. I have my keys, the guard dogs know me, and I know the combination to the door lock.").also { stage++ }
|
||||
13 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"It's rather easy, it's his middle name.").also { stage++ }
|
||||
14 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Whose middle name?").also { stage++ }
|
||||
15 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Hum. I probably shouldn't have said that. Forget I mentioned it.").also { stage = 1000 }
|
||||
10 -> npcl(FacialExpression.HAPPY,"That I do!").also { stage++ }
|
||||
11 -> playerl(FacialExpression.ASKING,"Doesn't all of the security around the house get in your way then?").also { stage++ }
|
||||
12 -> npcl(FacialExpression.HAPPY,"Ah. I'm used to all that. I have my keys, the guard dogs know me, and I know the combination to the door lock.").also { stage++ }
|
||||
13 -> npcl(FacialExpression.HAPPY,"It's rather easy, it's his middle name.").also { stage++ }
|
||||
14 -> playerl(FacialExpression.ASKING,"Whose middle name?").also { stage++ }
|
||||
15 -> npcl(FacialExpression.ANNOYED,"Hum. I probably shouldn't have said that. Forget I mentioned it.").also { stage = 1000 }
|
||||
|
||||
20 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"Trying to muscle in on my job, eh? I'm more than happy to do this all by myself!").also { stage = 1000 }
|
||||
20 -> npcl(FacialExpression.ANNOYED,"Trying to muscle in on my job, eh? I'm more than happy to do this all by myself!").also { stage = 1000 }
|
||||
|
||||
1000 -> end()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return HoracioDialogue(player)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,22 +9,22 @@ import core.plugin.Initializable
|
||||
import org.rs09.consts.Items
|
||||
|
||||
@Initializable
|
||||
class KangaiMauDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
|
||||
class KangaiMauDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||
|
||||
override fun open(vararg args: Any?): Boolean {
|
||||
if(!player.questRepository.hasStarted("Tribal Totem")){
|
||||
npcl(core.game.dialogue.FacialExpression.HAPPY,"Hello. I'm Kangai Mau of the Rantuki Tribe.")
|
||||
npcl(FacialExpression.HAPPY,"Hello. I'm Kangai Mau of the Rantuki Tribe.")
|
||||
stage = 0
|
||||
} else if(isQuestComplete(player, "Tribal Totem")) {
|
||||
npcl(core.game.dialogue.FacialExpression.HAPPY, "Many greetings esteemed thief.")
|
||||
npcl(FacialExpression.HAPPY, "Many greetings esteemed thief.")
|
||||
stage = 40
|
||||
}
|
||||
else if(player.inventory.containsAtLeastOneItem(Items.TOTEM_1857)){
|
||||
npcl(core.game.dialogue.FacialExpression.ASKING,"Have you got our totem back?")
|
||||
npcl(FacialExpression.ASKING,"Have you got our totem back?")
|
||||
stage = 35
|
||||
}
|
||||
else if(player.questRepository.hasStarted("Tribal Totem")){
|
||||
npcl(core.game.dialogue.FacialExpression.ASKING,"Have you got our totem back?")
|
||||
npcl(FacialExpression.ASKING,"Have you got our totem back?")
|
||||
stage = 30
|
||||
}
|
||||
return true
|
||||
@@ -34,37 +34,37 @@ class KangaiMauDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu
|
||||
when(stage){
|
||||
0 -> options("And what are you doing here in Brimhaven?","I'm in search of adventure!","Who are the Rantuki tribe?").also { stage++ }
|
||||
1 -> when(buttonId){
|
||||
1 -> playerl(core.game.dialogue.FacialExpression.ASKING,"And what are you doing here in Brimhaven?").also { stage = 5 }
|
||||
2 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"I'm in search of adventure!").also { stage = 15 }
|
||||
3 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Who are the Rantuki Tribe?").also { stage = 10 }
|
||||
1 -> playerl(FacialExpression.ASKING,"And what are you doing here in Brimhaven?").also { stage = 5 }
|
||||
2 -> playerl(FacialExpression.HAPPY,"I'm in search of adventure!").also { stage = 15 }
|
||||
3 -> playerl(FacialExpression.ASKING,"Who are the Rantuki Tribe?").also { stage = 10 }
|
||||
}
|
||||
|
||||
5 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I'm looking for someone brave to go on important mission. Someone skilled in thievery and sneaking about.").also { stage++ }
|
||||
6 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"I am told I can find such people in Brimhaven.").also { stage++ }
|
||||
7 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Yep. I have heard there are many of that type here.").also { stage++ }
|
||||
8 -> npcl(core.game.dialogue.FacialExpression.THINKING,"Let's hope I find them.").also { stage = 1000 }
|
||||
5 -> npcl(FacialExpression.HAPPY,"I'm looking for someone brave to go on important mission. Someone skilled in thievery and sneaking about.").also { stage++ }
|
||||
6 -> npcl(FacialExpression.HAPPY,"I am told I can find such people in Brimhaven.").also { stage++ }
|
||||
7 -> playerl(FacialExpression.HAPPY,"Yep. I have heard there are many of that type here.").also { stage++ }
|
||||
8 -> npcl(FacialExpression.THINKING,"Let's hope I find them.").also { stage = 1000 }
|
||||
|
||||
10 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"A proud and noble tribe of Karamja.").also { stage++ }
|
||||
11 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"But now we are few, as men come from across, steal our land, and settle on our hunting grounds").also { stage = 1000 }
|
||||
10 -> npcl(FacialExpression.HAPPY,"A proud and noble tribe of Karamja.").also { stage++ }
|
||||
11 -> npcl(FacialExpression.ANGRY,"But now we are few, as men come from across, steal our land, and settle on our hunting grounds").also { stage = 1000 }
|
||||
|
||||
15 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Adventure is something I may be able to give. I need someone to go on a mission to the city of Ardougne.").also { stage++ }
|
||||
16 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"There you will find the house of Lord Handlemort. In his house he has our tribal totem. We need it back.").also { stage++ }
|
||||
17 -> playerl(core.game.dialogue.FacialExpression.ASKING,"Why does he have it?").also { stage++ }
|
||||
18 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"Lord Handlemort is an Ardougnese explorer which means he think he have the right to come to my tribal home,").also { stage++ }
|
||||
19 -> npcl(core.game.dialogue.FacialExpression.ANGRY,"steal our stuff and put in his private museum.").also { stage++ }
|
||||
20 -> playerl(core.game.dialogue.FacialExpression.THINKING,"How can I find Handlemoret's house? Ardougne IS a big place...").also { stage++ }
|
||||
21 -> npcl(core.game.dialogue.FacialExpression.ANNOYED,"I don't know Ardougne. You tell me.").also { stage++ }
|
||||
22 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Ok, I will get it back.").also {
|
||||
15 -> npcl(FacialExpression.HAPPY,"Adventure is something I may be able to give. I need someone to go on a mission to the city of Ardougne.").also { stage++ }
|
||||
16 -> npcl(FacialExpression.HAPPY,"There you will find the house of Lord Handlemort. In his house he has our tribal totem. We need it back.").also { stage++ }
|
||||
17 -> playerl(FacialExpression.ASKING,"Why does he have it?").also { stage++ }
|
||||
18 -> npcl(FacialExpression.ANGRY,"Lord Handlemort is an Ardougnese explorer which means he think he have the right to come to my tribal home,").also { stage++ }
|
||||
19 -> npcl(FacialExpression.ANGRY,"steal our stuff and put in his private museum.").also { stage++ }
|
||||
20 -> playerl(FacialExpression.THINKING,"How can I find Handlemoret's house? Ardougne IS a big place...").also { stage++ }
|
||||
21 -> npcl(FacialExpression.ANNOYED,"I don't know Ardougne. You tell me.").also { stage++ }
|
||||
22 -> playerl(FacialExpression.HAPPY,"Ok, I will get it back.").also {
|
||||
player.questRepository.getQuest("Tribal Totem").start(player)
|
||||
player.questRepository.getQuest("Tribal Totem").setStage(player, 10)
|
||||
stage++
|
||||
}
|
||||
23 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"Best of luck with that adventurer").also { stage = 1000 }
|
||||
23 -> npcl(FacialExpression.HAPPY,"Best of luck with that adventurer").also { stage = 1000 }
|
||||
|
||||
30 -> playerl(core.game.dialogue.FacialExpression.SAD,"Not yet, sorry.").also { stage = 1000 }
|
||||
30 -> playerl(FacialExpression.SAD,"Not yet, sorry.").also { stage = 1000 }
|
||||
|
||||
35 -> playerl(core.game.dialogue.FacialExpression.HAPPY,"Yes I have.").also { stage++ }
|
||||
36 -> npcl(core.game.dialogue.FacialExpression.HAPPY,"You have??? Many thanks brave adventurer! Here, have some freshly cooked Karamjan fish, caught specially by my tribe.").also { stage++ }
|
||||
35 -> playerl(FacialExpression.HAPPY,"Yes I have.").also { stage++ }
|
||||
36 -> npcl(FacialExpression.HAPPY,"You have??? Many thanks brave adventurer! Here, have some freshly cooked Karamjan fish, caught specially by my tribe.").also { stage++ }
|
||||
37 -> sendDialogue("You hand over the totem").also {
|
||||
if(!isQuestComplete(player, "Tribal Totem") && removeItem(player, Items.TOTEM_1857)) {
|
||||
player.questRepository.getQuest("Tribal Totem").finish(player)
|
||||
@@ -74,14 +74,14 @@ class KangaiMauDialogue(player: Player? = null) : core.game.dialogue.DialoguePlu
|
||||
}
|
||||
}
|
||||
|
||||
40 -> player(core.game.dialogue.FacialExpression.NEUTRAL, "Hey.").also { stage = 1000 }
|
||||
40 -> player(FacialExpression.NEUTRAL, "Hey.").also { stage = 1000 }
|
||||
|
||||
1000 -> end()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
|
||||
override fun newInstance(player: Player?): DialoguePlugin {
|
||||
return KangaiMauDialogue(player)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user