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.
This commit is contained in:
randy 2024-12-05 15:53:31 -07:00
parent a788b64e44
commit be7143be20

View file

@ -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
}