From 45c21767d5aae02112460982f0df5fed8bdf6715 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Sat, 8 Jun 2024 10:17:01 +0000 Subject: [PATCH] Reduced price of fighter torso to 4.5M (until barbarian assault is implemented) --- .../barbassault/CaptainCainDialogue.kt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt b/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt index c0e50104d..baeb381ba 100644 --- a/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt +++ b/Server/src/main/content/minigame/barbassault/CaptainCainDialogue.kt @@ -1,20 +1,27 @@ package content.minigame.barbassault -import core.api.* +import core.api.Container +import core.api.addItem +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.game.node.item.Item import core.plugin.Initializable +import core.tools.END_DIALOGUE import org.rs09.consts.Items import org.rs09.consts.NPCs -import core.tools.END_DIALOGUE import java.text.SimpleDateFormat import java.time.temporal.ChronoUnit import java.util.* @Initializable class CaptainCainDialogue(player: Player? = null) : DialoguePlugin(player) { + companion object { + const val TORSO_PRICE = 4_500_000 + } + val sdf = SimpleDateFormat("ddMMyyyy") override fun newInstance(player: Player?): DialoguePlugin { return CaptainCainDialogue(player) @@ -38,20 +45,20 @@ class CaptainCainDialogue(player: Player? = null) : DialoguePlugin(player) { 2 -> playerl(FacialExpression.HALF_THINKING, "No, thanks.").also { stage = END_DIALOGUE } } - 10 -> npcl(FacialExpression.FRIENDLY, "Alright, then, that'll be 7,500,000 gold please.").also { stage++ } + 10 -> npcl(FacialExpression.FRIENDLY, "Alright, then, that'll be %,d gold please.".format(TORSO_PRICE)).also { stage++ } 11 -> options("Here you go!","Nevermind.").also { stage++ } 12 -> when(buttonId){ - 1 -> if(inInventory(player, 995, 7500000)) + 1 -> if(inInventory(player, 995, TORSO_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, nevermind.").also { stage = END_DIALOGUE } + 2 -> playerl(FacialExpression.FRIENDLY, "On second thought, never mind.").also { stage = END_DIALOGUE } } 20 -> { npcl(FacialExpression.FRIENDLY, "Thank you much, kind sir. And here's your torso.") - if(removeItem(player, Item(995,7500000), Container.INVENTORY)) { + if(removeItem(player, Item(995, TORSO_PRICE), Container.INVENTORY)) { addItem(player, Items.FIGHTER_TORSO_10551, 1) } stage = END_DIALOGUE