From a6ad4f8f3b8c0f406c57b327a893747e62540db9 Mon Sep 17 00:00:00 2001 From: randy Date: Wed, 13 Nov 2024 14:10:24 -0700 Subject: [PATCH] High Alching Ring of Wealth now adds permanent unlock. --- .../skill/magic/modern/ModernListeners.kt | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt b/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt index 0d35ef56a..d56b8230b 100644 --- a/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt +++ b/Server/src/main/content/global/skill/magic/modern/ModernListeners.kt @@ -230,6 +230,23 @@ class ModernListeners : SpellListener("modern"){ return false } + var loop = true + + val ringOfWealth = intArrayOf(14646,14644,14642,14640,14638) + if(high && ringOfWealth.contains(item.id)){ + if (getAttribute(player, "ringofwealth:unlocked", false)) { + player.sendMessage("You have already unlocked the permanent Wealth effect and can no longer ") + player.sendMessage("alchemize this ring.") + return false + } else { + player.setAttribute("/save:ringofwealth:unlocked", true) + player.sendMessage("Combining the Alchemy spell with the Wealth enchantment causes a strange ") + player.sendMessage("interaction. You are now permanently enchanted with the Wealth effect and ") + player.sendMessage("no longer need to wear the ring to get the benefit of increased rare drops.") + loop = false + } + } + if (player.pulseManager.current !is MovementPulse) { player.pulseManager.clear() } @@ -265,8 +282,12 @@ class ModernListeners : SpellListener("modern"){ //showMagicTab(player) setDelay(player, 5) } - counter++ - return false + if (loop) { + counter++ + return false + } else { + return true + } } }) return true