forked from 2009Scape/Server
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:
parent
a788b64e44
commit
be7143be20
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue