forked from 2009Scape/Server
Removed gloves of silence requirement for auto-pickpocketing
This commit is contained in:
parent
251934d3a9
commit
02a36f7bf7
1 changed files with 6 additions and 10 deletions
|
|
@ -68,9 +68,8 @@ class ThievingListeners : InteractionListener {
|
|||
return@on true
|
||||
}
|
||||
|
||||
//Custom portion. If the player has gloves of silence, only proceed every other tick
|
||||
val glovesOfSilence = player.equipment.contains(Items.GLOVES_OF_SILENCE_10075,1)
|
||||
if (!glovesOfSilence || GameWorld.ticks % 2 == 0) {
|
||||
//Custom portion. Repeat pickpocket, only proceed every other tick
|
||||
if (GameWorld.ticks % 2 == 0) {
|
||||
|
||||
player.animator.animate(PICKPOCKET_ANIM)
|
||||
val lootTable = pickpocketRoll(player, pickpocketData.low, pickpocketData.high, pickpocketData.table)
|
||||
|
|
@ -87,17 +86,14 @@ class ThievingListeners : InteractionListener {
|
|||
node.asNpc().face(null)
|
||||
} else {
|
||||
playAudio(player, Sounds.PICK_2581)
|
||||
if (!glovesOfSilence) {
|
||||
player.lock(2)
|
||||
}
|
||||
//player.lock(2)
|
||||
lootTable.forEach { player.inventory.add(it) }
|
||||
player.skills.addExperience(Skills.THIEVING,pickpocketData.experience)
|
||||
}
|
||||
}
|
||||
// if wearing gloves of silence, pickpocket again.
|
||||
if (glovesOfSilence) {
|
||||
InteractionListeners.run(node.id, IntType.NPC,"Pickpocket",player,node)
|
||||
}
|
||||
//pickpocket again.
|
||||
InteractionListeners.run(node.id, IntType.NPC,"Pickpocket",player,node)
|
||||
|
||||
return@on true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue