From be7143be206eb9246ad098bca0d6855d94e699f0 Mon Sep 17 00:00:00 2001 From: randy Date: Thu, 5 Dec 2024 15:53:31 -0700 Subject: [PATCH] Updated pickpocket to stop if health gets low If your health is low enough that you'll die if you get caught, then pickpocketing will stop repeating. --- .../main/content/global/skill/thieving/ThievingListeners.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Server/src/main/content/global/skill/thieving/ThievingListeners.kt b/Server/src/main/content/global/skill/thieving/ThievingListeners.kt index 77a7f25dc..c01ef2e6c 100644 --- a/Server/src/main/content/global/skill/thieving/ThievingListeners.kt +++ b/Server/src/main/content/global/skill/thieving/ThievingListeners.kt @@ -95,7 +95,11 @@ class ThievingListeners : InteractionListener { } } //pickpocket again. - InteractionListeners.run(node.id, IntType.NPC,"Pickpocket",player,node) + if (player.skills.lifepoints > pickpocketData.stunDamageMax) { + InteractionListeners.run(node.id, IntType.NPC,"Pickpocket",player,node) + } else { + player.sendMessage("It's probably not a good idea to continue with your injuries.") + } return@on true }