diff --git a/Server/src/main/content/region/morytania/quest/naturespirit/NSUtils.kt b/Server/src/main/content/region/morytania/quest/naturespirit/NSUtils.kt index 03263c6c4..c47754946 100644 --- a/Server/src/main/content/region/morytania/quest/naturespirit/NSUtils.kt +++ b/Server/src/main/content/region/morytania/quest/naturespirit/NSUtils.kt @@ -85,10 +85,12 @@ object NSUtils { fun castBloom(player: Player): Boolean{ var success = false val region = forId(player.location.regionId) + /* if (player.skills.prayerPoints < 1) { player.packetDispatch.sendMessage("You don't have enough prayer points to do this.") return false } + */ handleVisuals(player) val locs = player.location.surroundingTiles for (o in locs) { @@ -114,6 +116,17 @@ object NSUtils { } } } + if (success) { + player.skills.decrementPrayerPoints(RandomFunction.random(1, 3).toDouble()) + } else { + if (getAttribute(player, "bonecrusher:enabled", false)) { + setAttribute(player, "/save:bonecrusher:enabled",false) + player.packetDispatch.sendMessage("Automatic Bone Burial: Disabled.") + } else { + setAttribute(player, "/save:bonecrusher:enabled",true) + player.packetDispatch.sendMessage("Automatic Bone Burial: Enabled.") + } + } return success } @@ -122,7 +135,6 @@ object NSUtils { * animation. */ private fun handleVisuals(player: Player) { - player.skills.decrementPrayerPoints(RandomFunction.random(1, 3).toDouble()) playAudio(player, Sounds.CAST_BLOOM_1493) val AROUND_YOU = player.location.surroundingTiles for (location in AROUND_YOU) {