From fe81487a1ca69bd448fa74f7af43be591d5e2232 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 24 Jun 2021 21:31:01 -0500 Subject: [PATCH] Testing is good --- .../core/game/content/dialogue/DialogueInterpreter.java | 2 ++ Server/src/main/kotlin/api/ContentAPI.kt | 3 +-- .../kotlin/rs09/game/interaction/inter/SilverInterface.kt | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Server/src/main/java/core/game/content/dialogue/DialogueInterpreter.java b/Server/src/main/java/core/game/content/dialogue/DialogueInterpreter.java index 93250ec76..ba71fb8c4 100644 --- a/Server/src/main/java/core/game/content/dialogue/DialogueInterpreter.java +++ b/Server/src/main/java/core/game/content/dialogue/DialogueInterpreter.java @@ -18,6 +18,7 @@ import core.plugin.PluginManifest; import core.plugin.PluginType; import rs09.game.content.dialogue.DialogueFile; import rs09.game.content.dialogue.EmptyPlugin; +import rs09.game.system.SystemLogger; import rs09.game.system.config.ItemConfigParser; import java.util.ArrayList; @@ -553,6 +554,7 @@ public final class DialogueInterpreter { * @param objects The arguments. */ public void sendInput(boolean string, Object... objects) { + SystemLogger.logInfo("Sending runscript"); player.getPacketDispatch().sendRunScript(string ? 109 : 108, "s", objects); } diff --git a/Server/src/main/kotlin/api/ContentAPI.kt b/Server/src/main/kotlin/api/ContentAPI.kt index d5d824ddb..1ebd8d57d 100644 --- a/Server/src/main/kotlin/api/ContentAPI.kt +++ b/Server/src/main/kotlin/api/ContentAPI.kt @@ -128,12 +128,11 @@ object ContentAPI { else -> throw IllegalStateException("Invalid value passed for item") } - when(container){ + return when(container){ Container.INVENTORY -> player.inventory.remove(it) Container.BANK -> player.bank.remove(it) Container.EQUIPMENT -> player.equipment.remove(it) } - return false } /** diff --git a/Server/src/main/kotlin/rs09/game/interaction/inter/SilverInterface.kt b/Server/src/main/kotlin/rs09/game/interaction/inter/SilverInterface.kt index 02405552c..f7d94f37e 100644 --- a/Server/src/main/kotlin/rs09/game/interaction/inter/SilverInterface.kt +++ b/Server/src/main/kotlin/rs09/game/interaction/inter/SilverInterface.kt @@ -10,6 +10,7 @@ import org.rs09.consts.Components import org.rs09.consts.Items import rs09.game.interaction.InteractionListener import rs09.game.interaction.InterfaceListener +import rs09.game.system.SystemLogger class SilverInterface : InterfaceListener() { @@ -58,10 +59,7 @@ class SilverInterface : InterfaceListener() { if(amt == -1) ContentAPI.sendInputDialogue(player, true, "Enter the amount:"){value -> make(player,product,value as Int) - } - - make(player, product, amt) - + } else make(player, product, amt) return@on true } } @@ -82,6 +80,7 @@ class SilverInterface : InterfaceListener() { if(product == SilverProduct.UNBLESSED && player.location.withinDistance(ContentAPI.location(3226,3254,0))){ player.achievementDiaryManager.finishTask(player, DiaryType.LUMBRIDGE, 2, 8) } + delay = 3 } else return true amt--