From cbeb422411f26b2d6c5c5a971d2efe154c4f8330 Mon Sep 17 00:00:00 2001 From: Zerken Date: Sun, 10 Sep 2023 15:24:56 +0000 Subject: [PATCH] Fixed the mining level requirement of perfect gold ore to be 40 instead of 46 Resolved a issue where gold rock scenery was rewarding perfect gold ore on gold rocks outside of the Witchaven dungeon Familiars are no longer allowed in some places they shouldn't be The Grand Tree mine's roots now properly animate and play the correct sound when pushing them The correct thieving level is now required for Varrock pickpocket diary task Added the correct dialogue message to inspecting the cactus with the red scarf from tourist trap Corrected Dagganoth Prime talisman drops Arctic pines now reward 40 xp authentic to Jan of 2009 instead of Sept of 2009 All farming patch tree chop rates have been corrected Fixed an issue where the player would continue to chop farming patch trees after they get chopped down Fixed the typo in the word Jenkiins -> Jenkins --- Server/data/configs/drop_tables.json | 12 +++++----- .../skill/gather/mining/MiningListener.kt | 7 ++++++ .../skill/gather/mining/MiningNode.java | 9 +------- .../gather/woodcutting/WoodcuttingListener.kt | 19 +++++++++++----- .../gather/woodcutting/WoodcuttingNode.java | 22 ++++++++++++++++++- .../portsarim/dialogue/KlarenseDialogue.java | 2 +- .../thetouristrap/TouristTrapPlugin.java | 6 +++++ .../quest/grandtree/GrandTreeListeners.kt | 4 +++- .../quest/waterfall/WaterfallPlugin.java | 4 ++++ .../varrock/diary/VarrockAchivementDiary.kt | 3 ++- 10 files changed, 65 insertions(+), 23 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index ea676d5b8..85ef7ee6e 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -33939,20 +33939,20 @@ { "minAmount": "1", "weight": "15.0", - "id": "1438", - "maxAmount": "1" + "id": "1439", + "maxAmount": "80" }, { "minAmount": "1", "weight": "15.0", - "id": "1440", - "maxAmount": "1" + "id": "1441", + "maxAmount": "80" }, { "minAmount": "1", "weight": "15.0", - "id": "1444", - "maxAmount": "1" + "id": "1445", + "maxAmount": "88" }, { "minAmount": "155", diff --git a/Server/src/main/content/global/skill/gather/mining/MiningListener.kt b/Server/src/main/content/global/skill/gather/mining/MiningListener.kt index 252356e46..8e2f5186c 100644 --- a/Server/src/main/content/global/skill/gather/mining/MiningListener.kt +++ b/Server/src/main/content/global/skill/gather/mining/MiningListener.kt @@ -19,6 +19,7 @@ import core.game.node.scenery.Scenery import core.game.node.scenery.SceneryBuilder import core.game.system.command.sets.STATS_BASE import core.game.system.command.sets.STATS_ROCKS +import core.game.world.map.zone.ZoneBorders import core.tools.RandomFunction import core.tools.prependArticle import org.rs09.consts.Items @@ -89,6 +90,12 @@ class MiningListener : InteractionListener { player.setAttribute("/save:jewellery-charges:bracelet-of-clay", charges) } } + + //If the player is mining gold in the witchaven dungeon, reward family crest perfect gold ore + val familyCrestGoldOreArea = ZoneBorders(2733, 9695, 2741, 9683) + if (reward == Items.GOLD_ORE_444 && inBorders(player, familyCrestGoldOreArea)) { + reward = Items.PERFECT_GOLD_ORE_446 + } val rewardName = getItemName(reward).lowercase() // Send the message for the resource reward diff --git a/Server/src/main/content/global/skill/gather/mining/MiningNode.java b/Server/src/main/content/global/skill/gather/mining/MiningNode.java index 301382938..5f7f00cf3 100644 --- a/Server/src/main/content/global/skill/gather/mining/MiningNode.java +++ b/Server/src/main/content/global/skill/gather/mining/MiningNode.java @@ -275,7 +275,7 @@ public enum MiningNode{ COAL_49(42035,452, (byte) 8), //Gold - GOLD_ORE_0( 2099, 452, (byte) 20), + GOLD_ORE_0( 2099, 452, (byte) 9), GOLD_ORE_1( 2098, 450, (byte) 9), GOLD_ORE_2( 2611, 21298, (byte) 9), GOLD_ORE_3( 2610, 21297, (byte) 9), @@ -573,13 +573,6 @@ public enum MiningNode{ reward = 12630; level = 46; break; - case 20: - respawnRate = 50 | 100 << 16; - experience = 17.5; - rate = 0.6; - reward = 446; - level = 46; - break; } } private static HashMap NODE_MAP = new HashMap<>(); diff --git a/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingListener.kt b/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingListener.kt index ffb060243..4f7c9276f 100644 --- a/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingListener.kt +++ b/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingListener.kt @@ -15,6 +15,7 @@ import core.game.event.ResourceProducedEvent import core.game.interaction.Clocks import core.game.interaction.IntType import core.game.interaction.InteractionListener +import core.game.interaction.QueueStrength import core.game.node.Node import core.game.node.entity.impl.Projectile import core.game.node.entity.npc.NPC @@ -77,7 +78,7 @@ class WoodcuttingListener : InteractionListener { val reward = resource.getReward() val rewardAmount: Int - if (tool.id == Items.INFERNO_ADZE_13661 && RandomFunction.roll(4)) { + if (tool.id == Items.INFERNO_ADZE_13661 && reward != Items.BARK_3239 && RandomFunction.roll(4)) { sendMessage(player, "You chop some logs. The heat of the inferno adze incinerates them.") Projectile.create( player, null, @@ -115,6 +116,8 @@ class WoodcuttingListener : InteractionListener { //send the message for the resource reward if (resource == WoodcuttingNode.DRAMEN_TREE) { player.packetDispatch.sendMessage("You cut a branch from the Dramen tree.") + } else if (reward == Items.BARK_3239 && rewardAmount == 0) { + player.packetDispatch.sendMessage("You chop away some bark, but it falls to pieces before you can pick it up.") } else { player.packetDispatch.sendMessage("You get some " + ItemDefinition.forId(reward).name.lowercase(Locale.getDefault()) + ".") } @@ -159,6 +162,12 @@ class WoodcuttingListener : InteractionListener { if (fPatch != null) { val patch = fPatch.getPatchFor(player) patch.setCurrentState(patch.getCurrentState() + 1) + node.isActive = false + playAudio(player, TREE_FALLING_2734) + queueScript(player, 2, QueueStrength.SOFT) { + node.isActive = true + return@queueScript stopExecuting(player) + } } return true } @@ -249,12 +258,12 @@ class WoodcuttingListener : InteractionListener { } // Bark - if (reward == 3239) { - // If we receive the item, give the full experience points otherwise give the base amount + if (reward == Items.BARK_3239) { + // If we receive the item, give the experience points if (amount >= 1) { - experience = 275.2 + experience = 82.5 } else { - amount = 1 + return 0.0 } } diff --git a/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingNode.java b/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingNode.java index 67060bfb1..c83ef7cc8 100644 --- a/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingNode.java +++ b/Server/src/main/content/global/skill/gather/woodcutting/WoodcuttingNode.java @@ -265,7 +265,7 @@ public enum WoodcuttingNode { reward = 10810; respawnRate = 75 | 130 << 16; rate = 0.73; - experience = 140.2; + experience = 40.0; level = 54; rewardAmount = 35; baseLow = 6; @@ -344,6 +344,10 @@ public enum WoodcuttingNode { experience = 37.5; level = 15; rewardAmount = 10; + baseLow = 32; + baseHigh = 100; + tierModLow = 16; + tierModHigh = 50; break; case 20: reward = 1519; @@ -352,6 +356,10 @@ public enum WoodcuttingNode { experience = 67.8; level = 30; rewardAmount = 20; + baseLow = 16; + baseHigh = 50; + tierModLow = 8; + tierModHigh = 25; break; case 21: reward = 1517; @@ -360,6 +368,10 @@ public enum WoodcuttingNode { experience = 100.0; level = 45; rewardAmount = 30; + baseLow = 8; + baseHigh = 25; + tierModLow = 4; + tierModHigh = 12.5; break; case 22: reward = 1515; @@ -368,6 +380,10 @@ public enum WoodcuttingNode { experience = 175.0; level = 60; rewardAmount = 40; + baseLow = 4; + baseHigh = 12.5; + tierModLow = 2; + tierModHigh = 6.25; break; case 23: reward = 1513; @@ -376,6 +392,10 @@ public enum WoodcuttingNode { experience = 250.0; level = 75; rewardAmount = 50; + baseLow = 2; + baseHigh = 6; + tierModLow = 1; + tierModHigh = 3; break; } } diff --git a/Server/src/main/content/region/asgarnia/portsarim/dialogue/KlarenseDialogue.java b/Server/src/main/content/region/asgarnia/portsarim/dialogue/KlarenseDialogue.java index f127dc2c8..e09ea0149 100644 --- a/Server/src/main/content/region/asgarnia/portsarim/dialogue/KlarenseDialogue.java +++ b/Server/src/main/content/region/asgarnia/portsarim/dialogue/KlarenseDialogue.java @@ -142,7 +142,7 @@ public final class KlarenseDialogue extends DialoguePlugin { stage = 9; break; case 9: - interpreter.sendDialogues(npc, FacialExpression.HAPPY,"How does, 2,000 gold sound? I'll even throw in my", "cabin boy, Jenkiins, for free! He'll swab the decks and", "splice the mainsails for you!"); + interpreter.sendDialogues(npc, FacialExpression.HAPPY,"How does, 2,000 gold sound? I'll even throw in my", "cabin boy, Jenkins, for free! He'll swab the decks and", "splice the mainsails for you!"); stage = 10; break; case 10: diff --git a/Server/src/main/content/region/desert/quest/thetouristrap/TouristTrapPlugin.java b/Server/src/main/content/region/desert/quest/thetouristrap/TouristTrapPlugin.java index f38a1f4a7..e8a9750dd 100644 --- a/Server/src/main/content/region/desert/quest/thetouristrap/TouristTrapPlugin.java +++ b/Server/src/main/content/region/desert/quest/thetouristrap/TouristTrapPlugin.java @@ -110,6 +110,7 @@ public final class TouristTrapPlugin extends OptionHandler { SceneryDefinition.forId(18951).getHandlers().put("option:use", this); SceneryDefinition.forId(2684).getHandlers().put("option:search", this); SceneryDefinition.forId(2684).getHandlers().put("option:look at", this); + SceneryDefinition.forId(18875).getHandlers().put("option:inspect", this); NPCDefinition.forId(830).getHandlers().put("option:watch", this); NPCDefinition.forId(4975).getHandlers().put("option:talk-to", this); NPCDefinition.forId(4976).getHandlers().put("option:talk-to", this); @@ -482,6 +483,11 @@ public final class TouristTrapPlugin extends OptionHandler { }); } break; + case "inspect": + if (id == 18875) { + sendDialogue(player, "You remember that Irena mentioned something about Ana wearing a red scarf before she left for the desert."); + } + break; } return true; } diff --git a/Server/src/main/content/region/kandarin/quest/grandtree/GrandTreeListeners.kt b/Server/src/main/content/region/kandarin/quest/grandtree/GrandTreeListeners.kt index 273547ae4..4c969c234 100644 --- a/Server/src/main/content/region/kandarin/quest/grandtree/GrandTreeListeners.kt +++ b/Server/src/main/content/region/kandarin/quest/grandtree/GrandTreeListeners.kt @@ -14,6 +14,7 @@ import core.game.world.map.Location import core.game.world.update.flag.context.Animation import org.rs09.consts.Items import org.rs09.consts.NPCs +import org.rs09.consts.Sounds class GrandTreeListeners: InteractionListener { @@ -199,7 +200,8 @@ class GrandTreeListeners: InteractionListener { forceMove(player, player.location, player.location.transform(0, -2, 0), 25, 60, null, 819) } animate(player, 2572, false) - // animateScenery(roots.asScenery(), 1) + animateScenery(roots.asScenery(), 452) + playAudio(player, Sounds.TANGLEVINE_APPEAR_2316) } return@on true } diff --git a/Server/src/main/content/region/kandarin/quest/waterfall/WaterfallPlugin.java b/Server/src/main/content/region/kandarin/quest/waterfall/WaterfallPlugin.java index e77e97a06..5bcac3376 100644 --- a/Server/src/main/content/region/kandarin/quest/waterfall/WaterfallPlugin.java +++ b/Server/src/main/content/region/kandarin/quest/waterfall/WaterfallPlugin.java @@ -484,6 +484,10 @@ public final class WaterfallPlugin extends OptionHandler { } if (useditem.getId() == PEBBLE.getId() && object.getId() == 1992 && ItemDefinition.canEnterEntrana(player)) { + if (player.getFamiliarManager().hasFamiliar()) { + sendMessage(player, "You can't take a follower into the tomb."); + return false; + } player.getPacketDispatch().sendMessage("You place the pebble in the gravestone's small indent."); player.getPacketDispatch().sendMessage("It fits perfectly."); player.getPacketDispatch().sendMessage("You hear a loud creak.", 4); diff --git a/Server/src/main/content/region/misthalin/varrock/diary/VarrockAchivementDiary.kt b/Server/src/main/content/region/misthalin/varrock/diary/VarrockAchivementDiary.kt index 0cb1d0b15..79df3f710 100644 --- a/Server/src/main/content/region/misthalin/varrock/diary/VarrockAchivementDiary.kt +++ b/Server/src/main/content/region/misthalin/varrock/diary/VarrockAchivementDiary.kt @@ -13,6 +13,7 @@ import org.rs09.consts.Scenery import content.region.misthalin.varrock.dialogue.ElsieDialogue import content.global.handlers.iface.FairyRing import content.global.skill.magic.TeleportMethod +import core.api.getStatLevel import core.api.inBorders import core.game.diary.AreaDiaryTask import core.game.diary.DiaryEventHookBase @@ -194,7 +195,7 @@ class VarrockAchivementDiary : DiaryEventHookBase(DiaryType.VARROCK) { } } - if (event.option == "pickpocket" && (event.target.id == NPCs.GUARD_5920 && inBorders(player, VARROCK_PALACE))) { + if (event.option == "pickpocket" && (event.target.id == NPCs.GUARD_5920 && inBorders(player, VARROCK_PALACE) && getStatLevel(player, Skills.THIEVING) >= 40)) { finishTask( player, DiaryLevel.MEDIUM,