From 6ab13e08070c43ae2805c94bc00571a8fca79d2d Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Thu, 15 Feb 2024 22:51:54 +0000 Subject: [PATCH 01/20] feat: added herbs and potions for dung and juju --- data/cfg/npcs.yml | 44 ++ .../areas/spawns/spawns_10904.plugin.kts | 67 +-- .../areas/spawns/spawns_13209.plugin.kts | 44 ++ .../content/skills/herblore/HerbData.kt | 107 +++++ .../mixing/CreateUnfinishedPotionAction.kt | 11 +- .../skills/herblore/mixing/PotionData.kt | 385 +++++++++++++++++- .../herblore/mixing/mix_potion.plugin.kts | 26 ++ 7 files changed, 648 insertions(+), 36 deletions(-) create mode 100644 game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_13209.plugin.kts diff --git a/data/cfg/npcs.yml b/data/cfg/npcs.yml index 107551cc7..b879129f0 100644 --- a/data/cfg/npcs.yml +++ b/data/cfg/npcs.yml @@ -12494,6 +12494,24 @@ examine: "Overgrown vermin." - id: 12352 examine: "I think this spider has been magically modified." +- id: 12353 + examine: "An ugly, green creature.." +- id: 12354 + examine: "An ugly, green creature.." +- id: 12355 + examine: "An ugly, green creature.." +- id: 12356 + examine: "An ugly, green creature.." +- id: 12357 + examine: "An ugly, green creature.." +- id: 12358 + examine: "An ugly, green creature.." +- id: 12359 + examine: "An ugly, green creature.." +- id: 12360 + examine: "An ugly, green creature.." +- id: 12361 + examine: "An ugly, green creature.." - id: 12367 examine: "He tries to keep order around Lumbridge by killing goblins." - id: 12368 @@ -12504,6 +12522,8 @@ examine: "White and shaggy." - id: 12371 examine: "White and shaggy." +- id: 12372 + examine: "Dead man walking.." - id: 12374 examine: "Slightly magical." - id: 12418 @@ -13102,10 +13122,34 @@ examine: "A heavily armoured guard." - id: 12940 examine: "A heavily armoured guard." +- id: 12973 + examine: "He looks a bit aggressive." +- id: 12974 + examine: "He looks a bit aggressive." +- id: 12975 + examine: "He looks a bit aggressive." +- id: 12976 + examine: "He looks a bit aggressive" +- id: 12977 + examine: "He looks a bit aggressive" +- id: 12978 + examine: "He looks a bit aggressive" +- id: 12979 + examine: "He looks a bit aggressive." +- id: 12980 + examine: "He looks a bit aggressive." +- id: 12981 + examine: "He looks a bit aggressive." +- id: 12982 + examine: "He looks a bit aggressive" +- id: 12983 + examine: "He looks a bit aggressive" - id: 13089 examine: "Isn't it abhor-able?" - id: 13090 examine: "Isn't it abhor-able?" +- id: 13100 + examine: "An ugly, smelly creature." - id: 13182 examine: "Mmm, this looks tasty." - id: 13183 diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_10904.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_10904.plugin.kts index 7908eab93..5beaed778 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_10904.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_10904.plugin.kts @@ -1,25 +1,46 @@ package gg.rsmod.plugins.content.areas.spawns -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2716, z = 9749, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2713, z = 9751, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2713, z = 9757, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2712, z = 9745, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2713, z = 9742, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2713, z = 9742, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2712, z = 9738, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2708, z = 9736, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2708, z = 9738, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2704, z = 9741, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2702, z = 9743, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2702, z = 9747, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2703, z = 9751, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2703, z = 9753, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2703, z = 9757, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2703, z = 9759, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2703, z = 9763, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2703, z = 9765, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2701, z = 9769, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2699, z = 9771, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2698, z = 9775, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2698, z = 9777, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior -spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2702, z = 9776, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow warrior +spawn_npc(npc = Npcs.GIANT_BAT, x = 2732, z = 9774, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Giant Bat +spawn_npc(npc = Npcs.GIANT_BAT, x = 2727, z = 9772, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Giant Bat +spawn_npc(npc = Npcs.GIANT_BAT, x = 2730, z = 9760, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Giant Bat +spawn_npc(npc = Npcs.GIANT_BAT, x = 2730, z = 9773, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Giant Bat +spawn_npc(npc = Npcs.GIANT_BAT, x = 2706, z = 9738, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Giant Bat + +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2714, z = 9757, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2713, z = 9752, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2716, z = 9750, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2715, z = 9743, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2717, z = 9742, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2721, z = 9742, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2724, z = 9745, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2715, z = 9743, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2724, z = 9749, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2720, z = 9750, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2722, z = 9754, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2718, z = 9758, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2723, z = 9759, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2713, z = 9747, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2727, z = 9744, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2720, z = 9738, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2719, z = 9745, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2726, z = 9756, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2712, z = 9742, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion +spawn_npc(npc = Npcs.PIT_SCORPION, x = 2719, z = 9754, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Pit Scorpion + +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2709, z = 9759, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2708, z = 9756, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2703, z = 9757, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2704, z = 9761, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2707, z = 9764, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2702, z = 9765, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2705, z = 9770, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2699, z = 9769, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2697, z = 9772, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2694, z = 9775, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2697, z = 9779, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2701, z = 9780, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2704, z = 9778, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2701, z = 9775, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2705, z = 9774, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2704, z = 9749, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior +spawn_npc(npc = Npcs.SHADOW_WARRIOR, x = 2704, z = 9744, height = 0, walkRadius = 5, direction = Direction.NORTH, static = false) //Shadow Warrior diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_13209.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_13209.plugin.kts new file mode 100644 index 000000000..c58cf5db8 --- /dev/null +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/spawns/spawns_13209.plugin.kts @@ -0,0 +1,44 @@ +package gg.rsmod.plugins.content.areas.spawns + +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3270, z = 9797, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3269, z = 9803, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3272, z = 9808, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3274, z = 9817, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3287, z = 9818, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3290, z = 9811, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3289, z = 9798, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3278, z = 9811, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3282, z = 9808, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3276, z = 9804, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.HOPELESS_CREATURE_3667, x = 3282, z = 9798, walkRadius = 5, direction = Direction.NORTH) + +spawn_npc(npc = Npcs.ANGRY_GOBLIN_3663, x = 3270, z = 9850, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.ANGRY_BEAR_3664, x = 3271, z = 9844, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.ANGRY_UNICORN_3661, x = 3278, z = 9838, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.ANGRY_GIANT_RAT_3662, x = 3278, z = 9828, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.ANGRY_BEAR_3664, x = 3284, z = 9833, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.ANGRY_UNICORN_3661, x = 3291, z = 9834, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.ANGRY_GOBLIN_3663, x = 3291, z = 9841, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.ANGRY_GIANT_RAT_3662, x = 3284, z = 9850, walkRadius = 5, direction = Direction.NORTH) + +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3318, z = 9798, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3311, z = 9797, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3305, z = 9800, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3303, z = 9808, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3307, z = 9812, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3312, z = 9818, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3322, z = 9811, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3318, z = 9807, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3312, z = 9808, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3308, z = 9812, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.CONFUSION_BEAST_3666, x = 3319, z = 9817, walkRadius = 5, direction = Direction.NORTH) + +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3305, z = 9832, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3319, z = 9830, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3320, z = 9834, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3314, z = 9836, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3304, z = 9842, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3310, z = 9844, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3312, z = 9850, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3321, z = 9849, walkRadius = 5, direction = Direction.NORTH) +spawn_npc(npc = Npcs.FEAR_REAPER_3665, x = 3323, z = 9841, walkRadius = 5, direction = Direction.NORTH) \ No newline at end of file diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt index 1bbaee63f..3f76c47cf 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt @@ -138,8 +138,115 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi unf = Items.FELLSTALK_POTION_UNF, levelRequirement = 91, experience = 16.8 + ), + + /**Dungeoneering Herbs*/ + + SAGAWORT( + grimy = Items.GRIMY_SAGEWORT, + clean = Items.CLEAN_SAGEWORT, + unf = Items.SAGEWORT_POTION_UNF, + levelRequirement = 3, + experience = 2.1 + ), + FEATHERFOIL( + grimy = Items.GRIMY_FEATHERFOIL, + clean = Items.CLEAN_FEATHERFOIL, + unf = Items.FEATHERFOIL_POTION_UNF, + levelRequirement = 41, + experience = 8.6 + ), + VALERIAN( + grimy = Items.GRIMY_VALERIAN, + clean = Items.CLEAN_VALERIAN, + unf = Items.VALERIAN_POTION_UNF, + levelRequirement = 4, + experience = 3.2 + ), + ALOE( + grimy = Items.GRIMY_ALOE, + clean = Items.CLEAN_ALOE, + unf = Items.ALOE_POTION_UNF, + levelRequirement = 8, + experience = 4.0 + ), + WORMWOOD( + grimy = Items.GRIMY_WORMWOOD_LEAF, + clean = Items.CLEAN_WORMWOOD_LEAF, + unf = Items.WORMWOOD_POTION_UNF, + levelRequirement = 34, + experience = 7.2 + ), + MAGEBANE( + grimy = Items.GRIMY_MAGEBANE, + clean = Items.CLEAN_MAGEBANE, + unf = Items.MAGEBANE_POTION_UNF, + levelRequirement = 37, + experience = 7.7 + ), + WINTER_GRIP( + grimy = Items.GRIMY_WINTERS_GRIP, + clean = Items.CLEAN_WINTERS_GRIP, + unf = Items.WINTERS_GRIP_POTION_UNF, + levelRequirement = 67, + experience = 12.7 + ), + LYCOPUS( + grimy = Items.GRIMY_LYCOPUS, + clean = Items.CLEAN_LYCOPUS, + unf = Items.LYCOPUS_POTION_UNF, + levelRequirement = 70, + experience = 13.1 + ), + BUCKTHORN( + grimy = Items.GRIMY_BUCKTHORN, + clean = Items.CLEAN_BUCKTHORN, + unf = Items.BUCKTHORN_POTION_UNF, + levelRequirement = 74, + experience = 13.8 + ), + + /** Juju Herbs */ + + ERZILLE( + grimy = Items.GRIMY_ERZILLE, + clean = Items.CLEAN_ERZILLE, + unf = Items.ERZILLE_POTION_UNF, + levelRequirement = 54, + experience = 10.0 + ), + ARGWAY( + grimy = Items.GRIMY_ARGWAY, + clean = Items.CLEAN_ARGWAY, + unf = Items.ARGWAY_POTION_UNF, + levelRequirement = 56, + experience = 11.6 + ), + UGUNE( + grimy = Items.GRIMY_UGUNE, + clean = Items.CLEAN_UGUNE, + unf = Items.UGUNE_POTION_UNF, + levelRequirement = 55, + experience = 11.5 + ), + SHENGO( + grimy = Items.GRIMY_SHENGO, + clean = Items.CLEAN_SHENGO, + unf = Items.SHENGO_POTION_UNF, + levelRequirement = 57, + experience = 11.7 + ), + SAMADEN( + grimy = Items.GRIMY_SAMADEN, + clean = Items.CLEAN_SAMADEN, + unf = Items.SAMADEN_POTION_UNF, + levelRequirement = 58, + experience = 11.7 ); + + + companion object { val grimyHerbDefinitions = values().associateBy { it.grimy } val unfinishedPotionDefinitions = values().associateBy { it.unf } diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt index 75d166133..9cca7d783 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt @@ -25,9 +25,10 @@ class CreateUnfinishedPotionAction { if (!canMix(task, potion)) { return } - val success = inventory.remove(potion.clean, assureFullRemoval = true).hasSucceeded() && inventory.remove( - Items.VIAL_OF_WATER, assureFullRemoval = true - ).hasSucceeded() + val success = inventory.remove(potion.clean, assureFullRemoval = true).hasSucceeded() && + (inventory.remove(Items.VIAL_OF_WATER, assureFullRemoval = true).hasSucceeded() || + inventory.remove(Items.VIAL_OF_WATER_17492, assureFullRemoval = true).hasSucceeded() || + inventory.remove(Items.JUJU_VIAL_OF_WATER, assureFullRemoval = true).hasSucceeded()) // Added new vial of water if (success) { player.inventory.add(potion.unf) player.filterableMessage("You put the ${potion.name.lowercase()} into the vial of water.") @@ -47,7 +48,7 @@ class CreateUnfinishedPotionAction { player.filterableMessage(message) return false } - return (inventory.contains(potion.clean) && inventory.contains(Items.VIAL_OF_WATER)) + return (inventory.contains(potion.clean) && (inventory.contains(Items.VIAL_OF_WATER) || inventory.contains(Items.VIAL_OF_WATER_17492) || inventory.contains(Items.JUJU_VIAL_OF_WATER))) // Added new vial of water } -} \ No newline at end of file +} diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt index b26d287b4..d0f5753af 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt @@ -30,6 +30,22 @@ enum class PotionData( experience = 50.0 ), + SERUM_207_POTION( + primary = Items.ASH_POTION_UNF, + secondary = Items.CLEAN_TARROMIN, + product = Items.SERUM_207_3, + levelRequirement = 15, + experience = 50.0 + ), + + GUTHIX_BALANCE_POTION( + primary = Items.GUTHIX_BALANCE_UNF_7654, + secondary = Items.SILVER_DUST, + product = Items.GUTHIX_BALANCE_3, + levelRequirement = 22, + experience = 62.5 + ), + RESTORE_POTION( primary = Items.HARRALANDER_POTION_UNF, secondary = Items.RED_SPIDERS_EGGS, @@ -286,6 +302,344 @@ enum class PotionData( experience = 190.0 ), + //TODO add right stats for the potions in potion type + /** Weak Dungeoneering Potions */ + WEAK_MAGIC_POTION( + primary = Items.SAGEWORT_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.WEAK_MAGIC_POTION, + levelRequirement = 3, + experience = 21.0 + ), + WEAK_RANGED_POTION( + primary = Items.VALERIAN_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.WEAK_RANGED_POTION, + levelRequirement = 5, + experience = 34.0 + ), + WEAK_MELEE_POTION( + primary = Items.VALERIAN_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.WEAK_MELEE_POTION, + levelRequirement = 7, + experience = 37.5 + ), + WEAK_DEFENCE_POTION( + primary = Items.ALOE_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.WEAK_DEFENCE_POTION, + levelRequirement = 9, + experience = 41.0 + ), + WEAK_STAT_RESTORE_POTION( + primary = Items.ALOE_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.WEAK_STAT_RESTORE_POTION, + levelRequirement = 12, + experience = 47.0 + ), + WEAK_CURE_POTION( + primary = Items.ALOE_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.WEAK_CURE_POTION, + levelRequirement = 15, + experience = 23.0 + ), + WEAK_REJUVENATION_POTION( + primary = Items.ALOE_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.WEAK_REJUVENATION_POTION, + levelRequirement = 18, + experience = 53.5 + ), + WEAK_POISON_POTION( + primary = Items.SAGEWORT_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.WEAK_WEAPON_POISON, + levelRequirement = 21, + experience = 61.0 + ), + WEAK_GATHERER_POTION( + primary = Items.SAGEWORT_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.WEAK_GATHERERS_POTION, + levelRequirement = 24, + experience = 65.0 + ), + WEAK_ARTISAN_POTION( + primary = Items.VALERIAN_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.WEAK_ARTISANS_POTION, + levelRequirement = 27, + experience = 68.5 + ), + WEAK_NATURALIST_POTION( + primary = Items.SAGEWORT_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.WEAK_NATURALISTS_POTION, + levelRequirement = 30, + experience = 72.0 + ), + WEAK_SURVIVALIST_POTION( + primary = Items.VALERIAN_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.WEAK_SURVIVALISTS_POTION, + levelRequirement = 33, + experience = 75.0 + ), + + //TODO add right stats for the potions in potion type + /** Regular Dungeoneering Potions */ + REGULAR_MAGIC_POTION( + primary = Items.WORMWOOD_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.MAGIC_POTION, + levelRequirement = 36, + experience = 79.5 + ), + REGULAR_RANGED_POTION( + primary = Items.MAGEBANE_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.RANGED_POTION, + levelRequirement = 38, + experience = 83.0 + ), + REGULAR_MELEE_POTION( + primary = Items.MAGEBANE_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.MELEE_POTION, + levelRequirement = 40, + experience = 86.5 + ), + REGULAR_DEFENCE_POTION( + primary = Items.FEATHERFOIL_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.DEFENCE_POTION, + levelRequirement = 42, + experience = 89.0 + ), + REGULAR_STAT_RESTORE_POTION( + primary = Items.FEATHERFOIL_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.STAT_RESTORE_POTION, + levelRequirement = 45, + experience = 93.0 + ), + REGULAR_CURE_POTION( + primary = Items.FEATHERFOIL_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.CURE_POTION, + levelRequirement = 48, + experience = 98.5 + ), + REGULAR_REJUVENATION_POTION( + primary = Items.FEATHERFOIL_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.REJUVENATION_POTION, + levelRequirement = 51, + experience = 105.5 + ), + REGULAR_POISON_POTION( + primary = Items.WORMWOOD_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.WEAPON_POISON_17596, + levelRequirement = 54, + experience = 114.0 + ), + REGULAR_GATHERER_POTION( + primary = Items.WORMWOOD_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.GATHERERS_POTION, + levelRequirement = 57, + experience = 123.5 + ), + REGULAR_ARTISAN_POTION( + primary = Items.MAGEBANE_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.ARTISANS_POTION, + levelRequirement = 60, + experience = 131.0 + ), + REGULAR_NATURALIST_POTION( + primary = Items.WORMWOOD_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.NATURALISTS_POTION, + levelRequirement = 63, + experience = 139.5 + ), + REGULAR_SURVIVALIST_POTION( + primary = Items.MAGEBANE_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.SURVIVALISTS_POTION, + levelRequirement = 66, + experience = 147.0 + ), + + //TODO add right stats for the potions in potion type + /** Strong Dungeoneering Potions */ + STRONG_MAGIC_POTION( + primary = Items.WINTERS_GRIP_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.STRONG_MAGIC_POTION, + levelRequirement = 69, + experience = 79.5 + ), + STRONG_RANGED_POTION( + primary = Items.LYCOPUS_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.STRONG_RANGED_POTION, + levelRequirement = 71, + experience = 83.0 + ), + STRONG_MELEE_POTION( + primary = Items.LYCOPUS_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.STRONG_MELEE_POTION, + levelRequirement = 73, + experience = 86.5 + ), + STRONG_DEFENCE_POTION( + primary = Items.BUCKTHORN_POTION_UNF, + secondary = Items.VOID_DUST, + product = Items.STRONG_DEFENCE_POTION, + levelRequirement = 75, + experience = 89.0 + ), + STRONG_STAT_RESTORE_POTION( + primary = Items.BUCKTHORN_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.STRONG_STAT_RESTORE_POTION, + levelRequirement = 78, + experience = 93.0 + ), + STRONG_CURE_POTION( + primary = Items.BUCKTHORN_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.STRONG_CURE_POTION, + levelRequirement = 81, + experience = 98.5 + ), + STRONG_REJUVENATION_POTION( + primary = Items.BUCKTHORN_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.STRONG_REJUVENATION_POTION, + levelRequirement = 84, + experience = 105.5 + ), + STRONG_POISON_POTION( + primary = Items.WINTERS_GRIP_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.STRONG_WEAPON_POISON, + levelRequirement = 87, + experience = 114.0 + ), + STRONG_GATHERER_POTION( + primary = Items.WINTERS_GRIP_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.STRONG_GATHERERS_POTION, + levelRequirement = 90, + experience = 123.5 + ), + STRONG_ARTISAN_POTION( + primary = Items.LYCOPUS_POTION_UNF, + secondary = Items.RED_MOSS, + product = Items.STRONG_ARTISANS_POTION, + levelRequirement = 93, + experience = 131.0 + ), + STRONG_NATURALIST_POTION( + primary = Items.WINTERS_GRIP_POTION_UNF, + secondary = Items.MISSHAPEN_CLAW, + product = Items.STRONG_NATURALISTS_POTION, + levelRequirement = 96, + experience = 139.5 + ), + STRONG_SURVIVALIST_POTION( + primary = Items.LYCOPUS_POTION_UNF, + secondary = Items.FIREBREATH_WHISKEY, + product = Items.STRONG_SURVIVALISTS_POTION, + levelRequirement = 99, + experience = 147.0 + ), + + + //TODO add right stats for the potions in potion type + /** Juju Potions */ + JUJU_HUNTER_POTION( + primary = Items.ERZILLE_POTION_UNF, + secondary = Items.CORRUPT_VINE, + product = Items.JUJU_HUNTER_POTION_3, + levelRequirement = 54, + experience = 123.0 + ), + JUJU_SCENTLESS_POTION( + primary = Items.ARGWAY_POTION_UNF, + secondary = Items.SHADOW_VINE, + product = Items.SCENTLESS_POTION_3, + levelRequirement = 59, + experience = 135.0 + ), + JUJU_FARMING_POTION( + primary = Items.UGUNE_POTION_UNF, + secondary = Items.MARBLE_VINE, + product = Items.JUJU_FARMING_POTION_3, + levelRequirement = 64, + experience = 146.0 + ), + JUJU_COOKING_POTION( + primary = Items.SHENGO_POTION_UNF, + secondary = Items.PLANT_TEETH, + product = Items.JUJU_COOKING_POTION_3, + levelRequirement = 67, + experience = 152.0 + ), + JUJU_FISHING_POTION( + primary = Items.SHENGO_POTION_UNF, + secondary = Items.AQUATIC_VINE, + product = Items.JUJU_FISHING_POTION_3, + levelRequirement = 70, + experience = 158.0 + ), + JUJU_WOODCUTTING_POTION( + primary = Items.SAMADEN_POTION_UNF, + secondary = Items.OILY_VINE, + product = Items.JUJU_WOODCUTTING_POTION_3, + levelRequirement = 71, + experience = 160.0 + ), + JUJU_MINING_POTION( + primary = Items.SAMADEN_POTION_UNF, + secondary = Items.DRACONIC_VINE, + product = Items.JUJU_MINING_POTION_3, + levelRequirement = 74, + experience = 168.0 + ), + SARADOMIN_BLESSING_POTION( + primary = Items.SAMADEN_POTION_UNF, + secondary = Items.SARADOMIN_VINE, + product = Items.SARADOMINS_BLESSING_3, + levelRequirement = 75, + experience = 179.0 + ), + GUTHIX_GIFT_POTION( + primary = Items.SAMADEN_POTION_UNF, + secondary = Items.GUTHIX_VINE, + product = Items.GUTHIXS_GIFT_3, + levelRequirement = 75, + experience = 179.0 + ), + ZAMORAK_FAVOUR_POTION( + primary = Items.SAMADEN_POTION_UNF, + secondary = Items.ZAMORAK_VINE, + product = Items.ZAMORAKS_FAVOUR_3, + levelRequirement = 75, + experience = 179.0 + ), + + + + //TODO add right stats for the potions in potion type /** Barbarian Mixes */ AGILITY_MIX( primary = Items.AGILITY_POTION_2, @@ -297,7 +651,7 @@ enum class PotionData( ATTACK_MIX( primary = Items.ATTACK_POTION_2, - secondary = Items.CAVIAR, + secondary = Items.ROE, product = Items.ATTACK_MIX_2, levelRequirement = 4, experience = 7.0 @@ -305,13 +659,12 @@ enum class PotionData( ANTIPOISON_MIX( primary = Items.ANTIPOISON_2, - secondary = Items.CAVIAR, + secondary = Items.ROE, product = Items.ANTIPOISON_MIX_2, levelRequirement = 6, experience = 12.0 ), - - ANTIP_SUPERMIX( + ANTIPOISON_SUPERMIX( primary = Items.SUPER_ANTIPOISON_2, secondary = Items.CAVIAR, product = Items.ANTIP_SUPERMIX_2, @@ -319,6 +672,14 @@ enum class PotionData( experience = 35.0 ), + ANTIDOTE_PLUS_MIX( + primary = Items.ANTIPOISON_2_5947, + secondary = Items.CAVIAR, + product = Items.ANTIDOTE_MIX_2, + levelRequirement = 74, + experience = 52.0 + ), + ANTIFIRE_MIX( primary = Items.ANTIFIRE_2, secondary = Items.CAVIAR, @@ -377,7 +738,7 @@ enum class PotionData( MAGIC_MIX( primary = Items.MAGIC_POTION_2, - secondary = Items.CAVIAR, + secondary = Items.ROE, product = Items.MAGIC_MIX_2, levelRequirement = 83, experience = 57.0 @@ -393,7 +754,7 @@ enum class PotionData( RANGING_MIX( primary = Items.RANGING_POTION_2, - secondary = Items.CAVIAR, + secondary = Items.ROE, product = Items.RANGING_MIX_2, levelRequirement = 80, experience = 54.0 @@ -417,7 +778,7 @@ enum class PotionData( STRENGTH_MIX( primary = Items.STRENGTH_POTION_2, - secondary = Items.CAVIAR, + secondary = Items.ROE, product = Items.STRENGTH_MIX_2, levelRequirement = 14, experience = 17.0 @@ -439,6 +800,15 @@ enum class PotionData( experience = 39.0 ), + + SUPER_MAGIC_MIX_( + primary = Items.MAGIC_MIX_2, + secondary = Items.CAVIAR, + product = Items.SUPER_RESTORE_MIX_2, + levelRequirement = 67, + experience = 48.0 + ), + SUPER_RESTORE_MIX_( primary = Items.SUPER_RESTORE_2, secondary = Items.CAVIAR, @@ -473,7 +843,6 @@ enum class PotionData( - companion object { val definitions = values().associateBy { it.product } } diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts index eeb37d899..b0dca6d37 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts @@ -20,6 +20,32 @@ unfinishedPotionDefinitions.values.forEach { potion -> } } } +unfinishedPotionDefinitions.values.forEach { potion -> + on_item_on_item(item1 = potion.clean, item2 = Items.VIAL_OF_WATER_17492) { + player.queue(TaskPriority.STRONG) { + produceItemBox( + potion.unf, + option = SkillDialogueOption.MAKE, + title = "Choose how many you wish to make, then
click on the item to begin.", + logic = ::startUnfinished + ) + } + } +} + +unfinishedPotionDefinitions.values.forEach { potion -> + on_item_on_item(item1 = potion.clean, item2 = Items.JUJU_VIAL_OF_WATER) { + player.queue(TaskPriority.STRONG) { + produceItemBox( + potion.unf, + option = SkillDialogueOption.MAKE, + title = "Choose how many you wish to make, then
click on the item to begin.", + logic = ::startUnfinished + ) + } + } +} + finishedPotionDefinitions.values.forEach { potion -> on_item_on_item(item1 = potion.primary, item2 = potion.secondary) { From 910bb53f332a04671acad2297be04a050d1b909c Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Fri, 16 Feb 2024 13:03:39 +0000 Subject: [PATCH 02/20] feat: updated the todo --- .../plugins/content/skills/herblore/mixing/PotionData.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt index d0f5753af..b1d41d890 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/PotionData.kt @@ -302,8 +302,7 @@ enum class PotionData( experience = 190.0 ), - //TODO add right stats for the potions in potion type - /** Weak Dungeoneering Potions */ + //TODO:Implement potion effects and cooldown timers for Weak Dungeoneering Potions */ WEAK_MAGIC_POTION( primary = Items.SAGEWORT_POTION_UNF, secondary = Items.VOID_DUST, @@ -389,7 +388,7 @@ enum class PotionData( experience = 75.0 ), - //TODO add right stats for the potions in potion type + //TODO:Implement potion effects and cooldown timers for Regular Dungeoneering Potions */ /** Regular Dungeoneering Potions */ REGULAR_MAGIC_POTION( primary = Items.WORMWOOD_POTION_UNF, @@ -476,7 +475,7 @@ enum class PotionData( experience = 147.0 ), - //TODO add right stats for the potions in potion type + //TODO:Implement potion effects and cooldown timers for Strong Dungeoneering Potions */ /** Strong Dungeoneering Potions */ STRONG_MAGIC_POTION( primary = Items.WINTERS_GRIP_POTION_UNF, @@ -564,7 +563,7 @@ enum class PotionData( ), - //TODO add right stats for the potions in potion type + //TODO:Implement potion effects and cooldown timers for Juju potions. */ /** Juju Potions */ JUJU_HUNTER_POTION( primary = Items.ERZILLE_POTION_UNF, From 382348d7f98796a8a4976f5d61ee44ee90d8b3a3 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Sat, 17 Feb 2024 17:34:14 +0000 Subject: [PATCH 03/20] fix: issue with herbdata and CreateUnfinishedPotionAction --- .../content/skills/herblore/HerbData.kt | 112 ++++++++++++------ .../mixing/CreateUnfinishedPotionAction.kt | 4 +- 2 files changed, 78 insertions(+), 38 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt index 3f76c47cf..a91a4a939 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/HerbData.kt @@ -2,14 +2,16 @@ package gg.rsmod.plugins.content.skills.herblore import gg.rsmod.plugins.api.cfg.Items -enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequirement: Int, val experience: Double) { +enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequirement: Int, val experience: Double, val requiredVial: Int) { GUAM( grimy = Items.GRIMY_GUAM, clean = Items.CLEAN_GUAM, unf = Items.GUAM_POTION_UNF, levelRequirement = 3, - experience = 2.5 + experience = 2.5, + requiredVial = Items.VIAL_OF_WATER + ), MARRENTILL( @@ -17,7 +19,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_MARRENTILL, unf = Items.MARRENTILL_POTION_UNF, levelRequirement = 5, - experience = 3.8 + experience = 3.8, + requiredVial = Items.VIAL_OF_WATER ), TARROMIN( @@ -25,7 +28,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_TARROMIN, unf = Items.TARROMIN_POTION_UNF, levelRequirement = 11, - experience = 5.0 + experience = 5.0, + requiredVial = Items.VIAL_OF_WATER ), HARRALANDER( @@ -33,7 +37,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_HARRALANDER, unf = Items.HARRALANDER_POTION_UNF, levelRequirement = 20, - experience = 6.3 + experience = 6.3, + requiredVial = Items.VIAL_OF_WATER ), RANARR( @@ -41,7 +46,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_RANARR, unf = Items.RANARR_POTION_UNF, levelRequirement = 25, - experience = 7.5 + experience = 7.5, + requiredVial = Items.VIAL_OF_WATER ), TOADFLAX( @@ -49,7 +55,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_TOADFLAX, unf = Items.TOADFLAX_POTION_UNF, levelRequirement = 30, - experience = 8.0 + experience = 8.0, + requiredVial = Items.VIAL_OF_WATER ), SPIRIT_WEED( @@ -57,7 +64,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_SPIRIT_WEED, unf = Items.SPIRIT_WEED_POTION_UNF, levelRequirement = 35, - experience = 7.8 + experience = 7.8, + requiredVial = Items.VIAL_OF_WATER ), IRIT( @@ -65,7 +73,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_IRIT, unf = Items.IRIT_POTION_UNF, levelRequirement = 40, - experience = 8.8 + experience = 8.8, + requiredVial = Items.VIAL_OF_WATER ), WERGALI( @@ -73,7 +82,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_WERGALI, unf = Items.WERGALI_POTION_UNF, levelRequirement = 41, - experience = 9.5 + experience = 9.5, + requiredVial = Items.VIAL_OF_WATER ), AVANTOE( @@ -81,7 +91,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_AVANTOE, unf = Items.AVANTOE_POTION_UNF, levelRequirement = 48, - experience = 10.0 + experience = 10.0, + requiredVial = Items.VIAL_OF_WATER ), KWUARM( @@ -89,7 +100,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_KWUARM, unf = Items.KWUARM_POTION_UNF, levelRequirement = 54, - experience = 11.3 + experience = 11.3, + requiredVial = Items.VIAL_OF_WATER ), SNAPDRAGON( @@ -97,7 +109,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_SNAPDRAGON, unf = Items.SNAPDRAGON_POTION_UNF, levelRequirement = 59, - experience = 11.8 + experience = 11.8, + requiredVial = Items.VIAL_OF_WATER ), CADANTINE( @@ -105,7 +118,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_CADANTINE, unf = Items.CADANTINE_POTION_UNF, levelRequirement = 65, - experience = 12.5 + experience = 12.5, + requiredVial = Items.VIAL_OF_WATER ), LANTADYME( @@ -113,7 +127,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_LANTADYME, unf = Items.LANTADYME_POTION_UNF, levelRequirement = 67, - experience = 13.1 + experience = 13.1, + requiredVial = Items.VIAL_OF_WATER ), DWARF_WEED( @@ -121,7 +136,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_DWARF_WEED, unf = Items.DWARF_WEED_POTION_UNF, levelRequirement = 70, - experience = 13.8 + experience = 13.8, + requiredVial = Items.VIAL_OF_WATER ), TORSTOL( @@ -129,7 +145,8 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_TORSTOL, unf = Items.TORSTOL_POTION_UNF, levelRequirement = 75, - experience = 15.0 + experience = 15.0, + requiredVial = Items.VIAL_OF_WATER ), FELLSTALK( @@ -137,7 +154,9 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_FELLSTALK, unf = Items.FELLSTALK_POTION_UNF, levelRequirement = 91, - experience = 16.8 + experience = 16.8, + requiredVial = Items.VIAL_OF_WATER + ), /**Dungeoneering Herbs*/ @@ -147,63 +166,80 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_SAGEWORT, unf = Items.SAGEWORT_POTION_UNF, levelRequirement = 3, - experience = 2.1 + experience = 2.1, + requiredVial = Items.VIAL_OF_WATER_17492 ), + FEATHERFOIL( grimy = Items.GRIMY_FEATHERFOIL, clean = Items.CLEAN_FEATHERFOIL, unf = Items.FEATHERFOIL_POTION_UNF, levelRequirement = 41, - experience = 8.6 + experience = 8.6, + requiredVial = Items.VIAL_OF_WATER_17492 ), + VALERIAN( grimy = Items.GRIMY_VALERIAN, clean = Items.CLEAN_VALERIAN, unf = Items.VALERIAN_POTION_UNF, levelRequirement = 4, - experience = 3.2 + experience = 3.2, + requiredVial = Items.VIAL_OF_WATER_17492 ), + ALOE( grimy = Items.GRIMY_ALOE, clean = Items.CLEAN_ALOE, unf = Items.ALOE_POTION_UNF, levelRequirement = 8, - experience = 4.0 + experience = 4.0, + requiredVial = Items.VIAL_OF_WATER_17492 ), + WORMWOOD( grimy = Items.GRIMY_WORMWOOD_LEAF, clean = Items.CLEAN_WORMWOOD_LEAF, unf = Items.WORMWOOD_POTION_UNF, levelRequirement = 34, - experience = 7.2 + experience = 7.2, + requiredVial = Items.VIAL_OF_WATER_17492 ), + MAGEBANE( grimy = Items.GRIMY_MAGEBANE, clean = Items.CLEAN_MAGEBANE, unf = Items.MAGEBANE_POTION_UNF, levelRequirement = 37, - experience = 7.7 + experience = 7.7, + requiredVial = Items.VIAL_OF_WATER_17492 ), + WINTER_GRIP( grimy = Items.GRIMY_WINTERS_GRIP, clean = Items.CLEAN_WINTERS_GRIP, unf = Items.WINTERS_GRIP_POTION_UNF, levelRequirement = 67, - experience = 12.7 + experience = 12.7, + requiredVial = Items.VIAL_OF_WATER_17492 ), + LYCOPUS( grimy = Items.GRIMY_LYCOPUS, clean = Items.CLEAN_LYCOPUS, unf = Items.LYCOPUS_POTION_UNF, levelRequirement = 70, - experience = 13.1 + experience = 13.1, + requiredVial = Items.VIAL_OF_WATER_17492 ), + BUCKTHORN( grimy = Items.GRIMY_BUCKTHORN, clean = Items.CLEAN_BUCKTHORN, unf = Items.BUCKTHORN_POTION_UNF, levelRequirement = 74, - experience = 13.8 + experience = 13.8, + requiredVial = Items.VIAL_OF_WATER_17492 ), /** Juju Herbs */ @@ -213,40 +249,46 @@ enum class HerbData(val grimy: Int, val clean: Int, val unf: Int, val levelRequi clean = Items.CLEAN_ERZILLE, unf = Items.ERZILLE_POTION_UNF, levelRequirement = 54, - experience = 10.0 + experience = 10.0, + requiredVial = Items.JUJU_VIAL_OF_WATER ), + ARGWAY( grimy = Items.GRIMY_ARGWAY, clean = Items.CLEAN_ARGWAY, unf = Items.ARGWAY_POTION_UNF, levelRequirement = 56, - experience = 11.6 + experience = 11.6, + requiredVial = Items.JUJU_VIAL_OF_WATER ), + UGUNE( grimy = Items.GRIMY_UGUNE, clean = Items.CLEAN_UGUNE, unf = Items.UGUNE_POTION_UNF, levelRequirement = 55, - experience = 11.5 + experience = 11.5, + requiredVial = Items.JUJU_VIAL_OF_WATER ), + SHENGO( grimy = Items.GRIMY_SHENGO, clean = Items.CLEAN_SHENGO, unf = Items.SHENGO_POTION_UNF, levelRequirement = 57, - experience = 11.7 + experience = 11.7, + requiredVial = Items.JUJU_VIAL_OF_WATER ), + SAMADEN( grimy = Items.GRIMY_SAMADEN, clean = Items.CLEAN_SAMADEN, unf = Items.SAMADEN_POTION_UNF, levelRequirement = 58, - experience = 11.7 + experience = 11.7, + requiredVial = Items.JUJU_VIAL_OF_WATER ); - - - companion object { val grimyHerbDefinitions = values().associateBy { it.grimy } val unfinishedPotionDefinitions = values().associateBy { it.unf } diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt index 9cca7d783..3331edeee 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt @@ -26,9 +26,7 @@ class CreateUnfinishedPotionAction { return } val success = inventory.remove(potion.clean, assureFullRemoval = true).hasSucceeded() && - (inventory.remove(Items.VIAL_OF_WATER, assureFullRemoval = true).hasSucceeded() || - inventory.remove(Items.VIAL_OF_WATER_17492, assureFullRemoval = true).hasSucceeded() || - inventory.remove(Items.JUJU_VIAL_OF_WATER, assureFullRemoval = true).hasSucceeded()) // Added new vial of water + inventory.remove(potion.requiredVial, assureFullRemoval = true).hasSucceeded() if (success) { player.inventory.add(potion.unf) player.filterableMessage("You put the ${potion.name.lowercase()} into the vial of water.") From d4079026d9cf4d1eae4f5265785cdbe334c0a223 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Sat, 17 Feb 2024 17:36:22 +0000 Subject: [PATCH 04/20] fix: created unfinished potionaction --- .../skills/herblore/mixing/CreateUnfinishedPotionAction.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt index 3331edeee..023b11e51 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt @@ -46,7 +46,7 @@ class CreateUnfinishedPotionAction { player.filterableMessage(message) return false } - return (inventory.contains(potion.clean) && (inventory.contains(Items.VIAL_OF_WATER) || inventory.contains(Items.VIAL_OF_WATER_17492) || inventory.contains(Items.JUJU_VIAL_OF_WATER))) // Added new vial of water + return inventory.contains(potion.clean) && inventory.contains(potion.requiredVial) } } From 9bddc6f147e69eb87a29d773e2a3cd006004bdfb Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Sat, 17 Feb 2024 23:04:17 +0000 Subject: [PATCH 05/20] fix: createunfinishedpotionaction --- .../skills/herblore/mixing/CreateUnfinishedPotionAction.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt index 023b11e51..0a296d662 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt @@ -46,7 +46,6 @@ class CreateUnfinishedPotionAction { player.filterableMessage(message) return false } - return inventory.contains(potion.clean) && inventory.contains(potion.requiredVial) + return (inventory.contains(potion.clean) && inventory.contains(Items.VIAL_OF_WATER) || inventory.contains(Items.VIAL_OF_WATER_17492) || inventory.contains(Items.JUJU_VIAL_OF_WATER)) } - } From 7a0e02aabc1f04ffd5d8e16e7271729351faef1e Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Mon, 19 Feb 2024 09:43:30 +0000 Subject: [PATCH 06/20] Updated CreatedUnfinishedPotionAction --- .../skills/herblore/mixing/CreateUnfinishedPotionAction.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt index 0a296d662..366032efc 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt @@ -46,6 +46,5 @@ class CreateUnfinishedPotionAction { player.filterableMessage(message) return false } - return (inventory.contains(potion.clean) && inventory.contains(Items.VIAL_OF_WATER) || inventory.contains(Items.VIAL_OF_WATER_17492) || inventory.contains(Items.JUJU_VIAL_OF_WATER)) - } -} + return inventory.contains(potion.clean) && inventory.contains(potion.requiredVial) } +} \ No newline at end of file From 7a3675651532872f71a2669685b7a943e08f49c9 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Mon, 19 Feb 2024 16:37:17 +0000 Subject: [PATCH 07/20] Updated mix_potion now it dont open interface random vial of water now --- .../herblore/mixing/mix_potion.plugin.kts | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts index b0dca6d37..48cb33bf3 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/mix_potion.plugin.kts @@ -11,42 +11,44 @@ val unfinishedAction = CreateUnfinishedPotionAction() unfinishedPotionDefinitions.values.forEach { potion -> on_item_on_item(item1 = potion.clean, item2 = Items.VIAL_OF_WATER) { player.queue(TaskPriority.STRONG) { - produceItemBox( - potion.unf, - option = SkillDialogueOption.MAKE, - title = "Choose how many you wish to make, then
click on the item to begin.", - logic = ::startUnfinished - ) + if (potion.requiredVial == Items.VIAL_OF_WATER) { + produceItemBox( + potion.unf, + option = SkillDialogueOption.MAKE, + title = "Choose how many you wish to make, then
click on the item to begin.", + logic = ::startUnfinished + ) + } } } -} -unfinishedPotionDefinitions.values.forEach { potion -> on_item_on_item(item1 = potion.clean, item2 = Items.VIAL_OF_WATER_17492) { player.queue(TaskPriority.STRONG) { - produceItemBox( - potion.unf, - option = SkillDialogueOption.MAKE, - title = "Choose how many you wish to make, then
click on the item to begin.", - logic = ::startUnfinished - ) + if (potion.requiredVial == Items.VIAL_OF_WATER_17492) { + produceItemBox( + potion.unf, + option = SkillDialogueOption.MAKE, + title = "Choose how many you wish to make, then
click on the item to begin.", + logic = ::startUnfinished + ) + } } } -} - -unfinishedPotionDefinitions.values.forEach { potion -> on_item_on_item(item1 = potion.clean, item2 = Items.JUJU_VIAL_OF_WATER) { player.queue(TaskPriority.STRONG) { - produceItemBox( - potion.unf, - option = SkillDialogueOption.MAKE, - title = "Choose how many you wish to make, then
click on the item to begin.", - logic = ::startUnfinished - ) + if (potion.requiredVial == Items.JUJU_VIAL_OF_WATER) { + produceItemBox( + potion.unf, + option = SkillDialogueOption.MAKE, + title = "Choose how many you wish to make, then
click on the item to begin.", + logic = ::startUnfinished + ) + } } } } + finishedPotionDefinitions.values.forEach { potion -> on_item_on_item(item1 = potion.primary, item2 = potion.secondary) { player.queue(TaskPriority.STRONG) { From d5e8396f13aa54fa1564fe77128730bb28e82c7d Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Mon, 19 Feb 2024 16:37:43 +0000 Subject: [PATCH 08/20] Updated now display correct item on vial of water that getting made --- .../mixing/CreateUnfinishedPotionAction.kt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt index 366032efc..32e0d2834 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/skills/herblore/mixing/CreateUnfinishedPotionAction.kt @@ -42,9 +42,18 @@ class CreateUnfinishedPotionAction { val inventory = player.inventory if (player.skills.getCurrentLevel(Skills.HERBLORE) < potion.levelRequirement) { val message = "You need a Herblore level of ${potion.levelRequirement} to make this potion." - task.doubleItemMessageBox(message, item1 = Items.VIAL_OF_WATER, item2 = potion.clean) + val vialOfWaterItemID = when (potion.requiredVial) { + Items.VIAL_OF_WATER -> Items.VIAL_OF_WATER + Items.VIAL_OF_WATER_17492 -> Items.VIAL_OF_WATER_17492 + Items.JUJU_VIAL_OF_WATER -> Items.JUJU_VIAL_OF_WATER + else -> Items.VIAL_OF_WATER // Default to regular Vial of Water if the required vial is not recognized + } + task.doubleItemMessageBox(message, item1 = vialOfWaterItemID, item2 = potion.clean) player.filterableMessage(message) return false } - return inventory.contains(potion.clean) && inventory.contains(potion.requiredVial) } -} \ No newline at end of file + return inventory.contains(potion.clean) && inventory.contains(potion.requiredVial) && (inventory.contains(Items.VIAL_OF_WATER) || + inventory.contains(Items.VIAL_OF_WATER_17492) || + inventory.contains(Items.JUJU_VIAL_OF_WATER)) + } +} From e1bf3dbd68a3ffaa039e57e5ae12e84b16e10fda Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Sat, 16 Mar 2024 11:09:17 +0000 Subject: [PATCH 09/20] fix: coords issue for ardougne getting teleported into pole --- .../gg/rsmod/plugins/content/magic/teleports/TeleportSpell.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/magic/teleports/TeleportSpell.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/magic/teleports/TeleportSpell.kt index 2831e9c8c..786ce2381 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/magic/teleports/TeleportSpell.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/magic/teleports/TeleportSpell.kt @@ -13,7 +13,7 @@ enum class TeleportSpell(val spellName: String, val type: TeleportType, val endA LUMBRIDGE("Lumbridge Teleport", TeleportType.MODERN, Area(3221, 3218, 3222, 3219), 41.0), FALADOR("Falador Teleport", TeleportType.MODERN, Area(2961, 3376, 2969, 3385), 47.0), CAMELOT("Camelot Teleport", TeleportType.MODERN, Area(2756, 3476, 2758, 3480), 55.5), - ARDOUGNE("Ardougne Teleport", TeleportType.MODERN, Area(2659, 3300, 2665, 3310), 61.0), + ARDOUGNE("Ardougne Teleport", TeleportType.MODERN, Area(2664, 3305, 2665, 3307), 61.0), WATCHTOWER("Watchtower Teleport", TeleportType.MODERN, Area(2551, 3113, 2553, 3116), 68.0), TROLLHEIM("Trollheim Teleport", TeleportType.MODERN, Area(2888, 3675, 2890, 3678), 68.0), APE_ATOLL("Teleport to Ape Atoll", TeleportType.MODERN, Area(2760, 2781, 2763, 2784), 74.0), From 26bb6d5885af5b6b8bf2aa0c27389cdb7855f0f6 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Thu, 2 May 2024 23:53:10 +0100 Subject: [PATCH 10/20] feat: add golden bowl, fish bowl, dream vial, to watercontainerdata --- .../plugins/content/objs/watersource/WaterContainerData.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt index 11ca84e48..cf6ddd10f 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt @@ -19,6 +19,10 @@ enum class WaterContainerData(val startItem: Int, val resultItem: Int) { WATERING_CAN_5(startItem = Items.WATERING_CAN_5, resultItem = Items.WATERING_CAN_8), WATERING_CAN_6(startItem = Items.WATERING_CAN_6, resultItem = Items.WATERING_CAN_8), WATERING_CAN_7(startItem = Items.WATERING_CAN_7, resultItem = Items.WATERING_CAN_8), + DREAM_VIAL(startItem = Items.DREAM_VIAL_EMPTY, resultItem = Items.DREAM_VIAL_WATER), + FISH_BOWL(startItem = Items.FISHBOWL, resultItem = Items.FISHBOWL_6668), + GOLDEN_BOWL(startItem = Items.GOLD_BOWL, resultItem = Items.GOLDEN_BOWL_724), + GOLDEN_BOWL_BLESSED_WATER(startItem = Items.BLESSED_GOLD_BOWL, resultItem = Items.GOLDEN_BOWL_725), ; companion object { From e8244b7ad360d022e69b87672888e07e882f2150 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Thu, 2 May 2024 23:54:22 +0100 Subject: [PATCH 11/20] feat: added containerHandlerempty class for empty aka water etc --- .../empty/ContainerEmptyHandler.plugin.kts | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/ContainerEmptyHandler.plugin.kts diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/ContainerEmptyHandler.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/ContainerEmptyHandler.plugin.kts new file mode 100644 index 000000000..de224f67b --- /dev/null +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/ContainerEmptyHandler.plugin.kts @@ -0,0 +1,37 @@ +package gg.rsmod.plugins.content.items.empty + +data class Container( + val item: Int, + val emptyItem: Int, + val emptyMessage: String +) + +val containerHandler = ContainerInteractionHandler() + +val containers = listOf( + Container(Items.VIAL_OF_WATER, Items.VIAL, "You empty the vial of water."), + Container(Items.BUCKET_OF_WATER, Items.BUCKET, "You empty the bucket of water."), + Container(Items.JUG_OF_WATER, Items.EMPTY_JUG, "You empty the jug of water."), + Container(Items.VIAL_OF_WATER_17492, Items.VIAL_17490, "You empty the dung of water."), + Container(Items.JUJU_VIAL_OF_WATER, Items.JUJU_VIAL, "You empty the juju vial of water."), + Container(Items.CUP_OF_WATER, Items.EMPTY_CUP, "You empty the cup of water."), + Container(Items.FISHBOWL_6668, Items.FISHBOWL, "You empty the fish bow of water."), + Container(Items.GOLDEN_BOWL_724, Items.GOLD_BOWL, "You empty the golden bowl of water."), + Container(Items.GOLDEN_BOWL_725, Items.BLESSED_GOLD_BOWL, "You empty the golden bowl of water.") + // Add more containers if needed +) + +containers.forEach { containerHandler.emptyContainer(it) } + +class ContainerInteractionHandler { + fun emptyContainer(container: Container) { + on_item_option(item = container.item, option = "empty") { + val itemSlot = player.getInteractingItemSlot() + val itemHasBeenRemoved = player.inventory.remove(player.getInteractingItem(), beginSlot = player.getInteractingItemSlot()).hasSucceeded() + if(itemHasBeenRemoved) { + player.inventory[itemSlot] = Item(container.emptyItem) + player.filterableMessage(container.emptyMessage) + } + } + } +} \ No newline at end of file From 69c0cb4fca2e53675ac044600e76844555d0a28d Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Thu, 2 May 2024 23:54:56 +0100 Subject: [PATCH 12/20] feat: added unfishished potion empty handler --- .../UnfinishedPotionEmptyHandler.plugin.kts | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts new file mode 100644 index 000000000..89a0c3a16 --- /dev/null +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts @@ -0,0 +1,81 @@ +package gg.rsmod.plugins.content.items.empty + + +/** + * @author mrsla + */ + +data class UnfinishedPotion( + val item: Int, + val emptyItem: Int, + val emptyMessage: String +) + +val unfinishedPotionHandler = UnfinishedPotionInteractionHandler() + +val unfinishedPotions = listOf( +//Dungenning potions +UnfinishedPotion(Items.WERGALI_POTION_UNF, Items.VIAL_17490, "You empty the potion.") , +UnfinishedPotion(Items.SAGEWORT_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.VALERIAN_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.ALOE_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.WORMWOOD_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.MAGEBANE_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.FEATHERFOIL_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.WINTERS_GRIP_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.LYCOPUS_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.BUCKTHORN_POTION_UNF, Items.VIAL_17490, "You empty the potion."), +UnfinishedPotion(Items.WORMWOOD_POTION_UNF, Items.VIAL_17490, "You empty the potion."), + +//juju potions +UnfinishedPotion(Items.ERZILLE_POTION_UNF, Items.JUJU_VIAL, "You empty the potion."), +UnfinishedPotion(Items.UGUNE_POTION_UNF, Items.JUJU_VIAL, "You empty the potion."), +UnfinishedPotion(Items.ARGWAY_POTION_UNF, Items.JUJU_VIAL, "You empty the potion."), +UnfinishedPotion(Items.SHENGO_POTION_UNF, Items.JUJU_VIAL, "You empty the potion."), +UnfinishedPotion(Items.SAMADEN_POTION_UNF, Items.JUJU_VIAL, "You empty the potion."), + +//normal potions +UnfinishedPotion(Items.FELLSTALK_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.GUAM_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.MARRENTILL_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.TARROMIN_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.HARRALANDER_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.RANARR_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.IRIT_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.AVANTOE_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.KWUARM_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.CADANTINE_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.DWARF_WEED_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.TORSTOL_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.LANTADYME_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.TOADFLAX_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.SNAPDRAGON_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.ROGUES_PURSE_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.WEAPON_POISON_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.ANTIPOISON_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.ANTIPOISON_UNF_5951, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.GUTHIX_BALANCE_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.GUTHIX_BALANCE_UNF_7654, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.GUTHIX_BALANCE_UNF_7656, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.GUTHIX_BALANCE_UNF_7658, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.SPIRIT_WEED_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.MOUNTAIN_IRIT_POTION_UNF, Items.VIAL, "You empty the potion."), +UnfinishedPotion(Items.DIAMOND_DUST_POTION_UNF, Items.VIAL, "You empty the potion.") + +// Add more unfinished potions as needed +) + +unfinishedPotions.forEach { unfinishedPotionHandler.emptyUnfinishedPotion(it) } + +class UnfinishedPotionInteractionHandler { + fun emptyUnfinishedPotion(unfinishedPotion: UnfinishedPotion) { + on_item_option(item = unfinishedPotion.item, option = "empty") { + val itemSlot = player.getInteractingItemSlot() + val itemHasBeenRemoved = player.inventory.remove(player.getInteractingItem(), beginSlot = player.getInteractingItemSlot()).hasSucceeded() + if(itemHasBeenRemoved) { + player.inventory[itemSlot] = Item(unfinishedPotion.emptyItem) + player.filterableMessage(unfinishedPotion.emptyMessage) + } + } + } +} From 3b2c591ae15e6350573d4d601d124222dd5d11e2 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Fri, 3 May 2024 00:30:59 +0100 Subject: [PATCH 13/20] fix: missing dung vial of water --- .../rsmod/plugins/content/objs/watersource/WaterContainerData.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt index cf6ddd10f..66a69332d 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/objs/watersource/WaterContainerData.kt @@ -10,6 +10,7 @@ enum class WaterContainerData(val startItem: Int, val resultItem: Int) { BOWL_OF_WATER(startItem = Items.BOWL, resultItem = Items.BOWL_OF_WATER), CUP_OF_WATER(startItem = Items.EMPTY_CUP, resultItem = Items.CUP_OF_WATER), JUJU_VIAL_OF_WATER(startItem = Items.JUJU_VIAL, resultItem = Items.JUJU_VIAL_OF_WATER), + DUNG_VIAL_OF_WATER(startItem = Items.VIAL_17490, resultItem = Items.VIAL_OF_WATER_17492), SOFT_CLAY(startItem = Items.CLAY, resultItem = Items.SOFT_CLAY), WATERING_CAN(startItem = Items.WATERING_CAN, resultItem = Items.WATERING_CAN_8), WATERING_CAN_1(startItem = Items.WATERING_CAN_1, resultItem = Items.WATERING_CAN_8), From 6b102e300178c890289b56de543f9be277e61053 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Fri, 3 May 2024 00:31:27 +0100 Subject: [PATCH 14/20] fix: potion dont have empty potion --- .../items/empty/UnfinishedPotionEmptyHandler.plugin.kts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts index 89a0c3a16..b6409538f 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/items/empty/UnfinishedPotionEmptyHandler.plugin.kts @@ -25,7 +25,6 @@ UnfinishedPotion(Items.FEATHERFOIL_POTION_UNF, Items.VIAL_17490, "You empty the UnfinishedPotion(Items.WINTERS_GRIP_POTION_UNF, Items.VIAL_17490, "You empty the potion."), UnfinishedPotion(Items.LYCOPUS_POTION_UNF, Items.VIAL_17490, "You empty the potion."), UnfinishedPotion(Items.BUCKTHORN_POTION_UNF, Items.VIAL_17490, "You empty the potion."), -UnfinishedPotion(Items.WORMWOOD_POTION_UNF, Items.VIAL_17490, "You empty the potion."), //juju potions UnfinishedPotion(Items.ERZILLE_POTION_UNF, Items.JUJU_VIAL, "You empty the potion."), @@ -59,9 +58,6 @@ UnfinishedPotion(Items.GUTHIX_BALANCE_UNF_7654, Items.VIAL, "You empty the potio UnfinishedPotion(Items.GUTHIX_BALANCE_UNF_7656, Items.VIAL, "You empty the potion."), UnfinishedPotion(Items.GUTHIX_BALANCE_UNF_7658, Items.VIAL, "You empty the potion."), UnfinishedPotion(Items.SPIRIT_WEED_POTION_UNF, Items.VIAL, "You empty the potion."), -UnfinishedPotion(Items.MOUNTAIN_IRIT_POTION_UNF, Items.VIAL, "You empty the potion."), -UnfinishedPotion(Items.DIAMOND_DUST_POTION_UNF, Items.VIAL, "You empty the potion.") - // Add more unfinished potions as needed ) From e4b1cd54e510e61164b7a0e9a430d0ac29b50782 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Fri, 3 May 2024 00:37:51 +0100 Subject: [PATCH 15/20] fix: issue with dialogue --- .../gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts index 8e25c3e49..a0156b4c7 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts @@ -62,8 +62,8 @@ suspend fun chat(it: QueueTask) { } 2 -> { it.chatPlayer("How much does a paper cost?", facialExpression = FacialExpression.CONFUSED) - it.chatNpc( - "Just 50 coins! A steal, if you ask me. Do you want one or not?", + it.chatNpc("Just 50 coins! A steal,", + "if you ask me. Do you want one or not?", facialExpression = FacialExpression.HAPPY_TALKING ) when (it.options("Yes, please.", "No, thanks.")) { From 999989564ce952890593201fd20b4031e76d1469 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Mon, 20 May 2024 22:55:53 +0100 Subject: [PATCH 16/20] fix dialogue for benny and arhein --- .../plugins/content/areas/catherby/arhein.plugin.kts | 11 ++++++----- .../plugins/content/areas/varrock/benny.plugin.kts | 10 +++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/catherby/arhein.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/catherby/arhein.plugin.kts index 2c484ca91..6ec8b3178 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/catherby/arhein.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/catherby/arhein.plugin.kts @@ -57,14 +57,15 @@ suspend fun chat(it: QueueTask) { "Is that your ship?", facialExpression = FacialExpression.CONFUSED ) + it.chatNpc( - "Yes, I use it to make deliveries to my customers ", - "along the coast.", - "These crates here are all ready for my next trip.", - facialExpression = FacialExpression.CALM_TALK + "Yes, I use it to make deliveries to my customers " + + "along the coast." + + "These crates here are all ready for my next trip.", + facialExpression = FacialExpression.CALM_TALK, + wrap = true ) - when (it.options("Where do you deliver to?", "Are you rich then?")) { 1 -> { it.chatPlayer( diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts index a0156b4c7..0c1b7ebc6 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/areas/varrock/benny.plugin.kts @@ -62,10 +62,14 @@ suspend fun chat(it: QueueTask) { } 2 -> { it.chatPlayer("How much does a paper cost?", facialExpression = FacialExpression.CONFUSED) - it.chatNpc("Just 50 coins! A steal,", - "if you ask me. Do you want one or not?", - facialExpression = FacialExpression.HAPPY_TALKING + it.chatNpc( + "Just 50 coins! A steal," + + "if you ask me. Do you want one or not?", + facialExpression = FacialExpression.CALM_TALK, + wrap = true ) + + when (it.options("Yes, please.", "No, thanks.")) { 1 -> { it.chatPlayer("Yes, please.", facialExpression = FacialExpression.HAPPY_TALKING) From 47303ead5c3548f405fba6014e3722e0a68540fb Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Wed, 22 May 2024 01:34:08 +0100 Subject: [PATCH 17/20] feat: rename file to leatherdragonscript so its inline with other dragonscript comming soon --- .../impl/{DragonCombatScript.kt => LeatherDragonScript.kt} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/{DragonCombatScript.kt => LeatherDragonScript.kt} (98%) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/DragonCombatScript.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/LeatherDragonScript.kt similarity index 98% rename from game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/DragonCombatScript.kt rename to game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/LeatherDragonScript.kt index e01c46011..b4e654a7c 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/DragonCombatScript.kt +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/LeatherDragonScript.kt @@ -23,7 +23,7 @@ import gg.rsmod.plugins.content.combat.formula.MeleeCombatFormula * TODO Add proper sounds to fire attack once found. * @author Kevin Senez */ -object DragonCombatScript : CombatScript() { +object LeatherDragonScript : CombatScript() { /** * List of dragon ids to use this special combat script. From f45ec324768eda61a8c96579ff60caa920f58ccb Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Tue, 4 Jun 2024 08:57:21 +0100 Subject: [PATCH 18/20] feat: iv reorganization names of npcs --- .../game/model/combat/SlayerAssignment.kt | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/game/src/main/kotlin/gg/rsmod/game/model/combat/SlayerAssignment.kt b/game/src/main/kotlin/gg/rsmod/game/model/combat/SlayerAssignment.kt index a7be7988a..026ae8338 100644 --- a/game/src/main/kotlin/gg/rsmod/game/model/combat/SlayerAssignment.kt +++ b/game/src/main/kotlin/gg/rsmod/game/model/combat/SlayerAssignment.kt @@ -12,11 +12,15 @@ enum class SlayerAssignment(val identifier: String) { BEAR("Bears"), BLACK_DRAGON("Black Dragons"), BLOODVELD("Bloodvelds"), + BAT("Bats"), + BASILISK("Basilisk"), CAVE_BUG("Cave Bugs"), CAVE_SLIME("Cave Slimes"), CAVE_CRAWLER("Cave Crawlers"), CRAWLING_HAND("Crawling Hands"), COCKATRICE("Cockatrice"), + CATABLEPON("Catablepons"), + COW("Cows"), DESERT_LIZARD("Desert Lizards"), DOG("Dogs"), DWARF("Dwarves"), @@ -28,13 +32,22 @@ enum class SlayerAssignment(val identifier: String) { GHOUL("Ghouls"), GOBLIN("Goblins"), HILL_GIANT("Hill Giants"), - CATABLEPON("Catablepons"), + HELLHOUNDS("Hellhounds"), + HARPIE_BUG_SWARM("Harpie Bug Swarm"), ICEFIEND("Icefiends"), INFERNAL_MAGE("Infernal mages"), + ICE_WARRIOR("Ice Warriors"), + ICE_GIANT("Ice Giants"), + JELLYS("Jellys"), LESSER_DEMON("Lesser Demons"), MINOTAUR("Minotaurs"), MOSS_GIANT("Moss Giants"), MONKEY("Monkeys"), + MONKEY_GUARD("Monkeys Guard"), + MUTATED_BLOODVELD("Mutated Bloodveld"), + MUTATED_TERRORBIRD("Mutated Terrorbird"), + MUTATED_TORTOISE("Mutated Tortoise"), + MUTATED_ZYGOMITE("Mutated Zygomite"), NECHRYAEL("Nechryaels"), PYREFIEND("Pyrefiends"), ROCK_SLUG("Rockslugs"), @@ -43,10 +56,6 @@ enum class SlayerAssignment(val identifier: String) { SHADE("Shades"), SPIDER("Spiders"), WOLF("Wolves"), - HELLHOUNDS("Hellhounds"), + WALL_BEAST("Wall Beast"), ZOMBIE("Zombies"), - BAT("Bats"), - COW("Cows"), - ICE_WARRIOR("Ice Warriors"), - ICE_GIANT("Ice Giants"); } \ No newline at end of file From eb3de6930b9291c9b8866f9220d350a770467a1f Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Tue, 4 Jun 2024 09:00:12 +0100 Subject: [PATCH 19/20] feat: rename file name so we know what dragon script is what aka metal / frost/brutal etc --- .../scripts/combat_script_binding.plugin.kts | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/combat_script_binding.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/combat_script_binding.plugin.kts index 068d84a19..30300ccf6 100644 --- a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/combat_script_binding.plugin.kts +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/combat_script_binding.plugin.kts @@ -31,9 +31,36 @@ on_npc_combat(*AberrantSpectreCombatScript.ids) { /** * Sets the [on_npc_combat] for Regular Dragons */ -on_npc_combat(*DragonCombatScript.ids) { +on_npc_combat(*LeatherDragonScript.ids) { npc.queue { - DragonCombatScript.handleSpecialCombat(this) + LeatherDragonScript.handleSpecialCombat(this) + } +} + +/** + * Sets the [on_npc_combat] for Metal Dragons + */ +on_npc_combat(*MetalDragonScript.ids) { + npc.queue { + MetalDragonScript.handleSpecialCombat(this) + } +} + +/** + * Sets the [on_npc_combat] for Mithril Dragon + */ +on_npc_combat(*MithrilDragonScript.ids) { + npc.queue { + MithrilDragonScript.handleSpecialCombat(this) + } +} + +/** + * Sets the [on_npc_combat] for Mithril Dragon + */ +on_npc_combat(*FrostDragonScript.ids) { + npc.queue { + FrostDragonScript.handleSpecialCombat(this) } } @@ -46,6 +73,15 @@ on_npc_combat(*HighwaymanCombatScript.ids) { } } +/** + * Sets the [on_npc_combat] for Jellys + */ +on_npc_combat(*JellysCombatScript.ids) { + npc.queue { + JellysCombatScript.handleSpecialCombat(this) + } +} + /** * Sets the [on_npc_combat] for Cockatrices */ From f463b1962f0b452d8c4353d886d110e8ce0d1411 Mon Sep 17 00:00:00 2001 From: RSDEANEO Date: Sun, 23 Jun 2024 11:40:47 +0100 Subject: [PATCH 20/20] feat: added jelly combat etc --- .../combat/scripts/impl/JellysCombatScript.kt | 38 +++++++++ .../undeads/jelly_level_78.plugin.kts | 77 +++++++++++++++++++ 2 files changed, 115 insertions(+) create mode 100644 game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/JellysCombatScript.kt create mode 100644 game/plugins/src/main/kotlin/gg/rsmod/plugins/content/npcs/definitions/undeads/jelly_level_78.plugin.kts diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/JellysCombatScript.kt b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/JellysCombatScript.kt new file mode 100644 index 000000000..e0eaaddc6 --- /dev/null +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/combat/scripts/impl/JellysCombatScript.kt @@ -0,0 +1,38 @@ +package gg.rsmod.plugins.content.combat.scripts.impl + +import gg.rsmod.game.model.combat.CombatClass +import gg.rsmod.game.model.combat.StyleType +import gg.rsmod.game.model.combat.WeaponStyle +import gg.rsmod.game.model.entity.Player +import gg.rsmod.game.model.queue.QueueTask +import gg.rsmod.plugins.api.HitType +import gg.rsmod.plugins.api.cfg.Npcs +import gg.rsmod.plugins.api.ext.* +import gg.rsmod.plugins.content.combat.* +import gg.rsmod.plugins.content.combat.formula.MeleeCombatFormula + +object JellysCombatScript { + + val ids = intArrayOf(Npcs.JELLY, Npcs.JELLY_1638, Npcs.JELLY_1639,Npcs.JELLY_1640,Npcs.JELLY_1641,Npcs.JELLY_1642) + suspend fun handleSpecialCombat(it: QueueTask) { + val npc = it.npc + var target = npc.getCombatTarget() ?: return + + while (npc.canEngageCombat(target)) { + npc.facePawn(target) + if (npc.moveToAttackRange(it, target, distance = 1, projectile = false) && npc.isAttackDelayReady()) { + npc.prepareAttack(CombatClass.MAGIC, StyleType.MAGIC_MELEE, WeaponStyle.ACCURATE) + if (target is Player) { + val player = target + npc.animate(npc.combatDef.attackAnimation) + npc.dealHit(target = target, formula = MeleeCombatFormula, delay = 1, type = HitType.MAGIC) + } + npc.postAttackLogic(target) + } + it.wait(4) + target = npc.getCombatTarget() ?: break + } + npc.resetFacePawn() + npc.removeCombatTarget() + } +} \ No newline at end of file diff --git a/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/npcs/definitions/undeads/jelly_level_78.plugin.kts b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/npcs/definitions/undeads/jelly_level_78.plugin.kts new file mode 100644 index 000000000..030002afc --- /dev/null +++ b/game/plugins/src/main/kotlin/gg/rsmod/plugins/content/npcs/definitions/undeads/jelly_level_78.plugin.kts @@ -0,0 +1,77 @@ +package gg.rsmod.plugins.content.npcs.definitions.undeads + +import gg.rsmod.game.model.combat.SlayerAssignment +import gg.rsmod.game.model.combat.StyleType +import gg.rsmod.plugins.content.drops.DropTableFactory +import gg.rsmod.plugins.content.drops.global.Gems +import gg.rsmod.plugins.content.drops.global.Herbs +import gg.rsmod.plugins.content.drops.global.Rare + + +val ids = intArrayOf(Npcs.JELLY, Npcs.JELLY_1638, Npcs.JELLY_1639,Npcs.JELLY_1640,Npcs.JELLY_1641,Npcs.JELLY_1642) + +val table = DropTableFactory +val jelly = DropTableFactory.build { + guaranteed { + obj(Items.BONES, quantity = 1) + } + main { + total(1018) + obj(Items.CHAOS_RUNE, quantity = 15, slots = 52) + obj(Items.DEATH_RUNE, quantity = 5, slots = 52) + obj(Items.WATER_RUNE, quantity = 10, slots = 13) + obj(Items.BLOOD_RUNE, quantity = 7, slots = 13) + obj(Items.STEEL_BATTLEAXE, quantity = 1, slots = 210) + obj(Items.STEEL_2H_SWORD, quantity = 1, slots = 280) + obj(Items.STEEL_HATCHET, quantity = 1, slots = 210) + obj(Items.MITHRIL_KITESHIELD, quantity = 1, slots = 60) + obj(Items.MITHRIL_BOOTS, quantity = 1, slots = 13) + obj(Items.RUNE_FULL_HELM, quantity = 1, slots = 13) + obj(Items.STEEL_PLATEBODY, quantity = 1, slots = 13) + obj(Items.RUNE_BATTLEAXE, quantity = 1, slots = 3) + obj(Items.GOLD_BAR, quantity = 1, slots = 60) + obj(Items.THREAD, quantity = 10, slots = 13) + obj(Items.STARVED_ANCIENT_EFFIGY, quantity = 1, slots = 13) + } + table("Charms") { + total(990) + obj(Items.GOLD_CHARM, quantity = 1, slots = 75) // Adjusted Gold Charm drop rate + obj(Items.GREEN_CHARM, quantity = 1, slots = 220) + obj(Items.CRIMSON_CHARM, quantity = 1, slots = 35) // Adjusted Crimson Charm drop rate + obj(Items.BLUE_CHARM, quantity = 1, slots = 10) + nothing(slots = 650) // Adjusted nothing slots + } +} + +table.register(jelly, *ids) + +on_npc_death(*ids) { + table.getDrop(world, npc.damageMap.getMostDamage()!! as Player, npc.id, npc.tile) +} +ids.forEach { + set_combat_def(it) { + configs { + attackSpeed = 4 + respawnDelay = 3 + attackStyle = StyleType.SLASH + } + stats { + hitpoints = 750 + attack = 45 + strength = 45 + defence = 120 + magic = 45 + ranged = 1 + } + anims { + attack = 1537 + death = 1538 + block = 2309 + } + slayer { + assignment = SlayerAssignment.JELLYS + level = 52 + experience = 75.0 + } + } +} \ No newline at end of file