From a7516f2d6e4494eefc41932153d59a99fddf6441 Mon Sep 17 00:00:00 2001 From: downthecrop Date: Tue, 26 Mar 2024 01:51:16 +0000 Subject: [PATCH] Fixed Nettle Tea wrong return item Fixed Yak Hide crafting swapped items Fixed mining bot dropped ore ironman restrictions Fixed Ardy teleport tab requirements Fixed Alice's husband not requiring ghostspeak Fixed Fishing Trawler stuck on boat bug Fixed POH debug region info showing in non-debug mode --- .../src/main/content/data/consumables/Consumables.java | 2 +- Server/src/main/content/global/bots/NonBankingMiner.kt | 2 +- .../content/global/handlers/item/TeleTabsListener.kt | 10 +++++++--- .../global/skill/construction/HouseManager.java | 2 +- .../minigame/fishingtrawler/FishingTrawlerSession.kt | 3 +++ .../fremennik/neitiznot/handlers/YakArmourPlugin.java | 7 ++++--- .../draynor/quest/anma/AliceHusbandDialogue.java | 10 ++++++++++ 7 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Server/src/main/content/data/consumables/Consumables.java b/Server/src/main/content/data/consumables/Consumables.java index 7fc446f1c..12808d965 100644 --- a/Server/src/main/content/data/consumables/Consumables.java +++ b/Server/src/main/content/data/consumables/Consumables.java @@ -287,7 +287,7 @@ public enum Consumables { CUP_OF_TEA(new Drink(new int[] {712, 1980}, new MultiEffect(new HealingEffect(3), new SkillEffect(Skills.ATTACK, 3, 0)), "Aaah, nothing like a nice cuppa tea!")), CUP_OF_TEA_NETTLE(new Drink(new int[] {4242, 1980}, new EnergyEffect(10))), CUP_OF_TEA_MILKY_NETTLE(new Drink(new int[] {4243, 1980}, new EnergyEffect(10))), - NETTLE_TEA(new Drink(new int[] {4239, 1980}, new NettleTeaEffect())), + NETTLE_TEA(new Drink(new int[] {4239, 1923}, new NettleTeaEffect())), NETTLE_TEA_MILKY(new Drink(new int[] {4240, 1980}, new NettleTeaEffect())), CUP_OF_TEA_CLAY(new Drink(new int[] {7730, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0), "You feel refreshed and ready for more building.")), CUP_OF_TEA_CLAY_MILKY(new Drink(new int[] {7731, 7728}, new SkillEffect(Skills.CONSTRUCTION, 1, 0))), diff --git a/Server/src/main/content/global/bots/NonBankingMiner.kt b/Server/src/main/content/global/bots/NonBankingMiner.kt index 0d99c11d3..909d0a41e 100644 --- a/Server/src/main/content/global/bots/NonBankingMiner.kt +++ b/Server/src/main/content/global/bots/NonBankingMiner.kt @@ -17,7 +17,7 @@ class NonBankingMiner : Script() { } //checks if the bot has tin ore in his inventory and drops it if he does if(bot.inventory.containsAtLeastOneItem(Items.TIN_ORE_438)){ - produceGroundItem(null,438,1,bot.location) + produceGroundItem(bot,438,1,bot.location) bot.inventory.remove(Item(Items.TIN_ORE_438,1)) } //The following is to prevent lucky bots from breaking by having a full inventory of gems diff --git a/Server/src/main/content/global/handlers/item/TeleTabsListener.kt b/Server/src/main/content/global/handlers/item/TeleTabsListener.kt index f90bcf502..21a291360 100644 --- a/Server/src/main/content/global/handlers/item/TeleTabsListener.kt +++ b/Server/src/main/content/global/handlers/item/TeleTabsListener.kt @@ -5,14 +5,18 @@ import core.api.removeItem import core.api.teleport import core.game.interaction.IntType import core.game.interaction.InteractionListener +import core.game.node.entity.player.Player import core.game.node.entity.player.link.TeleportManager import core.game.node.item.Item import core.game.world.map.Location +import core.api.hasRequirement; class TeleTabsListener : InteractionListener { - enum class TeleTabs(val item: Int, val location: Location, val exp: Double) { - ADDOUGNE_TELEPORT(8011, Location.create(2662, 3307, 0), 61.0), + enum class TeleTabs(val item: Int, val location: Location, val exp: Double, val requirementCheck: (Player) -> Boolean = { true }) { + ADDOUGNE_TELEPORT(8011, Location.create(2662, 3307, 0), 61.0, { + player -> hasRequirement(player, "Plague City"); + }), AIR_ALTAR_TELEPORT(13599, Location.create(2978, 3296, 0), 0.0), ASTRAL_ALTAR_TELEPORT(13611, Location.create(2156, 3862, 0), 0.0), BLOOD_ALTAR_TELEPORT(13610, Location.create(3559, 9778, 0), 0.0), @@ -47,7 +51,7 @@ class TeleTabsListener : InteractionListener { val tabEnum = TeleTabs.forId(tab) if (tabEnum != null && inInventory(player,tab)) { val tabloc = tabEnum.location - if (inInventory(player, tab)) { + if (inInventory(player, tab) && tabEnum.requirementCheck(player)) { if (teleport(player, tabloc, TeleportManager.TeleportType.TELETABS)) { removeItem(player, Item(node.id, 1)) } diff --git a/Server/src/main/content/global/skill/construction/HouseManager.java b/Server/src/main/content/global/skill/construction/HouseManager.java index 9e5e4f1ea..e00bbf92c 100644 --- a/Server/src/main/content/global/skill/construction/HouseManager.java +++ b/Server/src/main/content/global/skill/construction/HouseManager.java @@ -196,7 +196,7 @@ public final class HouseManager { } player.setAttribute("poh_entry", HouseManager.this); player.lock(1); - player.sendMessage("House location: " + houseRegion.getBaseLocation() + ", entry: " + getEnterLocation()); + player.debug("House location: " + houseRegion.getBaseLocation() + ", entry: " + getEnterLocation()); } /** diff --git a/Server/src/main/content/minigame/fishingtrawler/FishingTrawlerSession.kt b/Server/src/main/content/minigame/fishingtrawler/FishingTrawlerSession.kt index 6e78ee35d..a8e4395e2 100644 --- a/Server/src/main/content/minigame/fishingtrawler/FishingTrawlerSession.kt +++ b/Server/src/main/content/minigame/fishingtrawler/FishingTrawlerSession.kt @@ -160,6 +160,9 @@ class FishingTrawlerSession(val activity: FishingTrawlerActivity? = null) : MapA for(player in session.players){ session.updateOverlay(player) + if(session.timeLeft <= 1) { + lockInteractions(player, 2) + } } session.tickMurphy() return !session.isActive diff --git a/Server/src/main/content/region/fremennik/neitiznot/handlers/YakArmourPlugin.java b/Server/src/main/content/region/fremennik/neitiznot/handlers/YakArmourPlugin.java index e5c86e266..e746965b7 100644 --- a/Server/src/main/content/region/fremennik/neitiznot/handlers/YakArmourPlugin.java +++ b/Server/src/main/content/region/fremennik/neitiznot/handlers/YakArmourPlugin.java @@ -71,6 +71,7 @@ public class YakArmourPlugin extends UseWithHandler { * The index. */ private final int index; + private final int YAK_BODY_INDEX = 1; /** * The ticks. @@ -96,7 +97,7 @@ public class YakArmourPlugin extends UseWithHandler { @Override public boolean checkRequirements() { - int level = (index == 1 ? 46 : 43); + int level = (index == YAK_BODY_INDEX ? 46 : 43); if (player.getSkills().getLevel(Skills.CRAFTING) < level) { player.getDialogueInterpreter().sendDialogue("You need a Crafting level of at least " + level + " in order to do this."); return false; @@ -108,7 +109,7 @@ public class YakArmourPlugin extends UseWithHandler { player.getDialogueInterpreter().sendDialogue("You need some thread to make anything out of leather."); return false; } - int reqAmount = index == 1 ? 1 : 2; + int reqAmount = index == YAK_BODY_INDEX ? 2 : 1; if (!player.getInventory().contains(10820, reqAmount)) { player.getDialogueInterpreter().sendDialogue("You don't have the required amount of yak-hide in order to do this."); return false; @@ -129,7 +130,7 @@ public class YakArmourPlugin extends UseWithHandler { if (++ticks % 5 != 0) { return false; } - int reqAmount = index == 1 ? 1 : 2; + int reqAmount = index == YAK_BODY_INDEX ? 2 : 1; if (player.getInventory().remove(new Item(10820, reqAmount))) { player.getInventory().add(node); player.getSkills().addExperience(Skills.CRAFTING, 32, true); diff --git a/Server/src/main/content/region/misthalin/draynor/quest/anma/AliceHusbandDialogue.java b/Server/src/main/content/region/misthalin/draynor/quest/anma/AliceHusbandDialogue.java index b9dbb405c..691c9b1f0 100644 --- a/Server/src/main/content/region/misthalin/draynor/quest/anma/AliceHusbandDialogue.java +++ b/Server/src/main/content/region/misthalin/draynor/quest/anma/AliceHusbandDialogue.java @@ -1,10 +1,12 @@ package content.region.misthalin.draynor.quest.anma; import core.game.dialogue.DialoguePlugin; +import core.game.dialogue.FacialExpression; import core.game.node.entity.player.Player; import core.game.node.entity.player.link.quest.Quest; import core.game.node.item.Item; import content.region.misthalin.draynor.quest.anma.AnmaCutscene; +import org.rs09.consts.Items; /** * Handles the husband of alice's npc dialogue. @@ -46,6 +48,10 @@ public final class AliceHusbandDialogue extends DialoguePlugin { @Override public boolean open(Object... args) { + if (!player.getEquipment().containsAtLeastOneItem(Items.GHOSTSPEAK_AMULET_552)) { + npc("Wooo wooo wooooo!"); + return true; + } quest = player.getQuestRepository().getQuest(AnimalMagnetism.NAME); switch (quest.getStage(player)) { case 0: @@ -85,6 +91,10 @@ public final class AliceHusbandDialogue extends DialoguePlugin { @Override public boolean handle(int interfaceId, int buttonId) { + if (!player.getEquipment().containsAtLeastOneItem(Items.GHOSTSPEAK_AMULET_552)) { + end(); + return true; + } switch (quest.getStage(player)) { default: switch (stage) {