initial bribing of King Roald enabled
This commit is contained in:
parent
504a49eaae
commit
d6add6cc4e
@ -6,6 +6,7 @@ import core.game.dialogue.FacialExpression
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.player.Player
|
||||
import content.region.misthalin.varrock.quest.shieldofarrav.KingRoaldArravDialogue
|
||||
import content.region.misthalin.varrock.quest.shieldofarrav.KingRoaldBribe
|
||||
import content.region.misthalin.varrock.quest.allfiredup.KingRoaldAFUDialogue
|
||||
import content.region.misthalin.quest.priestinperil.KingRoaldPIPDialogue
|
||||
import core.tools.DIALOGUE_INITIAL_OPTIONS_HANDLE
|
||||
@ -45,6 +46,10 @@ class KingRoaldDialogue(player: Player? = null) : DialoguePlugin(player) {
|
||||
addOption("Shield of Arrav", KingRoaldArravDialogue())
|
||||
}
|
||||
|
||||
if (!player.questRepository.getQuest(Quests.SHIELD_OF_ARRAV).isCompleted(player)) {
|
||||
addOption("Bribe for Shield of Arrav", KingRoaldBribe())
|
||||
}
|
||||
|
||||
if(!sendChoices()){
|
||||
player("Greetings, your Majesty.")
|
||||
}
|
||||
|
@ -0,0 +1,55 @@
|
||||
package content.region.misthalin.varrock.quest.shieldofarrav
|
||||
|
||||
import core.game.node.item.GroundItemManager
|
||||
import core.game.node.item.Item
|
||||
import core.game.dialogue.DialogueFile
|
||||
import core.tools.START_DIALOGUE
|
||||
import content.data.Quests
|
||||
import core.api.Container
|
||||
import core.api.inInventory
|
||||
import core.api.removeItem
|
||||
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 org.rs09.consts.Items
|
||||
import org.rs09.consts.NPCs
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.temporal.ChronoUnit
|
||||
import java.util.*
|
||||
|
||||
class KingRoaldBribe() : DialogueFile() {
|
||||
companion object {
|
||||
const val BRIBE_PRICE = 6000
|
||||
}
|
||||
|
||||
override fun handle(interfaceId: Int, buttonId: Int) {
|
||||
when (stage) {
|
||||
START_DIALOGUE -> {
|
||||
player("I would like to contribute to one of", "your Political Action Committees")
|
||||
stage = 0
|
||||
}
|
||||
0 -> npcl("Which one?").also { stage++ }
|
||||
1 -> playerl("The Citizens Who Can't Be Bothered To Do Shield of Arrav").also { stage++ }
|
||||
2 -> npcl(FacialExpression.HALF_THINKING, "I see... that will be 6,000 coins").also { stage++ }
|
||||
3 -> options("Here you go!", "Nevermind.").also { stage++ }
|
||||
12 -> when (buttonId) {
|
||||
1 -> {
|
||||
if (inInventory(player!!, 995, BRIBE_PRICE))
|
||||
playerl(FacialExpression.FRIENDLY, "Here you go!").also { stage = 20 }
|
||||
else
|
||||
playerl(FacialExpression.HALF_GUILTY, "Actually, I don't have that much.").also { stage = END_DIALOGUE }
|
||||
}
|
||||
2 -> playerl(FacialExpression.FRIENDLY, "On second thought, never mind.").also { stage = END_DIALOGUE }
|
||||
}
|
||||
20 -> {
|
||||
npcl("Thank you so much, dear donor. The government of Varrock now cares much less about the Shield of Arrav.")
|
||||
if (removeItem(player!!, Item(995, BRIBE_PRICE), Container.INVENTORY)) {
|
||||
player!!.questRepository.getQuest(Quests.SHIELD_OF_ARRAV).finish(player)
|
||||
}
|
||||
stage = END_DIALOGUE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user