From 70a47aeb5d62bc0ff8c45747f2e499b3d6bfd127 Mon Sep 17 00:00:00 2001 From: Oven Bread Date: Thu, 2 Nov 2023 08:26:27 +0000 Subject: [PATCH] Implemented Tolna Rift Improved ::npcanim admin command --- Server/data/configs/npc_configs.json | 114 ++++++++++++++---- Server/data/configs/npc_spawns.json | 28 +++++ .../quest/asoulsbane/ASoulsBaneListeners.kt | 26 ++++ .../game/system/command/sets/FunCommandSet.kt | 8 +- 4 files changed, 150 insertions(+), 26 deletions(-) create mode 100644 Server/src/main/content/region/misthalin/quest/asoulsbane/ASoulsBaneListeners.kt diff --git a/Server/data/configs/npc_configs.json b/Server/data/configs/npc_configs.json index 4aaf08cb4..0f40597c1 100644 --- a/Server/data/configs/npc_configs.json +++ b/Server/data/configs/npc_configs.json @@ -33760,11 +33760,13 @@ "examine": "He looks a little on the cross side!", "range_animation": "0", "combat_audio": "297,299,298", + "melee_animation": "4927", "attack_speed": "4", "magic_level": "1", - "defence_animation": "0", + "defence_animation": "4927", "weakness": "9", "magic_animation": "0", + "death_animation": "4929", "name": "Angry bear", "defence_level": "38", "safespot": null, @@ -33800,7 +33802,7 @@ "melee_animation": "4933", "range_animation": "0", "combat_audio": "703,705,704", - "defence_animation": "0", + "defence_animation": "4934", "weakness": "9", "magic_animation": "0", "death_animation": "4935", @@ -33818,7 +33820,7 @@ "melee_animation": "6185", "range_animation": "0", "combat_audio": "469,472,471", - "defence_animation": "0", + "defence_animation": "6183", "weakness": "9", "magic_animation": "0", "death_animation": "6182", @@ -33835,18 +33837,20 @@ "examine": "AHHHHH!", "melee_animation": "3812", "range_animation": "0", - "defence_animation": "0", - "weakness": "9", + "combat_audio": "297,299,298", + "attack_speed": "4", + "defence_animation": "3811", + "weakness": "", "magic_animation": "0", "death_animation": "3813", "name": "Fear reaper", - "defence_level": "27", + "defence_level": "40", "safespot": null, - "lifepoints": "38", - "strength_level": "27", + "lifepoints": "25", + "strength_level": "41", "id": "3649", "range_level": "1", - "attack_level": "27" + "attack_level": "41" }, { "examine": "What on Gielinor is that?!?", @@ -33884,13 +33888,19 @@ }, { "examine": "He looks a little on the cross side!", + "melee_animation": "6376", + "range_animation": "0", + "combat_audio": "876,878,877", + "attack_speed": "4", + "defence_animation": "0", + "weakness": "9", + "magic_animation": "0", + "death_animation": "6377", "name": "Angry unicorn", "defence_level": "38", "safespot": null, "lifepoints": "50", - "combat_audio": "876,878,877", "strength_level": "41", - "attack_speed": "4", "id": "3661", "aggressive": "false", "range_level": "1", @@ -33898,15 +33908,18 @@ }, { "examine": "He looks a little on the cross side!", - "name": "Angry giant rat", - "defence_level": "1", - "safespot": null, - "lifepoints": "10", "combat_audio": "703,705,704", - "strength_level": "1", + "melee_animation": "4933", + "defence_animation": "4934", + "death_animation": "4935", + "name": "Angry giant rat", + "defence_level": "38", + "safespot": null, + "lifepoints": "50", + "strength_level": "41", "id": "3662", "range_level": "1", - "attack_level": "1" + "attack_level": "38" }, { "examine": "He looks a little on the cross side!", @@ -33914,24 +33927,27 @@ "melee_animation": "6185", "range_animation": "0", "combat_audio": "469,472,471", - "defence_animation": "0", + "defence_animation": "6183", "weakness": "9", "magic_animation": "0", "death_animation": "6182", "name": "Angry goblin", - "defence_level": "25", + "defence_level": "38", "safespot": null, - "lifepoints": "35", - "strength_level": "25", + "lifepoints": "50", + "strength_level": "41", "id": "3663", "range_level": "1", - "attack_level": "25" + "attack_level": "38" }, { "examine": "He looks a little on the cross side!", "combat_audio": "297,299,298", + "melee_animation": "4927", "attack_speed": "4", "magic_level": "1", + "defence_animation": "4927", + "death_animation": "4929", "name": "Angry bear", "defence_level": "38", "safespot": null, @@ -33942,6 +33958,60 @@ "range_level": "1", "attack_level": "38" }, + { + "examine": "AHHHHH!", + "melee_animation": "3812", + "combat_audio": "297,299,298", + "attack_speed": "4", + "magic_level": "1", + "defence_animation": "3811", + "death_animation": "3813", + "name": "Fear reaper", + "defence_level": "45", + "safespot": null, + "lifepoints": "57", + "strength_level": "48", + "id": "3665", + "bonuses": "", + "range_level": "1", + "attack_level": "45" + }, + { + "examine": "What on Gielinor is that?!?", + "melee_animation": "3818", + "combat_audio": "297,299,298", + "attack_speed": "4", + "magic_level": "1", + "defence_animation": "3820", + "death_animation": "3821", + "name": "Confusion beast", + "defence_level": "52", + "safespot": null, + "lifepoints": "64", + "strength_level": "55", + "id": "3666", + "bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", + "range_level": "1", + "attack_level": "52" + }, + { + "examine": "He looks a little on the cross side!", + "melee_animation": "3823", + "combat_audio": "297,299,298", + "attack_speed": "4", + "magic_level": "1", + "defence_animation": "0", + "death_animation": "3827", + "name": "Hopeless creature", + "defence_level": "59", + "safespot": null, + "lifepoints": "71", + "strength_level": "62", + "id": "3667", + "bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0", + "range_level": "1", + "attack_level": "59" + }, { "examine": "Freshly sheared.", "melee_animation": "5341", diff --git a/Server/data/configs/npc_spawns.json b/Server/data/configs/npc_spawns.json index fb25a6110..b34bda735 100644 --- a/Server/data/configs/npc_spawns.json +++ b/Server/data/configs/npc_spawns.json @@ -6263,6 +6263,34 @@ "npc_id": "3638", "loc_data": "{3309,3453,0,0,1}" }, + { + "npc_id": "3661", + "loc_data": "{3276,9836,0,1,0}-{3287,9840,0,1,0}" + }, + { + "npc_id": "3662", + "loc_data": "{3280,9849,0,1,0}-{3286,9830,0,1,0}" + }, + { + "npc_id": "3663", + "loc_data": "{3269,9849,0,1,0}-{3291,9843,0,1,0}" + }, + { + "npc_id": "3664", + "loc_data": "{3269,9843,0,1,0}-{3275,9833,0,1,0}" + }, + { + "npc_id": "3665", + "loc_data": "{3305,9832,0,1,0}-{3305,9843,0,1,0}-{3311,9850,0,1,0}-{3312,9845,0,1,0}-{3313,9827,0,1,0}-{3315,9837,0,1,0}-{3319,9832,0,1,0}-{3319,9849,0,1,0}-{3323,9842,0,1,0}" + }, + { + "npc_id": "3666", + "loc_data": "{3302,9806,0,1,0}-{3302,9816,0,1,0}-{3304,9801,0,1,0}-{3310,9796,0,1,0}-{3312,9811,0,1,0}-{3313,9805,0,1,0}-{3313,9817,0,1,0}-{3314,9797,0,1,0}-{3319,9800,0,1,0}-{3319,9806,0,1,0}-{3321,9811,0,1,0}" + }, + { + "npc_id": "3667", + "loc_data": "{3269,9798,0,1,0}-{3269,9806,0,1,0}-{3269,9814,0,1,0}-{3275,9817,0,1,0}-{3276,9809,0,1,0}-{3280,9803,0,1,0}-{3282,9797,0,1,0}-{3285,9812,0,1,0}-{3288,9819,0,1,0}-{3289,9809,0,1,0}-{3290,9797,0,1,0}" + }, { "npc_id": "3671", "loc_data": "{3084,3250,0,1,1}" diff --git a/Server/src/main/content/region/misthalin/quest/asoulsbane/ASoulsBaneListeners.kt b/Server/src/main/content/region/misthalin/quest/asoulsbane/ASoulsBaneListeners.kt new file mode 100644 index 000000000..1813665e6 --- /dev/null +++ b/Server/src/main/content/region/misthalin/quest/asoulsbane/ASoulsBaneListeners.kt @@ -0,0 +1,26 @@ +package content.region.misthalin.quest.asoulsbane + +import core.api.* +import core.game.interaction.InteractionListener +import core.game.world.map.Location +import org.rs09.consts.Scenery + +// Temporary access since the monsters in there drop nothing. +class ASoulsBaneListener : InteractionListener { + + companion object { + private val RIFT_IDS = intArrayOf(13967, 13968, 13969, 13970, 13971, 13972, 13973, 13974, 13975, 13976, 13977, 13978, 13979, 13980, 13981, 13982, 13983, 13984, 13985, 13986, 13987, 13988, 13989, 13990, 13991, 13992, 13993) + } + override fun defineListeners() { + on(RIFT_IDS, SCENERY, "enter") { player, _ -> + if (hasRequirement(player, "A Soul's Bane")) { + teleport(player, Location(3297, 9824, 0)) + } + return@on true + } + on(Scenery.ROPE_13999, SCENERY, "climb-up") { player, _ -> + teleport(player, Location(3309, 3452, 0)) + return@on true + } + } +} diff --git a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt index cdacf2c1f..4db7d398f 100644 --- a/Server/src/main/core/game/system/command/sets/FunCommandSet.kt +++ b/Server/src/main/core/game/system/command/sets/FunCommandSet.kt @@ -37,13 +37,13 @@ class FunCommandSet : CommandSet(Privilege.ADMIN) { /** * Force animation + messages on all NPCs in a radius of 10 from the player. */ - define("npcareaanim", Privilege.ADMIN, "::npcareaanim Animation ID String") { player, args -> - if (args.size < 3) { - reject(player, "Syntax error: ::npcareaanim ") + define("npcanim", Privilege.ADMIN, "::npcanim Animation ID") { player, args -> + if (args.size < 2) { + reject(player, "Syntax error: ::npcanim ") } npcs = RegionManager.getLocalNpcs(player.location, 10) for (n in npcs) { - n.sendChat(args.slice(2 until args.size).joinToString(" ")) + n.sendChat(args.slice(1 until args.size).joinToString(" ")) n.lock(6) n.faceTemporary(player, 6) n.animator.animate(Animation(args[1].toInt()))