From 736c210f29aad4caed45878a54869ac757b9ab95 Mon Sep 17 00:00:00 2001 From: skelsoft <9147770-skelsoft@users.noreply.gitlab.com> Date: Wed, 30 Jun 2021 01:51:47 +0000 Subject: [PATCH 01/17] Fix: Fletching EXP corrections, 3a/infinity gear requirement corrections --- Server/data/configs/item_configs.json | 30 +++++++++++-------- Server/data/configs/shops.json | 16 +++++----- .../interaction/object/BarrowsBoatPlugin.java | 2 +- .../entity/skill/fletching/Fletching.java | 12 ++++---- 4 files changed, 32 insertions(+), 28 deletions(-) diff --git a/Server/data/configs/item_configs.json b/Server/data/configs/item_configs.json index 45f18fb2d..ad5446673 100644 --- a/Server/data/configs/item_configs.json +++ b/Server/data/configs/item_configs.json @@ -39771,6 +39771,7 @@ "name": "Mystic hat", "tradeable": "true", "archery_ticket_price": "0", + "hat": true, "id": "4089", "bonuses": "0,0,0,4,0,0,0,0,4,0,4,0,0,0,0" }, @@ -39909,6 +39910,7 @@ "name": "Mystic hat", "tradeable": "true", "archery_ticket_price": "0", + "hat": true, "id": "4099", "bonuses": "0,0,0,4,0,0,0,0,4,0,4,0,0,0,0" }, @@ -40047,6 +40049,7 @@ "name": "Mystic hat", "tradeable": "true", "archery_ticket_price": "0", + "hat": true, "id": "4109", "bonuses": "0,0,0,4,0,0,0,0,4,0,4,0,0,0,0" }, @@ -66990,7 +66993,7 @@ "id": "6915" }, { - "requirements": "{1,50}-{6,25}", + "requirements": "{1,25}-{6,50}", "ge_buy_limit": "10", "examine": "Mystical robes.", "durability": null, @@ -67017,7 +67020,7 @@ "id": "6917" }, { - "requirements": "{1,50}-{6,25}", + "requirements": "{1,25}-{6,50}", "ge_buy_limit": "10", "examine": "A mystic hat.", "durability": null, @@ -67030,6 +67033,7 @@ "name": "Infinity hat", "tradeable": "true", "archery_ticket_price": "0", + "hat": true, "id": "6918", "bonuses": "0,0,0,6,0,0,0,0,6,0,7,0,0,0,0" }, @@ -67043,7 +67047,7 @@ "id": "6919" }, { - "requirements": "{1,50}-{6,25}", + "requirements": "{1,25}-{6,50}", "ge_buy_limit": "10", "examine": "Mystical boots.", "durability": null, @@ -67069,7 +67073,7 @@ "id": "6921" }, { - "requirements": "{1,50}-{6,25}", + "requirements": "{1,25}-{6,50}", "ge_buy_limit": "10", "examine": "Mystical gloves.", "durability": null, @@ -67094,7 +67098,7 @@ "id": "6923" }, { - "requirements": "{1,50}-{6,25}", + "requirements": "{1,25}-{6,50}", "ge_buy_limit": "10", "examine": "Mystical robes.", "durability": null, @@ -92943,7 +92947,7 @@ "id": "10329" }, { - "requirements": "{1,65}-{4,45}", + "requirements": "{1,45}-{4,65}", "ge_buy_limit": "2", "examine": "Ancient range protection crafted from white dragonhide.", "durability": null, @@ -92971,7 +92975,7 @@ "id": "10331" }, { - "requirements": "{1,65}-{4,45}", + "requirements": "{1,45}-{4,65}", "ge_buy_limit": "2", "examine": "Fabulously ancient range protection crafted from white dragonhide.", "durability": null, @@ -92999,7 +93003,7 @@ }, { "remove_head": "true", - "requirements": "{1,65}-{4,45}", + "requirements": "{1,45}-{4,65}", "ge_buy_limit": "5000", "examine": "Ancient range protection crafted from white dragonhide.", "durability": null, @@ -93026,7 +93030,7 @@ "id": "10335" }, { - "requirements": "{1,65}-{4,45}", + "requirements": "{1,45}-{4,65}", "ge_buy_limit": "2", "examine": "Fabulously ancient range protection crafted from white dragonhide.", "durability": null, @@ -93052,7 +93056,7 @@ "id": "10337" }, { - "requirements": "{1,65}-{6,30}", + "requirements": "{1,30}-{6,65}", "ge_buy_limit": "2", "examine": "Ancient mage protection enchanted in the Third-Age.", "durability": null, @@ -93080,7 +93084,7 @@ "id": "10339" }, { - "requirements": "{1,65}-{6,30}", + "requirements": "{1,30}-{6,65}", "ge_buy_limit": "2", "examine": "Ancient mage protection enchanted in the Third-Age.", "durability": null, @@ -93108,7 +93112,7 @@ }, { "remove_head": "true", - "requirements": "{1,65}-{6,30}", + "requirements": "{1,30}-{6,65}", "ge_buy_limit": "2", "examine": "Ancient mage protection enchanted in the Third-Age.", "durability": null, @@ -93134,7 +93138,7 @@ "id": "10343" }, { - "requirements": "{1,65}-{6,30}", + "requirements": "{1,30}-{6,65}", "ge_buy_limit": "2", "examine": "Ancient mage protection enchanted in the Third-Age.", "durability": null, diff --git a/Server/data/configs/shops.json b/Server/data/configs/shops.json index 2423c17b3..d3411eda0 100644 --- a/Server/data/configs/shops.json +++ b/Server/data/configs/shops.json @@ -55,7 +55,7 @@ }, { "npcs": "591", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "true", "id": "7", @@ -307,7 +307,7 @@ }, { "npcs": "516", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "true", "id": "36", @@ -316,7 +316,7 @@ }, { "npcs": "560", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "true", "id": "37", @@ -1963,7 +1963,7 @@ }, { "npcs": "2564", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "false", "id": "222", @@ -1981,7 +1981,7 @@ }, { "npcs": "578", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "false", "id": "224", @@ -2053,7 +2053,7 @@ }, { "npcs": "1282", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "false", "id": "232", @@ -2062,7 +2062,7 @@ }, { "npcs": "1315", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "false", "id": "233", @@ -2089,7 +2089,7 @@ }, { "npcs": "4856", - "high_alch": "1", + "high_alch": "0", "currency": "995", "general_store": "false", "id": "236", diff --git a/Server/src/main/java/core/game/interaction/object/BarrowsBoatPlugin.java b/Server/src/main/java/core/game/interaction/object/BarrowsBoatPlugin.java index a4c7ed9a0..16656b4d4 100644 --- a/Server/src/main/java/core/game/interaction/object/BarrowsBoatPlugin.java +++ b/Server/src/main/java/core/game/interaction/object/BarrowsBoatPlugin.java @@ -30,7 +30,7 @@ public class BarrowsBoatPlugin extends OptionHandler { switch (option) { case "board": final Location dest = node.getId() == 6970 ? new Location(3522, 3285, 0) : new Location(3500, 3380, 0); - final String name = node.getId() == 6970 ? "Mort'on." : "the swamp"; + final String name = node.getId() == 6970 ? "Mort'ton." : "the swamp"; player.lock(); player.getInterfaceManager().open(new Component(321)); GameWorld.getPulser().submit(new Pulse(7, player) { diff --git a/Server/src/main/java/core/game/node/entity/skill/fletching/Fletching.java b/Server/src/main/java/core/game/node/entity/skill/fletching/Fletching.java index a3493c8b4..6b393bca0 100644 --- a/Server/src/main/java/core/game/node/entity/skill/fletching/Fletching.java +++ b/Server/src/main/java/core/game/node/entity/skill/fletching/Fletching.java @@ -128,7 +128,7 @@ public class Fletching { WILLOW_LONGBOW((byte) 1,58,847,40, 41.5, new Animation(6686)), MAPLE_SHORTBOW((byte) 1,64,853,50, 50, new Animation(6681)), MAPLE_LONGBOW((byte) 1,62,851,55, 58.3, new Animation(6687)), - YEW_SHORTBOW((byte) 1,68,857,65, 66, new Animation(6682)), + YEW_SHORTBOW((byte) 1,68,857,65, 67.5, new Animation(6682)), YEW_LONGBOW((byte) 1,66,855,70, 75, new Animation(6688)), MAGIC_SHORTBOW((byte) 1,72,861,80, 83.3, new Animation(6683)), MAGIC_LONGBOW((byte) 1,70,859,85, 91.5, new Animation(6689)), @@ -163,12 +163,12 @@ public class Fletching { } } public enum GemBolts { - OPAL(877, org.rs09.consts.Items.OPAL_1609, 45, 879, 11, 1.5), + OPAL(877, org.rs09.consts.Items.OPAL_1609, 45, 879, 11, 1.6), PEARL(9140, org.rs09.consts.Items.OYSTER_PEARL_411, 46, 880, 41, 3.2), PEARLS(9140, org.rs09.consts.Items.OYSTER_PEARLS_413, 46, 880, 41, 3.2), JADE(9139, org.rs09.consts.Items.JADE_1611, 9187, 9335, 26, 2.4), RED_TOPAZ(9141, org.rs09.consts.Items.RED_TOPAZ_1613, 9188, 9336, 48, 3.9), - SAPPHIRE(9142, org.rs09.consts.Items.SAPPHIRE_1607, 9189, 9337, 56, 4), + SAPPHIRE(9142, org.rs09.consts.Items.SAPPHIRE_1607, 9189, 9337, 56, 4.7), EMERALD(9142, org.rs09.consts.Items.EMERALD_1605, 9190, 9338, 58, 5.5), RUBY(9143, org.rs09.consts.Items.RUBY_1603, 9191, 9339, 63, 6.3), DIAMOND(9143, org.rs09.consts.Items.DIAMOND_1601, 9192, 9340, 65, 7), @@ -192,10 +192,10 @@ public class Fletching { IRON_ARROW(40, 884, 15, 3.8), STEEL_ARROW(41, 886, 30, 6.3), MITHRIL_ARROW(42, 888, 45, 8.8), - ADAMANT_ARROW(43, 890, 60, 10), + ADAMANT_ARROW(43, 890, 60, 11.3), RUNE_ARROW(44, 892, 75, 13.8), DRAGON_ARROW(11237, 11212, 90, 16.3), - BROAD_ARROW(13278, 4160, 52, 10); + BROAD_ARROW(13278, 4160, 52, 15); public int unfinished,finished,level; public double experience; @@ -294,7 +294,7 @@ public class Fletching { } public enum FletchingItems { //Standard logs - ARROW_SHAFT(52, 15, 1, 15), + ARROW_SHAFT(52, 5, 1, 15), SHORT_BOW(50, 5, 5, 1), LONG_BOW(48, 10, 10, 1), WOODEN_STOCK(9440, 6, 9, 1), From fe67417fe0048106de3341f9fc6a23787316ecde Mon Sep 17 00:00:00 2001 From: Von Hresvelg Date: Wed, 30 Jun 2021 14:02:19 -0400 Subject: [PATCH 02/17] Updated Dark Beast Drop Table (Authentic) --- Server/data/configs/drop_tables.json | 96 ++++++++++++---------------- 1 file changed, 42 insertions(+), 54 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index dc0d9663b..43fb4f66a 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -34934,8 +34934,8 @@ "main": [ { "minAmount": "1", - "weight": "25.0", - "id": "1319", + "weight": "50.0", + "id": "1367", "maxAmount": "1" }, { @@ -34944,30 +34944,12 @@ "id": "1313", "maxAmount": "1" }, - { - "minAmount": "1", - "weight": "50.0", - "id": "1367", - "maxAmount": "1" - }, { "minAmount": "1", "weight": "25.0", "id": "1361", "maxAmount": "1" }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1373", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "11235", - "maxAmount": "1" - }, { "minAmount": "1", "weight": "50.0", @@ -34982,28 +34964,10 @@ }, { "minAmount": "1", - "weight": "5.0", + "weight": "25.0", "id": "1163", "maxAmount": "1" }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1185", - "maxAmount": "1" - }, - { - "minAmount": "10", - "weight": "50.0", - "id": "562", - "maxAmount": "10" - }, - { - "minAmount": "7", - "weight": "50.0", - "id": "565", - "maxAmount": "7" - }, { "minAmount": "47", "weight": "25.0", @@ -35011,16 +34975,22 @@ "maxAmount": "47" }, { - "minAmount": "3", + "minAmount": "10", "weight": "25.0", - "id": "560", - "maxAmount": "5" + "id": "562", + "maxAmount": "10" + }, + { + "minAmount": "7", + "weight": "25.0", + "id": "565", + "maxAmount": "7" }, { "minAmount": "3", "weight": "25.0", - "id": "563", - "maxAmount": "3" + "id": "560", + "maxAmount": "5" }, { "minAmount": "1", @@ -35064,6 +35034,12 @@ "id": "211", "maxAmount": "2" }, + { + "minAmount": "1", + "weight": "25.0", + "id": "213", + "maxAmount": "2" + }, { "minAmount": "1", "weight": "25.0", @@ -35076,12 +35052,6 @@ "id": "2485", "maxAmount": "2" }, - { - "minAmount": "1", - "weight": "25.0", - "id": "213", - "maxAmount": "2" - }, { "minAmount": "1", "weight": "25.0", @@ -35090,16 +35060,28 @@ }, { "minAmount": "64", - "weight": "50.0", + "weight": "25.0", "id": "995", "maxAmount": "64" }, { "minAmount": "95", - "weight": "50.0", + "weight": "25.0", "id": "995", "maxAmount": "95" }, + { + "minAmount": "152", + "weight": "25.0", + "id": "995", + "maxAmount": "152" + }, + { + "minAmount": "220", + "weight": "25.0", + "id": "995", + "maxAmount": "220" + }, { "minAmount": "1", "weight": "25.0", @@ -35138,13 +35120,19 @@ }, { "minAmount": "1", - "weight": "5.0", + "weight": "26.6", "id": "31", "maxAmount": "1" }, { "minAmount": "1", - "weight": "100.0", + "weight": "2.13", + "id": "11235", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "150.0", "id": "0", "maxAmount": "1" } From a6926a63afd834d0169b749bd4632bc1158b9cde Mon Sep 17 00:00:00 2001 From: Von Hresvelg Date: Wed, 30 Jun 2021 22:48:05 -0400 Subject: [PATCH 03/17] Updated Mithril Dragon Drop Table (Authentic) --- Server/data/configs/drop_tables.json | 112 ++++++++++++++------------- 1 file changed, 59 insertions(+), 53 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index 43fb4f66a..199bf1000 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -45612,30 +45612,48 @@ "ids": "5363", "description": "", "main": [ + { + "minAmount": "20", + "weight": "25.0", + "id": "810", + "maxAmount": "20" + }, { "minAmount": "1", - "weight": "50.0", + "weight": "25.0", "id": "1373", "maxAmount": "1" }, - { - "minAmount": "14", - "weight": "50.0", - "id": "811", - "maxAmount": "14" - }, - { - "minAmount": "8", - "weight": "50.0", - "id": "830", - "maxAmount": "8" - }, { "minAmount": "1", "weight": "25.0", "id": "1432", "maxAmount": "1" }, + { + "minAmount": "1", + "weight": "25.0", + "id": "1147", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "1163", + "maxAmount": "1" + }, + { + "minAmount": "14", + "weight": "25.0", + "id": "811", + "maxAmount": "14" + }, + { + "minAmount": "8", + "weight": "25.0", + "id": "830", + "maxAmount": "12" + }, { "minAmount": "10", "weight": "25.0", @@ -45652,29 +45670,11 @@ "minAmount": "8", "weight": "25.0", "id": "892", - "maxAmount": "42" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1163", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1247", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "1.0", - "id": "1149", - "maxAmount": "1" + "maxAmount": "8" }, { "minAmount": "27", - "weight": "50.0", + "weight": "25.0", "id": "565", "maxAmount": "27" }, @@ -45685,10 +45685,22 @@ "maxAmount": "10" }, { - "minAmount": "4", - "weight": "5.0", - "id": "563", - "maxAmount": "4" + "minAmount": "1", + "weight": "25.0", + "id": "11429", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "11443", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "11457", + "maxAmount": "1" }, { "minAmount": "1", @@ -45697,10 +45709,10 @@ "maxAmount": "1" }, { - "minAmount": "283", + "minAmount": "600", "weight": "50.0", "id": "995", - "maxAmount": "8441" + "maxAmount": "3000" }, { "minAmount": "1", @@ -45710,7 +45722,7 @@ }, { "minAmount": "1", - "weight": "5.0", + "weight": "25.0", "id": "11359", "maxAmount": "1" }, @@ -45722,43 +45734,37 @@ }, { "minAmount": "1", - "weight": "5.0", + "weight": "25.0", "id": "11338", "maxAmount": "1" }, { - "minAmount": "2", - "weight": "5.0", + "minAmount": "1", + "weight": "25.0", "id": "2363", "maxAmount": "2" }, { "minAmount": "1", - "weight": "1.0", - "id": "995", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", + "weight": "25.0", "id": "31", "maxAmount": "1" }, { "minAmount": "1", - "weight": "0.05", + "weight": "0.15", "id": "11286", "maxAmount": "1" }, { "minAmount": "1", - "weight": "0.05", + "weight": "0.0235", "id": "11335", "maxAmount": "1" }, { "minAmount": "1", - "weight": "100.0", + "weight": "150.0", "id": "0", "maxAmount": "1" } From ef43d828e5d62e3deb1e875eca7286975c128055 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Thu, 1 Jul 2021 03:07:04 +0000 Subject: [PATCH 04/17] Pyramid plunder fix --- .../activity/pyramidplunder/PyramidOptionHandler.java | 6 +++--- .../activity/pyramidplunder/PyramidPlunderActivity.java | 5 ++++- .../kotlin/rs09/game/interaction/InteractionListeners.kt | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidOptionHandler.java b/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidOptionHandler.java index e3c9e8d13..ed646888d 100644 --- a/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidOptionHandler.java +++ b/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidOptionHandler.java @@ -1,5 +1,6 @@ package core.game.content.activity.pyramidplunder; +import api.ContentAPI; import core.cache.def.impl.NPCDefinition; import core.cache.def.impl.SceneryDefinition; import core.game.content.global.action.ClimbActionHandler; @@ -9,6 +10,7 @@ import core.game.node.entity.npc.NPC; import core.game.node.entity.player.Player; import core.game.node.object.Scenery; import core.game.system.task.Pulse; +import kotlin.Unit; import rs09.game.world.GameWorld; import core.game.world.map.Location; import core.game.world.update.flag.context.Animation; @@ -84,12 +86,10 @@ public final class PyramidOptionHandler extends OptionHandler { if(entrance == currentEntrance && willBePushed){ player.lock(); player.animate(new Animation(7299)); - player.getImpactHandler().setDisabledTicks(4); - GameWorld.getPulser().submit(new Pulse(4, player) { + ContentAPI.submitWorldPulse(new Pulse(4, player){ @Override public boolean pulse() { player.unlock(); - player.getAnimator().reset(); return true; } }); diff --git a/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidPlunderActivity.java b/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidPlunderActivity.java index dbd7eabe7..c190933f5 100644 --- a/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidPlunderActivity.java +++ b/Server/src/main/java/core/game/content/activity/pyramidplunder/PyramidPlunderActivity.java @@ -48,7 +48,10 @@ public final class PyramidPlunderActivity extends ActivityPlugin { public boolean leave(Entity e, boolean logout) { if (e instanceof Player) { ((Player) e).getInterfaceManager().closeOverlay(); - ((PlunderSession) ((Player) e).getAttribute("plunder-session",null)).setActive(false); + PlunderSession session = (PlunderSession) e.asPlayer().getAttribute("plunder-session",null); + if(session != null){ + session.setActive(false); + } ((Player) e).removeAttribute("plunder-session"); } return super.leave(e, logout); diff --git a/Server/src/main/kotlin/rs09/game/interaction/InteractionListeners.kt b/Server/src/main/kotlin/rs09/game/interaction/InteractionListeners.kt index 25ce5f44c..413ae4eea 100644 --- a/Server/src/main/kotlin/rs09/game/interaction/InteractionListeners.kt +++ b/Server/src/main/kotlin/rs09/game/interaction/InteractionListeners.kt @@ -126,9 +126,9 @@ object InteractionListeners { @JvmStatic fun run(id: Int, player: Player, node: Node, isEquip: Boolean): Boolean{ if(isEquip){ - return equipListeners["equip:$id"]?.invoke(player,node)!! + return equipListeners["equip:$id"]?.invoke(player,node) ?: true } else { - return equipListeners["unequip:$id"]?.invoke(player,node)!! + return equipListeners["unequip:$id"]?.invoke(player,node) ?: true } } From a49a99365eed0c542d51e1d7265288275e6cbf92 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 16:25:29 -0500 Subject: [PATCH 05/17] Added best easter egg --- .../item/withobject/FishEasterEgg.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt new file mode 100644 index 000000000..7646b98a5 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/FishEasterEgg.kt @@ -0,0 +1,25 @@ +package rs09.game.interaction.item.withobject + +import api.ContentAPI +import core.game.node.entity.skill.gather.woodcutting.WoodcuttingNode +import org.rs09.consts.Items +import rs09.game.interaction.InteractionListener + +class FishEasterEgg : InteractionListener() { + val TREE_IDs = WoodcuttingNode.values().map { it.id }.toIntArray() + + val fish = intArrayOf(Items.RAW_HERRING_345, Items.HERRING_347) + val doors = intArrayOf(1967,1968) + + override fun defineListeners() { + onUseWith(SCENERY, fish, *TREE_IDs){player, _, _ -> + ContentAPI.sendMessage(player, "This is not the mightiest tree in the forest.") + return@onUseWith true + } + + onUseWith(SCENERY, fish, *doors){player, _, _ -> + ContentAPI.sendMessage(player, "It can't be done!") + return@onUseWith true + } + } +} \ No newline at end of file From 4b39cb44101bf738f8c0f3ca4fcb42d30152b986 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 16:29:30 -0500 Subject: [PATCH 06/17] Removed OSRS dialogue --- .../dialogue/OttoGodblessedDialogue.kt | 53 ++----------------- 1 file changed, 5 insertions(+), 48 deletions(-) diff --git a/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt b/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt index a842fd11e..2ffa73949 100644 --- a/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt +++ b/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt @@ -6,6 +6,7 @@ import core.game.node.entity.npc.NPC import core.game.node.entity.player.Player import core.game.node.item.Item import core.plugin.Initializable +import rs09.tools.END_DIALOGUE /** * Represents the dialogue plugin used for Otto @@ -32,56 +33,12 @@ class OttoGodblessedDialogue(player: Player? = null) : DialoguePlugin(player) { override fun handle(interfaceId: Int, buttonId: Int): Boolean { when (stage) { - -1 -> options("Ask about hastas","Ask about barbarian training").also { stage++ } + -1 -> options("Ask about barbarian training", "Nevermind.").also { stage++ } 0 -> when(buttonId){ - 1 -> player("Can you help me with Zamorakian weapons?").also { stage++ } - 2 -> player("Is there anything you can teach me?").also { stage = 20 } + 1 -> player("Is there anything you can teach me?").also { stage = 20 } + 2 -> stage = END_DIALOGUE } - 1 -> { - npc("Yes, I can convert a Zamorakian spear into a hasta.", "The spirits require me to request 300,000 coins from", "you for this service.") - stage = 2 - } - 2 -> { - interpreter.sendOptions("Select an Option", "Spear into hasta", "Hasta back to spear") - stage = 3 - } - 3 -> when (buttonId) { - 1 -> if (player.inventory.contains(11716, 1) && player.inventory.contains(995, 300000)) { - interpreter.sendOptions("Convert your spear?", "Yes", "No") - stage = 4 - } else { - player.sendMessage("You need a Zamorakian Spear and 300,000 coins to proceed.") - end() - } - 2 -> if (player.inventory.contains(14662, 1)) { - interpreter.sendOptions("Revert back to spear?", "Yes", "No") - stage = 5 - } else { - player.sendMessage("You need a Zamorakian Hasta to proceed.") - end() - } - } - 4 -> when (buttonId) { - 1 -> if (player.inventory.remove(Item(11716, 1), Item(995, 300000))) { - player.inventory.add(Item(14662)) - interpreter.sendItemMessage(14662, "Otto converts your spear into a hasta.") - stage = 6 - } else { - end() - } - 2 -> end() - } - 5 -> when (buttonId) { - 1 -> if (player.inventory.remove(Item(14662, 1))) { - player.inventory.add(Item(11716)) - interpreter.sendItemMessage(11716, "Otto converts your hasta back into a spear.") - stage = 6 - } else { - end() - } - 2 -> end() - } - 6 -> end() + 20 -> npc("I can teach you how to fish.").also { stage++ } 21 -> player("Oh, that's pretty underwhelming. But uhhh, okay!").also { stage++ } From 55151cc72f49cf097e7dfa0d127b5554b67981cf Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 16:37:43 -0500 Subject: [PATCH 07/17] Wells nerfed --- .../item/withobject/WaterSourcePlugin.java | 5 +++++ Server/src/main/kotlin/api/ContentAPI.kt | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java b/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java index 9cae233b0..4d1f9377f 100644 --- a/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java +++ b/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java @@ -1,5 +1,6 @@ package core.game.interaction.item.withobject; +import api.ContentAPI; import core.plugin.Initializable; import org.rs09.consts.Items; import core.game.interaction.NodeUsageEvent; @@ -11,6 +12,7 @@ import core.game.node.object.Scenery; import core.game.system.task.Pulse; import core.game.world.update.flag.context.Animation; import core.plugin.Plugin; +import rs09.game.system.SystemLogger; /** * Represents the plugin used to fill a bucket. @@ -40,6 +42,9 @@ public final class WaterSourcePlugin extends UseWithHandler { @Override public Plugin newInstance(Object arg) throws Throwable { for (int i : OBJECTS) { + if(ContentAPI.sceneryDefinition(i).getName().toLowerCase().contains("well")){ + continue; + } addHandler(i, OBJECT_TYPE, this); } return this; diff --git a/Server/src/main/kotlin/api/ContentAPI.kt b/Server/src/main/kotlin/api/ContentAPI.kt index b04703066..28dcd8de0 100644 --- a/Server/src/main/kotlin/api/ContentAPI.kt +++ b/Server/src/main/kotlin/api/ContentAPI.kt @@ -1,6 +1,7 @@ package api import core.cache.def.impl.ItemDefinition +import core.cache.def.impl.SceneryDefinition import core.game.component.Component import core.game.content.dialogue.FacialExpression import core.game.node.Node @@ -994,4 +995,14 @@ object ContentAPI { fun getQP(player: Player): Int{ return player.questRepository.points } + + /** + * Gets a scenery definition from the given ID + * @param id the ID of the scenery to get the definition for. + * @return the scenery definition + */ + @JvmStatic + fun sceneryDefinition(id: Int): SceneryDefinition{ + return SceneryDefinition.forId(id) + } } \ No newline at end of file From d5999f6cc0d5dfa6a5624e74ed0d0f9e8dd5e475 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 16:48:18 -0500 Subject: [PATCH 08/17] Dialogue system go brrr --- .../rs09/game/content/dialogue/OttoGodblessedDialogue.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt b/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt index 2ffa73949..3487805fa 100644 --- a/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt +++ b/Server/src/main/kotlin/rs09/game/content/dialogue/OttoGodblessedDialogue.kt @@ -36,9 +36,11 @@ class OttoGodblessedDialogue(player: Player? = null) : DialoguePlugin(player) { -1 -> options("Ask about barbarian training", "Nevermind.").also { stage++ } 0 -> when(buttonId){ 1 -> player("Is there anything you can teach me?").also { stage = 20 } - 2 -> stage = END_DIALOGUE + 2 -> stage++ } + 1 -> stage = END_DIALOGUE + 20 -> npc("I can teach you how to fish.").also { stage++ } 21 -> player("Oh, that's pretty underwhelming. But uhhh, okay!").also { stage++ } From b371e3b16926beb1fc908b0b7a3a3249afd567b3 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Thu, 1 Jul 2021 22:46:25 +0000 Subject: [PATCH 09/17] Fix bonegrinder --- .../java/core/game/content/global/Bones.java | 152 ------------------ .../java/core/game/content/global/Bones.kt | 146 +++++++++++++++++ 2 files changed, 146 insertions(+), 152 deletions(-) delete mode 100644 Server/src/main/java/core/game/content/global/Bones.java create mode 100644 Server/src/main/java/core/game/content/global/Bones.kt diff --git a/Server/src/main/java/core/game/content/global/Bones.java b/Server/src/main/java/core/game/content/global/Bones.java deleted file mode 100644 index fc29a2b64..000000000 --- a/Server/src/main/java/core/game/content/global/Bones.java +++ /dev/null @@ -1,152 +0,0 @@ -package core.game.content.global; - -import core.game.node.item.Item; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * Represents the type of bones. - * @author Apache Ah64 - */ -public enum Bones { - - BONES(2530, 4.5), - BONES_2(526,4.5), - WOLF_BONES(2859, 4.5), - BURNST_BONES(528, 4.5), - MONKEY_BONES(3183, 5), - MONKEY_BONES2(3179, 5), - BAT_BONES(530, 5.3), - BIG_BONES(532, 15), - JOGRE_BONES(3125, 15), - ZOGRE_BONES(4812, 12.5), - SHAIKAHAN_BONES(3123, 25), - BABY_DRAGON_BONES(534, 30), - WYVERN_BONES(6812, 50), - DRAGON_BONES(536, 72), - FAYRG(4830, 84), - RAURG_BONES(4832, 96), - DAGANNOTH(6729, 125), - OURG_BONES(4834, 140), - LAVA_DRAGON_BONES(14693, 85); - - /** - * Holds all bones. - */ - private static HashMap bones = new HashMap(); - - - /** - * The bone item id. - */ - private int itemId; - - /** - * The experience given by burying the bone. - */ - private double experience; - - /** - * Construct a new {@code Bones} {@code Object}. - * @param itemId The item id. - * @param experience The experience given by burying the bone. - */ - private Bones(int itemId, double experience) { - this.itemId = itemId; - this.experience = experience; - } - - /** - * Gets the bone meal item. - * @return the item. - */ - public Item getBoneMeal() { - return new Item(4255 + ordinal()); - } - - /** - * Get the bone experience given when you bury the bone. - * @return The experience. - */ - public double getExperience() { - return experience; - } - - public int getItemId() { - return itemId; - } - - /** - * Gets the bones for the bone meal. - * @param itemId the item. - * @return the bones. - */ - public static Bones forBoneMeal(int itemId) { - for (Bones bone : Bones.values()) { - if (bone.getBoneMeal().getId() == itemId) { - return bone; - } - } - return null; - } - - /** - * Gets the config value for the bone. - * @param value the value. - * @param hopper hopper. - * @return {@code True} if so. - */ - public static Bones forConfigValue(int value, boolean hopper) { - for (Bones bone : Bones.values()) { - if (bone.getConfigValue(hopper) == value) { - return bone; - } - } - return null; - } - - /** - * Gets the config value for the bone type. - * @param hopper the hopper. - * @return the value. - */ - public int getConfigValue(boolean hopper) { - return (this == BONES_2 ? ordinal() : ordinal() - 1) | (hopper ? 4 : 8) << 16; - } - - /** - * Gets the bone ids. - * @return the ids. - */ - public static int[] getArray() { - List list = new ArrayList<>(20); - for (int i : bones.keySet()) { - list.add(i); - } - int[] array = new int[list.size()]; - for (int i = 0; i < list.size(); i++) { - array[i] = list.get(i); - } - return array; - } - - /** - * Get the bone. - * @param itemId The item id. - * @return The bone. - */ - public static Bones forId(int itemId) { - return bones.get(itemId); - } - - /** - * Construct the bones. - */ - static { - for (Bones bone : Bones.values()) { - bones.put(bone.itemId, bone); - } - } -} \ No newline at end of file diff --git a/Server/src/main/java/core/game/content/global/Bones.kt b/Server/src/main/java/core/game/content/global/Bones.kt new file mode 100644 index 000000000..8bdb2f183 --- /dev/null +++ b/Server/src/main/java/core/game/content/global/Bones.kt @@ -0,0 +1,146 @@ +package core.game.content.global + +import core.game.content.global.Bones +import core.game.node.item.Item +import java.util.ArrayList +import java.util.HashMap + +/** + * Represents the type of bones. + * @author Apache Ah64 + */ +enum class Bones +/** + * Construct a new `Bones` `Object`. + * @param itemId The item id. + * @param experience The experience given by burying the bone. + */( + /** + * The bone item id. + */ + val itemId: Int, + /** + * The experience given by burying the bone. + */ + val experience: Double) { + BONES(2530, 4.5), + BONES_2(526, 4.5), + WOLF_BONES(2859, 4.5), + BURNST_BONES(528, 4.5), + MONKEY_BONES(3183, 5.0), + MONKEY_BONES2(3179, 5.0), + BAT_BONES(530, 5.3), + BIG_BONES(532, 15.0), + JOGRE_BONES(3125, 15.0), + ZOGRE_BONES(4812, 12.5), + SHAIKAHAN_BONES(3123, 25.0), + BABY_DRAGON_BONES(534, 30.0), + WYVERN_BONES(6812, 50.0), + DRAGON_BONES(536, 72.0), + FAYRG(4830, 84.0), + RAURG_BONES(4832, 96.0), + DAGANNOTH(6729, 125.0), + OURG_BONES(4834, 140.0), + LAVA_DRAGON_BONES(14693, 85.0); + /** + * Get the bone experience given when you bury the bone. + * @return The experience. + */ + + /** + * Gets the bone meal item. + * @return the item. + */ + val boneMeal: Item + get() { + return when(this){ + FAYRG -> Item(4852) + RAURG_BONES -> Item(4853) + OURG_BONES -> Item(4854) + else -> Item(4255 + ordinal) + } + } + + /** + * Gets the config value for the bone type. + * @param hopper the hopper. + * @return the value. + */ + fun getConfigValue(hopper: Boolean): Int { + return (if (this == BONES_2) ordinal else ordinal - 1) or (if (hopper) 4 else 8) shl 16 + } + + companion object { + /** + * Holds all bones. + */ + private val bones = HashMap() + + /** + * Gets the bones for the bone meal. + * @param itemId the item. + * @return the bones. + */ + @JvmStatic + fun forBoneMeal(itemId: Int): Bones? { + for (bone in values()) { + if (bone.boneMeal.id == itemId) { + return bone + } + } + return null + } + + /** + * Gets the config value for the bone. + * @param value the value. + * @param hopper hopper. + * @return `True` if so. + */ + @JvmStatic + fun forConfigValue(value: Int, hopper: Boolean): Bones? { + for (bone in values()) { + if (bone.getConfigValue(hopper) == value) { + return bone + } + } + return null + } + + /** + * Gets the bone ids. + * @return the ids. + */ + val array: IntArray + @JvmStatic get() { + val list: MutableList = ArrayList(20) + for (i in bones.keys) { + list.add(i) + } + val array = IntArray(list.size) + for (i in list.indices) { + array[i] = list[i] + } + return array + } + + /** + * Get the bone. + * @param itemId The item id. + * @return The bone. + */ + @JvmStatic + fun forId(itemId: Int): Bones? { + return bones[itemId] + } + + /** + * Construct the bones. + */ + init { + for (bone in values()) { + bones[bone.itemId] = bone + } + } + } +} \ No newline at end of file From a42ae7d0255739e07fd3de3332d81b859ac7fd35 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 18:16:23 -0500 Subject: [PATCH 10/17] Add daily restart functionality --- .../src/main/kotlin/rs09/ServerConstants.kt | 7 +++++ .../kotlin/rs09/worker/MajorUpdateWorker.kt | 27 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/Server/src/main/kotlin/rs09/ServerConstants.kt b/Server/src/main/kotlin/rs09/ServerConstants.kt index a2082b60d..35c1d5c83 100644 --- a/Server/src/main/kotlin/rs09/ServerConstants.kt +++ b/Server/src/main/kotlin/rs09/ServerConstants.kt @@ -173,6 +173,9 @@ class ServerConstants { @JvmField var MODULUS = BigInteger("96982303379631821170939875058071478695026608406924780574168393250855797534862289546229721580153879336741968220328805101128831071152160922518190059946555203865621183480223212969502122536662721687753974815205744569357388338433981424032996046420057284324856368815997832596174397728134370577184183004453899764051") + @JvmField + var DAILY_RESTART = false + /** * Parses a JSONObject and retrieves the values for all settings in this file. * @author Ceikry @@ -211,6 +214,10 @@ class ServerConstants { DATABASE_PORT = data["database_port"].toString() DATABASE = Database(DATABASE_ADDRESS, DATABASE_NAME, DATABASE_USER, DATABASE_PASS) + + if(data.containsKey("daily_restart")){ + DAILY_RESTART = data["daily_restart"] as Boolean + } } } } \ No newline at end of file diff --git a/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt b/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt index 13929fd2f..05a2eea46 100644 --- a/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt +++ b/Server/src/main/kotlin/rs09/worker/MajorUpdateWorker.kt @@ -1,14 +1,22 @@ package rs09.worker +import api.ContentAPI +import core.game.system.SystemManager +import core.game.system.SystemState import core.game.system.task.Pulse import core.plugin.CorePluginTypes.Managers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.delay import kotlinx.coroutines.launch import rs09.Server +import rs09.ServerConstants import rs09.game.world.GameWorld import rs09.game.world.repository.Repository import rs09.game.world.update.UpdateSequence +import rs09.tools.stringtools.colorize +import java.text.SimpleDateFormat +import java.util.* +import kotlin.collections.ArrayList /** * Handles the running of pulses and writing of masks, etc @@ -17,6 +25,7 @@ import rs09.game.world.update.UpdateSequence class MajorUpdateWorker { var started = false val sequence = UpdateSequence() + val sdf = SimpleDateFormat("HH") fun start() = GlobalScope.launch { started = true while(true){ @@ -46,6 +55,24 @@ class MajorUpdateWorker { //tick all manager plugins Managers.tick() Server.heartbeat() + + //Handle daily restart if enabled + if(ServerConstants.DAILY_RESTART && sdf.format(Date()).toInt() == 0){ + Repository.sendNews(colorize("%RSERVER GOING DOWN FOR DAILY RESTART IN 5 MINUTES!")) + ServerConstants.DAILY_RESTART = false + ContentAPI.submitWorldPulse(object : Pulse(100) { + var counter = 0 + override fun pulse(): Boolean { + counter++ + if(counter == 5){ + SystemManager.flag(SystemState.TERMINATED) + return true + } + Repository.sendNews(colorize("%RSERVER GOING DOWN FOR DAILY RESTART IN ${5 - counter} MINUTE${if(counter < 4) "S" else ""}!")) + return false + } + }) + } } } } \ No newline at end of file From c9f854458f44993b53bde86f52491d4124269aa8 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 18:41:52 -0500 Subject: [PATCH 11/17] Added the hat meme --- .../interaction/item/withobject/HatStand.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Server/src/main/kotlin/rs09/game/interaction/item/withobject/HatStand.kt diff --git a/Server/src/main/kotlin/rs09/game/interaction/item/withobject/HatStand.kt b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/HatStand.kt new file mode 100644 index 000000000..72603cd32 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/interaction/item/withobject/HatStand.kt @@ -0,0 +1,20 @@ +package rs09.game.interaction.item.withobject + +import api.ContentAPI +import api.EquipmentSlot +import core.cache.def.impl.ItemDefinition +import rs09.game.interaction.InteractionListener +import rs09.game.system.SystemLogger + +class HatStand : InteractionListener() { + + val hats = ItemDefinition.getDefinitions().values.filter { it.getConfiguration("equipment_slot",0) == EquipmentSlot.HAT.ordinal }.map { it.id }.toIntArray() + val hat_stand = 374 + + override fun defineListeners() { + onUseWith(SCENERY, hats, hat_stand){player, used, with -> + ContentAPI.sendDialogue(player, "It'd probably fall off if I tried to do that.") + return@onUseWith true + } + } +} \ No newline at end of file From d06647ec0b0c5d84eebb3a73db2fc1d5522fdf6b Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 19:04:20 -0500 Subject: [PATCH 12/17] Fix bone -> altar exploit --- .../skill/construction/decoration/chapel/BoneOfferPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/src/main/java/core/game/node/entity/skill/construction/decoration/chapel/BoneOfferPlugin.java b/Server/src/main/java/core/game/node/entity/skill/construction/decoration/chapel/BoneOfferPlugin.java index 57a7dced9..8cccb5592 100644 --- a/Server/src/main/java/core/game/node/entity/skill/construction/decoration/chapel/BoneOfferPlugin.java +++ b/Server/src/main/java/core/game/node/entity/skill/construction/decoration/chapel/BoneOfferPlugin.java @@ -1,6 +1,7 @@ package core.game.node.entity.skill.construction.decoration.chapel; +import api.ContentAPI; import core.cache.def.impl.SceneryDefinition; import core.game.content.global.Bones; import core.game.node.entity.skill.Skills; @@ -86,7 +87,7 @@ public class BoneOfferPlugin extends UseWithHandler { return; } final Location start = player.getLocation(); - GameWorld.getPulser().submit(new Pulse(1) { + ContentAPI.submitIndividualPulse(player, new Pulse(1) { int counter = 0; @Override From 2545f1acdc64e78489106801f15abb48b739a981 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 20:02:37 -0500 Subject: [PATCH 13/17] Add handling for wizard's guild portals --- .../interaction/object/WizardGuildPortals.kt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Server/src/main/kotlin/rs09/game/interaction/object/WizardGuildPortals.kt diff --git a/Server/src/main/kotlin/rs09/game/interaction/object/WizardGuildPortals.kt b/Server/src/main/kotlin/rs09/game/interaction/object/WizardGuildPortals.kt new file mode 100644 index 000000000..d12e0e634 --- /dev/null +++ b/Server/src/main/kotlin/rs09/game/interaction/object/WizardGuildPortals.kt @@ -0,0 +1,29 @@ +package rs09.game.interaction.`object` + +import api.ContentAPI +import core.game.world.map.Location +import rs09.game.interaction.InteractionListener + +class WizardGuildPortals : InteractionListener() { + + val WTOWER_PORTAL = 2156 + val DWTOWER_PORTAL = 2157 + val SORC_TOWER_PORTAL = 2158 + + override fun defineListeners() { + on(WTOWER_PORTAL, SCENERY, "enter"){player, _ -> + ContentAPI.teleport(player, Location.create(3114, 3171, 0)) + return@on true + } + + on(DWTOWER_PORTAL, SCENERY, "enter"){player, _ -> + ContentAPI.teleport(player, Location.create(2916, 3335, 0)) + return@on true + } + + on(SORC_TOWER_PORTAL, SCENERY, "enter"){player, _ -> + ContentAPI.teleport(player, Location.create(2701, 3395, 0)) + return@on true + } + } +} \ No newline at end of file From 3529dfc7916ca553b9b94b764e2136baaf5cda8f Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 20:12:57 -0500 Subject: [PATCH 14/17] Geese can now move on water --- Server/data/configs/npc_configs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/data/configs/npc_configs.json b/Server/data/configs/npc_configs.json index c606ab41b..8cf86f417 100644 --- a/Server/data/configs/npc_configs.json +++ b/Server/data/configs/npc_configs.json @@ -30631,7 +30631,8 @@ "strength_level": "1", "id": "3296", "range_level": "1", - "attack_level": "1" + "attack_level": "1", + "water_npc": true, }, { "examine": "Keeps this magic area tidy.", From 53e4dbd3918d8d52a8bc104bc6f58cdfe9779f46 Mon Sep 17 00:00:00 2001 From: Von Hresvelg Date: Thu, 1 Jul 2021 21:16:24 -0400 Subject: [PATCH 15/17] Updated General Graardor Drop Table (Authentic) --- Server/data/configs/drop_tables.json | 306 ++++++++++++--------------- 1 file changed, 132 insertions(+), 174 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index 199bf1000..8cd30ce40 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -52079,199 +52079,157 @@ "main": [ { "minAmount": "1", - "weight": "500.0", - "id": "1319", + "weight": "25.0", + "id": "1289", "maxAmount": "1" }, { "minAmount": "1", - "weight": "200.0", - "id": "224", - "maxAmount": "36" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "6050", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "100.0", - "id": "6052", - "maxAmount": "16" - }, - { - "minAmount": "1", - "weight": "200.0", - "id": "244", - "maxAmount": "40" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "246", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "3139", - "maxAmount": "40" - }, - { - "minAmount": "1", - "weight": "150.0", - "id": "248", - "maxAmount": "32" - }, - { - "minAmount": "1", - "weight": "100.0", - "id": "6694", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "125.0", - "id": "6019", - "maxAmount": "24" - }, - { - "minAmount": "1", - "weight": "250.0", + "weight": "25.0", "id": "1303", "maxAmount": "1" }, { "minAmount": "1", - "weight": "250.0", - "id": "1275", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "500.0", - "id": "1127", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "16.0", - "id": "11724", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "16.0", - "id": "11726", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "19.0", - "id": "11728", - "maxAmount": "1" - }, - { - "minAmount": "60", - "weight": "250.0", - "id": "561", - "maxAmount": "70" - }, - { - "minAmount": "15", - "weight": "500.0", - "id": "450", - "maxAmount": "20" - }, - { - "minAmount": "115", - "weight": "500.0", - "id": "454", - "maxAmount": "120" - }, - { - "minAmount": "19902", - "weight": "500.0", - "id": "995", - "maxAmount": "21000" - }, - { - "minAmount": "1", - "weight": "500.0", - "id": "5300", - "maxAmount": "1" - }, - { - "minAmount": "15", - "weight": "250.0", - "id": "1514", - "maxAmount": "20" - }, - { - "minAmount": "3", - "weight": "250.0", - "id": "3024", - "maxAmount": "3" - }, - { - "minAmount": "3", - "weight": "250.0", - "id": "3052", - "maxAmount": "3" - }, - { - "minAmount": "1", - "weight": "250.0", - "id": "10976", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "1.0", - "id": "10977", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "8.0", - "id": "11710", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "8.0", - "id": "11712", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "8.0", - "id": "11714", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "12.0", - "id": "11704", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "10.0", - "id": "2741", + "weight": "25.0", + "id": "1373", "maxAmount": "1" }, { "minAmount": "1", "weight": "50.0", + "id": "1319", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "50.0", + "id": "1127", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "1275", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "2.1", + "id": "11724", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "2.1", + "id": "11726", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "2.1", + "id": "11728", + "maxAmount": "1" + }, + { + "minAmount": "40", + "weight": "50.0", + "id": "561", + "maxAmount": "70" + }, + { + "minAmount": "115", + "weight": "25.0", + "id": "454", + "maxAmount": "120" + }, + { + "minAmount": "15", + "weight": "25.0", + "id": "450", + "maxAmount": "20" + }, + { + "minAmount": "3000", + "weight": "50.0", + "id": "995", + "maxAmount": "21000" + }, + { + "minAmount": "1", + "weight": "50.0", + "id": "5300", + "maxAmount": "1" + }, + { + "minAmount": "15", + "weight": "25.0", + "id": "1514", + "maxAmount": "20" + }, + { + "minAmount": "3", + "weight": "25.0", + "id": "3024", + "maxAmount": "3" + }, + { + "minAmount": "3", + "weight": "25.0", + "id": "3052", + "maxAmount": "3" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "10976", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "8.0", + "id": "10977", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.0", + "id": "11710", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.0", + "id": "11712", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.0", + "id": "11714", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "1.25", + "id": "11704", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "2741", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", "id": "31", "maxAmount": "1" }, { "minAmount": "1", - "weight": "100.0", + "weight": "75.0", "id": "0", "maxAmount": "1" } From d24cdf0b38f4abfc386eb9addbe1402ed50dd881 Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 20:34:49 -0500 Subject: [PATCH 16/17] Fixed droptable bug with npcs in the wilderness --- .../core/game/world/map/zone/impl/WildernessZone.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Server/src/main/java/core/game/world/map/zone/impl/WildernessZone.java b/Server/src/main/java/core/game/world/map/zone/impl/WildernessZone.java index 507ef5cad..36973173d 100644 --- a/Server/src/main/java/core/game/world/map/zone/impl/WildernessZone.java +++ b/Server/src/main/java/core/game/world/map/zone/impl/WildernessZone.java @@ -172,10 +172,6 @@ public final class WildernessZone extends MapZone { GroundItemManager.create(reward, e.asNpc().getDropLocation(), killer.asPlayer()); Repository.sendNews(killer.getUsername() + " has received " + reward.getName().toLowerCase() + " from a " + e.asNpc().getName() + "!"); } - e.asNpc().getDefinition().getDropTables().drop(e.asNpc(), killer); - if (((NPC) e).getTask() != null && ((Player) killer).getSlayer().getTask() == e.asNpc().getTask()) { - ((Player) killer).getSlayer().finalizeDeath(killer.asPlayer(), e.asNpc()); - } int combatLevel = e.asNpc().getDefinition().getCombatLevel(); int dropRate = getNewDropRate(combatLevel); @@ -196,6 +192,10 @@ public final class WildernessZone extends MapZone { } if (e instanceof NPC) { + e.asNpc().getDefinition().getDropTables().drop(e.asNpc(), killer); + if (((NPC) e).getTask() != null && ((Player) killer).getSlayer().getTask() == e.asNpc().getTask()) { + ((Player) killer).getSlayer().finalizeDeath(killer.asPlayer(), e.asNpc()); + } e.asNpc().setRespawnTick(GameWorld.getTicks() + e.asNpc().getDefinition().getConfiguration(NPCConfigParser.RESPAWN_DELAY, 17)); if (!e.asNpc().isRespawn()) { e.asNpc().clear(); From 96e6a3162f1788528b2dd63f9686580546b1faae Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 20:51:24 -0500 Subject: [PATCH 17/17] Chocolate bar now grindable by pestle and mortar as well as knife --- .../java/core/game/node/entity/skill/herblore/GrindingItem.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Server/src/main/java/core/game/node/entity/skill/herblore/GrindingItem.java b/Server/src/main/java/core/game/node/entity/skill/herblore/GrindingItem.java index e7278fce4..df50f81ca 100644 --- a/Server/src/main/java/core/game/node/entity/skill/herblore/GrindingItem.java +++ b/Server/src/main/java/core/game/node/entity/skill/herblore/GrindingItem.java @@ -23,6 +23,7 @@ public enum GrindingItem { GARLIC(new Item[] { new Item(1550) }, new Item(4668)), DRAGON_SCALE(new Item[] { new Item(243) }, new Item(241)), ANCHOVIES(new Item[] { new Item(319) }, new Item(11266)), + CHOCOLATE_BAR(new Item[] {new Item(Items.CHOCOLATE_BAR_1973)}, new Item(Items.CHOCOLATE_DUST_1975)), GUAM_LEAF(new Item[] { new Item(Items.CLEAN_GUAM_249) }, new Item(Items.GROUND_GUAM_6681)); /**