diff --git a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PeerTheSeerDialogue.kt b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PeerTheSeerDialogue.kt index c30737ab4..d382c388b 100644 --- a/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PeerTheSeerDialogue.kt +++ b/Server/src/main/content/region/fremennik/rellekka/quest/thefremenniktrials/PeerTheSeerDialogue.kt @@ -31,62 +31,68 @@ class PeerTheSeerDialogue(player: Player? = null) : DialoguePlugin(player) { var prediction = RandomFunction.getRandom(5) override fun open(vararg args: Any?): Boolean { - if(player.inventory.contains(3710,1)){ - playerl(FacialExpression.HAPPY,"Can I have a weather forecast now please?") + //This should probably be a switch + if (player.inventory.contains(3710, 1)) { + playerl(FacialExpression.HAPPY, "Can I have a weather forecast now please?") stage = 15 return true } - else if(player.inventory.contains(3705,1)){ - playerl(FacialExpression.ASKING,"So, about this forecast...") + else if (player.inventory.contains(3705, 1)) { + playerl( + FacialExpression.ASKING, + "So, about this forecast...") stage = 20 return true } - else if(player.getAttribute("sigmundreturning",false) == true){ - playerl(FacialExpression.ASKING,"I've got an item to trade but I don't know if it's for you.") + else if (player.getAttribute("sigmundreturning", false) == true) { + playerl( + FacialExpression.ASKING, + "I've got an item to trade but I don't know if it's for you.") stage = 26 return true } - else if(player.getAttribute("sigmund-steps", 0) == 10){ - playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a brave and powerful warrior to act as a bodyguard?") + else if (player.getAttribute("sigmund-steps", 0) == 10) { + playerl( + FacialExpression.ASKING, + "I don't suppose you have any idea where I could find a brave and powerful warrior to act as a bodyguard?" + ) stage = 8 return true } - else if(player.getAttribute("sigmund-steps", 0) == 9){ - playerl(FacialExpression.ASKING,"I don't suppose you have any idea where I could find a weather forecast from the Fremennik Seer do you?") + else if (player.getAttribute("sigmund-steps", 0) == 9) { + playerl( + FacialExpression.ASKING, + "I don't suppose you have any idea where I could find a weather forecast from the Fremennik Seer do you?") stage = 1 return true } - else if(player.getAttribute("PeerStarted",false) && !(player.inventory.isEmpty && player.equipment.isEmpty)){ - npcl(FacialExpression.SAD,"Uuuh... What was that dark presence I felt?") + else if (player.getAttribute("PeerStarted", false) && !(player.inventory.isEmpty && player.equipment.isEmpty)) { stage = 100 return true } - else if(player.getAttribute("PeerStarted",false) && player.inventory.isEmpty && player.equipment.isEmpty){ - npcl(FacialExpression.SAD,"Uuuh... What was that dark presence I felt?") + else if (player.getAttribute("PeerStarted", false) && player.inventory.isEmpty && player.equipment.isEmpty) { stage = 110 return true } - else if (getQuestStage(player, Quests.THE_FREMENNIK_TRIALS) > 0 && player.getAttribute("fremtrials:peer-vote",false)) { - npcl(FacialExpression.SAD,"Uuuh... What was that dark presence I felt?") + else if (getQuestStage(player, Quests.THE_FREMENNIK_TRIALS) > 0 && player.getAttribute("fremtrials:peer-vote", false)) { stage = 120 return true } - else if(player.questRepository.isComplete(Quests.THE_FREMENNIK_TRIALS)){ - npcl(FacialExpression.SAD,"Uuuh... What was that dark presence I felt?") + else if (player.questRepository.isComplete(Quests.THE_FREMENNIK_TRIALS)) { stage = 150 return true } - else if(getQuestStage(player, Quests.THE_FREMENNIK_TRIALS) > 0){ - npcl(FacialExpression.SAD,"Uuuh... What was that dark presence I felt?") + else if (getQuestStage(player, Quests.THE_FREMENNIK_TRIALS) > 0) { stage = 50 return true } - if (getQuestStage(player, Quests.THE_FREMENNIK_TRIALS) == 0) { - npc(FacialExpression.SAD,"Uuuh... What was that dark presence I felt?").also { stage = 300 } + else { + npc(FacialExpression.NEUTRAL, "I have no interest in talking to you just now outerlander.").also { + stage = END_DIALOGUE + } } return true } - override fun handle(interfaceId: Int, buttonId: Int): Boolean { when(stage){ 1 -> npcl(FacialExpression.ANNOYED,"Er.... Yes, because I AM the Fremennik Seer.").also { stage++ } @@ -120,24 +126,23 @@ class PeerTheSeerDialogue(player: Player? = null) : DialoguePlugin(player) { 26 -> npcl(FacialExpression.ANNOYED,"Not me, I'm afraid.").also { stage++ } //The Seer's Trial - 50 -> npcl(FacialExpression.AMAZED,"!").also { stage++ } - 51 -> npcl(FacialExpression.HAPPY,"Ahem, sorry about that. Hello outerlander. What do you want?").also { stage++ } - 52 -> playerl(FacialExpression.ASKING,"Hello. I'm looking for members of the council of elders to vote for me to become a Fremennik.").also { stage++ } - 53 -> npcl(FacialExpression.THINKING,"Are you now? Well that is interesting. Usually outerlanders do not concern themselves with our ways like that.").also { stage++ } - 54 -> npcl(FacialExpression.HAPPY,"I am one of the members of the council of elders, and should you be able to prove to me that you have something to offer my clan I will vote in your favour at the next meeting.").also { stage++ } - 55 -> playerl(FacialExpression.ASKING,"How can I prove that to you?").also { stage++ } - 56 -> npcl(FacialExpression.HAPPY,"Well, I have but a simple test. This building behind me is my house. Inside I have constructed a puzzle.").also { stage++ } - 57 -> npcl(FacialExpression.HAPPY,"As a Seer to the clan, I value intelligence very highly, so you may think of it as an intelligence test of sorts.").also { stage++ } - 58 -> playerl(FacialExpression.THINKING,"An intelligence test? I thought barbarians were stupid!").also { stage++ } - 59 -> npcl(FacialExpression.ANNOYED,"That is the opinion that outerlanders usually hold of my people, it is true. But that is because people often confuse knowledge with wisdom.").also { stage++ } - 60 -> npcl(FacialExpression.ANNOYED,"My puzzle tests not what you know, but what you can work out. All members of our clan have been tested when they took their trials.").also { stage++ } - 61 -> playerl(FacialExpression.ASKING,"So what exactly does this puzzle consist of, then?").also { stage++ } - 62 -> npcl(FacialExpression.HAPPY,"Well, firstly you must enter my house with no items, weapons or armour. Then it is a simple matter of entering through one door and leaving by the other.").also { stage++ } - 63 -> playerl(FacialExpression.ASKING,"I can't take anything in there with me?").also { stage++ } - 64 -> npcl(FacialExpression.HAPPY,"That is correct outerlander. Everything you need to complete the puzzle you will find inside the building. Nothing more.").also { stage++ } - 65 -> npcl(FacialExpression.HAPPY,"So what say you outerlander? You think you have the wit to earn yourself my vote?").also { stage++ } - 66 -> options("Yes","No").also { stage++ } - 67 -> when(buttonId){ + 50 -> npcl(FacialExpression.HAPPY,"Hello outerlander. What do you want?").also { stage++ } + 51 -> playerl(FacialExpression.ASKING,"Hello. I'm looking for members of the council of elders to vote for me to become a Fremennik.").also { stage++ } + 52 -> npcl(FacialExpression.THINKING,"Are you now? Well that is interesting. Usually outerlanders do not concern themselves with our ways like that.").also { stage++ } + 53 -> npcl(FacialExpression.HAPPY,"I am one of the members of the council of elders, and should you be able to prove to me that you have something to offer my clan I will vote in your favour at the next meeting.").also { stage++ } + 54 -> playerl(FacialExpression.ASKING,"How can I prove that to you?").also { stage++ } + 55 -> npcl(FacialExpression.HAPPY,"Well, I have but a simple test. This building behind me is my house. Inside I have constructed a puzzle.").also { stage++ } + 56 -> npcl(FacialExpression.HAPPY,"As a Seer to the clan, I value intelligence very highly, so you may think of it as an intelligence test of sorts.").also { stage++ } + 57 -> playerl(FacialExpression.THINKING,"An intelligence test? I thought barbarians were stupid!").also { stage++ } + 58 -> npcl(FacialExpression.ANNOYED,"That is the opinion that outerlanders usually hold of my people, it is true. But that is because people often confuse knowledge with wisdom.").also { stage++ } + 59 -> npcl(FacialExpression.ANNOYED,"My puzzle tests not what you know, but what you can work out. All members of our clan have been tested when they took their trials.").also { stage++ } + 60 -> playerl(FacialExpression.ASKING,"So what exactly does this puzzle consist of, then?").also { stage++ } + 61 -> npcl(FacialExpression.HAPPY,"Well, firstly you must enter my house with no items, weapons or armour. Then it is a simple matter of entering through one door and leaving by the other.").also { stage++ } + 62 -> playerl(FacialExpression.ASKING,"I can't take anything in there with me?").also { stage++ } + 63 -> npcl(FacialExpression.HAPPY,"That is correct outerlander. Everything you need to complete the puzzle you will find inside the building. Nothing more.").also { stage++ } + 64 -> npcl(FacialExpression.HAPPY,"So what say you outerlander? You think you have the wit to earn yourself my vote?").also { stage++ } + 65 -> options("Yes","No").also { stage++ } + 66 -> when(buttonId){ 1 ->{ playerl(FacialExpression.HAPPY,"Yes, I accept your challenge, I have one small question, however...") player?.setAttribute("/save:PeerStarted",true) player?.setAttribute("/save:PeerRiddle", Random.nextInt(0,3)) @@ -148,7 +153,7 @@ class PeerTheSeerDialogue(player: Player? = null) : DialoguePlugin(player) { } } //No to challenge - 68 -> npcl(FacialExpression.HAPPY,"As you wish, outerlander.").also { stage = 1000 } + 67 -> npcl(FacialExpression.HAPPY,"As you wish, outerlander.").also { stage = 1000 } //Yes to challenge 70 -> npcl(FacialExpression.ASKING,"Yes outerlander?").also { stage++ } @@ -190,32 +195,28 @@ class PeerTheSeerDialogue(player: Player? = null) : DialoguePlugin(player) { } //Returning after accepting with items. - 100 -> npcl(FacialExpression.AMAZED,"!").also { stage++ } - 101 -> npcl(FacialExpression.HAPPY,"Ahem, sorry about that. Hello outerlander. What do you want?").also { stage++ } - 102 -> playerl(FacialExpression.ASKING,"So I can bring nothing with me when I enter your house?").also { stage++ } - 103 -> npcl(FacialExpression.HAPPY,"That is correct outerlander, but as I say, I can use my small skill in magic to send your items directly into your bank account from here.").also { stage++ } - 104 -> npcl(FacialExpression.HAPPY,"You will need to manually go to the bank to withdraw them again however.").also { stage++ } - 105 -> npcl(FacialExpression.HAPPY,"Would you like me to perform this small spell upon you, outerlander?").also { stage = 82 } + 100 -> npcl(FacialExpression.HAPPY,"Hello outerlander. What do you want?").also { stage++ } + 101 -> playerl(FacialExpression.ASKING,"So I can bring nothing with me when I enter your house?").also { stage++ } + 102 -> npcl(FacialExpression.HAPPY,"That is correct outerlander, but as I say, I can use my small skill in magic to send your items directly into your bank account from here.").also { stage++ } + 103 -> npcl(FacialExpression.HAPPY,"You will need to manually go to the bank to withdraw them again however.").also { stage++ } + 104 -> npcl(FacialExpression.HAPPY,"Would you like me to perform this small spell upon you, outerlander?").also { stage = 82 } //Returning after accepting without items. - 110 -> npcl(FacialExpression.AMAZED,"!").also { stage++ } - 111 -> npcl(FacialExpression.HAPPY,"Ahem, sorry about that. Hello outerlander. What do you want?").also { stage++ } - 112 -> playerl(FacialExpression.ASKING,"So I just have to enter by one door of your house, and leave by the other?").also { stage++ } - 113 -> npcl(FacialExpression.HAPPY,"That is correct outerlander. Be warned it is not as easy as it may at first sound...").also { stage = 1000 } + 110 -> npcl(FacialExpression.HAPPY,"Hello outerlander. What do you want?").also { stage++ } + 111 -> playerl(FacialExpression.ASKING,"So I just have to enter by one door of your house, and leave by the other?").also { stage++ } + 112 -> npcl(FacialExpression.HAPPY,"That is correct outerlander. Be warned it is not as easy as it may at first sound...").also { stage = 1000 } //After completing the Seer's Trial. - 120 -> npcl(FacialExpression.AMAZED,"!").also { stage++ } - 121 -> npcl(FacialExpression.HAPPY,"Ahem, sorry about that.").also { stage++ } - 122 -> playerl(FacialExpression.HAPPY,"So you will vote for me at the council?").also { stage++ } + 120 -> playerl(FacialExpression.HAPPY,"So you will vote for me at the council?").also { stage++ } 123 -> npcl(FacialExpression.HAPPY,"Absolutely, outerlander. Your wisdom in passing my test marks you as worthy in my eyes.").also { stage = 1000 } //After The Fremennik Trials - 150 -> npcl(FacialExpression.AMAZED,"!").also { stage++ } - 151 -> npcl(FacialExpression.HAPPY,"Ahem, sorry about that.").also { + 150 -> { stage = if(anyInEquipment(player, Items.FREMENNIK_SEA_BOOTS_1_14571, Items.FREMENNIK_SEA_BOOTS_2_14572, Items.FREMENNIK_SEA_BOOTS_3_14573) && !hasIronmanRestriction(player, IronmanMode.ULTIMATE)){ 200 - }else 152 + } + else 152 } 152 -> playerl(FacialExpression.HAPPY,"Hello Peer.").also { stage++ } 153 -> npcl(FacialExpression.HAPPY,"Greetings to you, brother ${player.getAttribute("fremennikname","dingle")}! What brings you to see me again?").also { stage++ } @@ -242,10 +243,6 @@ class PeerTheSeerDialogue(player: Player? = null) : DialoguePlugin(player) { player.bank.openDepositBox() stage = 1000 } - - 300 -> npc(FacialExpression.NEUTRAL,"!").also { stage++ } - 301 -> npcl(FacialExpression.NEUTRAL,"Ahem, sorry about that. I have no interest in talking to you just now outerlander.").also { stage = END_DIALOGUE } - 1000 -> end() } return true diff --git a/Server/src/main/content/region/kandarin/seers/dialogue/SeerDialogue.kt b/Server/src/main/content/region/kandarin/seers/dialogue/SeerDialogue.kt index e241c34f2..1e191800f 100644 --- a/Server/src/main/content/region/kandarin/seers/dialogue/SeerDialogue.kt +++ b/Server/src/main/content/region/kandarin/seers/dialogue/SeerDialogue.kt @@ -9,7 +9,6 @@ import core.api.isQuestInProgress import core.api.openDialogue 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 core.tools.END_DIALOGUE @@ -40,18 +39,10 @@ class SeerDialogue(player: Player? = null) : DialoguePlugin(player) { const val POWER = 80 } - override fun open(vararg args: Any?): Boolean { - npc = args[0] as NPC - npcl(FacialExpression.WORRIED, "Uh, what was that dark force? I've never sensed anything like it...").also { stage = START_DIALOGUE } // https://www.youtube.com/watch?v=mYsxit46rGo May 14 2010 - return true - } - override fun handle(interfaceId: Int, buttonId: Int): Boolean { val scorpionCatcherQuestStage = getQuestStage(player, Quests.SCORPION_CATCHER) when (stage) { - START_DIALOGUE -> - npcl(FacialExpression.NEUTRAL, "Anyway, sorry about that.").also { stage++ } - START_DIALOGUE+1 -> { + START_DIALOGUE -> { if (isQuestInProgress(player, Quests.SCORPION_CATCHER, 1, 99)) { showTopics( Topic("Talk about Scorpion Catcher.", SC_QUEST, true),