From 506608329b8740b916f6357c4561e10b6854de62 Mon Sep 17 00:00:00 2001 From: ceikry Date: Fri, 25 Jun 2021 17:33:38 -0500 Subject: [PATCH 1/4] Remove filthy void knight purchase option --- .../reward/VoidKnightDialogue.java | 52 +------------------ Server/src/main/kotlin/api/ContentAPI.kt | 16 ++++++ 2 files changed, 17 insertions(+), 51 deletions(-) diff --git a/Server/src/main/java/core/game/content/activity/pestcontrol/reward/VoidKnightDialogue.java b/Server/src/main/java/core/game/content/activity/pestcontrol/reward/VoidKnightDialogue.java index 3e46c1813..1675b49c9 100644 --- a/Server/src/main/java/core/game/content/activity/pestcontrol/reward/VoidKnightDialogue.java +++ b/Server/src/main/java/core/game/content/activity/pestcontrol/reward/VoidKnightDialogue.java @@ -61,8 +61,7 @@ public final class VoidKnightDialogue extends DialoguePlugin { public boolean handle(int interfaceId, int buttonId) { switch (stage) { case 0: - options("Who are you?", "What is this place?", - "Ask about Penance gear.", "I'm fine thanks."); + options("Who are you?", "What is this place?", "I'm fine thanks."); stage = 1; break; case 1: @@ -76,10 +75,6 @@ public final class VoidKnightDialogue extends DialoguePlugin { stage = 20; break; case 3: - player("I'd like to see your available Penance gear."); - stage = 40; - break; - case 4: player("I'm fine thanks."); stage = 30; break; @@ -242,51 +237,6 @@ public final class VoidKnightDialogue extends DialoguePlugin { case 30: end(); break; - case 40: - npc("How did you know we were supplying that kind of stuff?", - "*sigh* Well, I suppose I can help you out.", - "Here's what I have in stock."); - stage = 41; - break; - case 41: - interpreter.sendOptions("Select an Option", "Fighter Torso", - "Fighter Hat", "Ranger Hat", "Runner Hat", "Healer Hat"); - stage = 42; - break; - case 42: - switch (buttonId) { - case 1: - npc("You've taken an interest in the Fighter Torso I have", - "in stock. That'll cost one hundred and fifty points."); - reward = new Item(10551); - stage = 43; - break; - case 2: - npc("You've taken an interest in the Fighter Hat I have", - "in stock. That'll cost one hundred and fifty points."); - reward = new Item(10548); - stage = 43; - break; - case 3: - npc("You've taken an interest in the Ranger Hat I have", - "in stock. That'll cost one hundred and fifty points."); - reward = new Item(10550); - stage = 43; - break; - case 4: - npc("You've taken an interest in the Runner Hat I have", - "in stock. That'll cost one hundred and fifty points."); - reward = new Item(10549); - stage = 43; - break; - case 5: - npc("You've taken an interest in the Healer Hat I have", - "in stock. That'll cost one hundred and fifty points."); - reward = new Item(10547); - stage = 43; - break; - } - break; case 43: if (player.getSavedData().getActivityData().getPestPoints() < 150) { player("I don't have that many points at the moment."); diff --git a/Server/src/main/kotlin/api/ContentAPI.kt b/Server/src/main/kotlin/api/ContentAPI.kt index 1ebd8d57d..7a185f1f6 100644 --- a/Server/src/main/kotlin/api/ContentAPI.kt +++ b/Server/src/main/kotlin/api/ContentAPI.kt @@ -944,4 +944,20 @@ object ContentAPI { player.dialogueInterpreter.sendInput(!numeric, prompt) player.setAttribute("runscript",handler) //Handled in RunScriptPacketHandler } + + /** + * Forces an NPC to "flee" from a player or other entity + * @param entity the entity to make flee + * @param from the entity to flee from + */ + @JvmStatic + fun flee(entity: Entity, from: Entity){ + lock(entity, 5) + face(entity, from, 5) + + val diffX = entity.location.x - from.location.x + val diffY = entity.location.y - from.location.y + + forceWalk(entity, entity.location.transform(diffX,diffY,0), "DUMB") + } } \ No newline at end of file From 4e5a1c3cb70b4b76f738894faa324f702acf17a0 Mon Sep 17 00:00:00 2001 From: Von Hresvelg Date: Fri, 25 Jun 2021 23:01:17 +0000 Subject: [PATCH 2/4] Updated Iron Dragon Drop Table (Authentic) --- Server/data/configs/drop_tables.json | 160 ++++++--------------------- 1 file changed, 32 insertions(+), 128 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index 9ae2e0107..2e262fb6a 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -24321,8 +24321,14 @@ }, { "minAmount": "1", - "weight": "5.0", - "id": "1359", + "weight": "25.0", + "id": "1183", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", + "id": "1199", "maxAmount": "1" }, { @@ -24331,30 +24337,6 @@ "id": "1432", "maxAmount": "1" }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1303", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1373", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1319", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "25.0", - "id": "1183", - "maxAmount": "1" - }, { "minAmount": "1", "weight": "5.0", @@ -24369,40 +24351,28 @@ }, { "minAmount": "1", - "weight": "5.0", - "id": "1185", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", - "id": "1201", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "0.75", + "weight": "0.7", "id": "4585", "maxAmount": "1" }, { "minAmount": "1", - "weight": "0.75", + "weight": "0.7", "id": "4087", "maxAmount": "1" }, - { - "minAmount": "4", - "weight": "50.0", - "id": "830", - "maxAmount": "8" - }, { "minAmount": "2", "weight": "25.0", "id": "9143", "maxAmount": "12" }, + { + "minAmount": "2", + "weight": "25.0", + "id": "9144", + "maxAmount": "12" + }, { "minAmount": "9", "weight": "25.0", @@ -24410,32 +24380,20 @@ "maxAmount": "9" }, { - "minAmount": "1", + "minAmount": "5", "weight": "25.0", "id": "868", - "maxAmount": "7" - }, - { - "minAmount": "150", - "weight": "5.0", - "id": "886", - "maxAmount": "150" - }, - { - "minAmount": "2", - "weight": "5.0", - "id": "9144", - "maxAmount": "2" - }, - { - "minAmount": "4", - "weight": "5.0", - "id": "9144", - "maxAmount": "4" + "maxAmount": "5" }, { "minAmount": "15", - "weight": "50.0", + "weight": "25.0", + "id": "560", + "maxAmount": "15" + }, + { + "minAmount": "15", + "weight": "25.0", "id": "565", "maxAmount": "15" }, @@ -24443,49 +24401,7 @@ "minAmount": "3", "weight": "25.0", "id": "566", - "maxAmount": "5" - }, - { - "minAmount": "15", - "weight": "5.0", - "id": "560", - "maxAmount": "15" - }, - { - "minAmount": "45", - "weight": "5.0", - "id": "560", - "maxAmount": "45" - }, - { - "minAmount": "25", - "weight": "5.0", - "id": "562", - "maxAmount": "25" - }, - { - "minAmount": "50", - "weight": "5.0", - "id": "562", - "maxAmount": "50" - }, - { - "minAmount": "60", - "weight": "5.0", - "id": "561", - "maxAmount": "79" - }, - { - "minAmount": "45", - "weight": "5.0", - "id": "563", - "maxAmount": "45" - }, - { - "minAmount": "90", - "weight": "5.0", - "id": "563", - "maxAmount": "90" + "maxAmount": "3" }, { "minAmount": "2", @@ -24495,13 +24411,7 @@ }, { "minAmount": "1", - "weight": "5.0", - "id": "2363", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "50.0", + "weight": "25.0", "id": "161", "maxAmount": "1" }, @@ -24514,7 +24424,7 @@ { "minAmount": "1", "weight": "5.0", - "id": "2442", + "id": "165", "maxAmount": "1" }, { @@ -24533,7 +24443,7 @@ "minAmount": "1", "weight": "25.0", "id": "2011", - "maxAmount": "2" + "maxAmount": "1" }, { "minAmount": "1", @@ -24549,25 +24459,19 @@ }, { "minAmount": "1", - "weight": "1.0", - "id": "995", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "5.0", + "weight": "17.5", "id": "31", "maxAmount": "1" }, { "minAmount": "1", - "weight": "0.1", + "weight": "0.14", "id": "11286", "maxAmount": "1" }, { "minAmount": "1", - "weight": "100.0", + "weight": "150.0", "id": "0", "maxAmount": "1" } From 4fb5d417ec7bb6374ccf881f9e74c944f9c3aac8 Mon Sep 17 00:00:00 2001 From: ceikry Date: Fri, 25 Jun 2021 19:11:22 -0500 Subject: [PATCH 3/4] Fixed wilderness teleport bug --- .../rs09/game/node/entity/skill/magic/LunarListeners.kt | 9 +++++---- .../rs09/game/node/entity/skill/magic/ModernListeners.kt | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/LunarListeners.kt b/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/LunarListeners.kt index 9856c94b8..783e86836 100644 --- a/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/LunarListeners.kt +++ b/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/LunarListeners.kt @@ -232,10 +232,11 @@ class LunarListeners : SpellListener("lunar") { player.sendMessage("A magical force prevents you from teleporting.") return } - player.teleporter.send(loc,TeleportManager.TeleportType.LUNAR) - addXP(player,xp) - removeRunes(player) - setDelay(player,true) + if(player.teleporter.send(loc,TeleportManager.TeleportType.LUNAR)) { + addXP(player, xp) + removeRunes(player) + setDelay(player, true) + } } fun sendGroupTeleport(player: Player,xp: Double,destName: String,loc: Location){ diff --git a/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/ModernListeners.kt b/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/ModernListeners.kt index aaecd3b68..5cd662e4a 100644 --- a/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/ModernListeners.kt +++ b/Server/src/main/kotlin/rs09/game/node/entity/skill/magic/ModernListeners.kt @@ -247,10 +247,11 @@ class ModernListeners : SpellListener("modern"){ player.sendMessage("A magical force prevents you from teleporting.") return } - player.teleporter.send(location,TeleportManager.TeleportType.NORMAL) - removeRunes(player) - addXP(player,xp) - setDelay(player,true) + if(player.teleporter.send(location,TeleportManager.TeleportType.NORMAL)) { + removeRunes(player) + addXP(player, xp) + setDelay(player, true) + } } private fun attemptHouseTeleport(player: Player){ From 38c3821cac550310651c413d1572aa3b7e96ba55 Mon Sep 17 00:00:00 2001 From: Von Hresvelg Date: Sat, 26 Jun 2021 00:46:53 +0000 Subject: [PATCH 4/4] Revised Steel Dragon Drop Table (Authentic) --- Server/data/configs/drop_tables.json | 138 ++++++++++++++++----------- 1 file changed, 84 insertions(+), 54 deletions(-) diff --git a/Server/data/configs/drop_tables.json b/Server/data/configs/drop_tables.json index 2e262fb6a..5e6b6a193 100644 --- a/Server/data/configs/drop_tables.json +++ b/Server/data/configs/drop_tables.json @@ -24523,20 +24523,26 @@ "main": [ { "minAmount": "1", - "weight": "50.0", + "weight": "25.0", + "id": "1317", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "25.0", "id": "1371", "maxAmount": "1" }, { "minAmount": "1", "weight": "25.0", - "id": "1359", + "id": "1357", "maxAmount": "1" }, { "minAmount": "1", - "weight": "50.0", - "id": "1432", + "weight": "25.0", + "id": "1183", "maxAmount": "1" }, { @@ -24548,50 +24554,56 @@ { "minAmount": "1", "weight": "25.0", + "id": "1359", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "5.0", + "id": "1432", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "5.0", + "id": "1147", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "5.0", "id": "1163", "maxAmount": "1" }, { "minAmount": "1", - "weight": "1.5", + "weight": "1.41", "id": "4585", "maxAmount": "1" }, { "minAmount": "1", - "weight": "1.5", + "weight": "1.41", "id": "4087", "maxAmount": "1" }, { - "minAmount": "20", - "weight": "50.0", - "id": "565", - "maxAmount": "20" - }, - { - "minAmount": "7", - "weight": "50.0", - "id": "830", - "maxAmount": "7" - }, - { - "minAmount": "5", + "minAmount": "2", "weight": "25.0", - "id": "566", - "maxAmount": "5" - }, - { - "minAmount": "9", - "weight": "25.0", - "id": "811", + "id": "9143", "maxAmount": "12" }, { "minAmount": "2", "weight": "25.0", "id": "9144", - "maxAmount": "14" + "maxAmount": "12" + }, + { + "minAmount": "12", + "weight": "25.0", + "id": "811", + "maxAmount": "12" }, { "minAmount": "7", @@ -24600,28 +24612,22 @@ "maxAmount": "7" }, { - "minAmount": "470", - "weight": "50.0", - "id": "995", - "maxAmount": "12650" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "9431", - "maxAmount": "1" - }, - { - "minAmount": "1", - "weight": "50.0", - "id": "145", - "maxAmount": "1" - }, - { - "minAmount": "1", + "minAmount": "20", "weight": "25.0", - "id": "165", - "maxAmount": "1" + "id": "565", + "maxAmount": "20" + }, + { + "minAmount": "5", + "weight": "25.0", + "id": "566", + "maxAmount": "5" + }, + { + "minAmount": "2", + "weight": "25.0", + "id": "2361", + "maxAmount": "2" }, { "minAmount": "1", @@ -24631,37 +24637,61 @@ }, { "minAmount": "1", - "weight": "25.0", - "id": "2363", + "weight": "5.0", + "id": "145", "maxAmount": "1" }, { "minAmount": "1", + "weight": "5.0", + "id": "165", + "maxAmount": "1" + }, + { + "minAmount": "470", + "weight": "50.0", + "id": "995", + "maxAmount": "470" + }, + { + "minAmount": "650", + "weight": "50.0", + "id": "995", + "maxAmount": "650" + }, + { + "minAmount": "2", "weight": "25.0", "id": "2011", "maxAmount": "2" }, { "minAmount": "1", - "weight": "5.0", - "id": "2741", + "weight": "25.0", + "id": "9431", "maxAmount": "1" }, { "minAmount": "1", "weight": "5.0", + "id": "2729", + "maxAmount": "1" + }, + { + "minAmount": "1", + "weight": "21.1", "id": "31", "maxAmount": "1" }, { "minAmount": "1", - "weight": "0.09", + "weight": "0.141", "id": "11286", "maxAmount": "1" }, { "minAmount": "1", - "weight": "100.0", + "weight": "150.0", "id": "0", "maxAmount": "1" }