mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-20 05:20:24 -07:00
BetterShiftDrop
This commit is contained in:
parent
ed4cae15e7
commit
7db7048364
1 changed files with 28 additions and 0 deletions
28
plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.kt
Normal file
28
plugin-playground/src/main/kotlin/BetterShiftDrop/plugin.kt
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
package BetterShiftDrop
|
||||
|
||||
import plugin.Plugin
|
||||
import plugin.annotations.PluginMeta
|
||||
import plugin.api.API
|
||||
import plugin.api.MiniMenuEntry
|
||||
import rt4.Cheat
|
||||
import rt4.Keyboard
|
||||
|
||||
@PluginMeta(
|
||||
author = "bushtail",
|
||||
description = "Better dropping and destroying while holding shift.",
|
||||
version = 1.0
|
||||
)
|
||||
class plugin : Plugin() {
|
||||
override fun Init() {
|
||||
Cheat.shiftClick = false
|
||||
}
|
||||
override fun OnMiniMenuCreate(currentEntries: Array<out MiniMenuEntry>?) {
|
||||
if(currentEntries == null) return
|
||||
if(API.IsKeyPressed(Keyboard.KEY_SHIFT)) {
|
||||
for(entry in currentEntries) {
|
||||
if(entry.verb.toLowerCase() == "drop" || entry.verb.toLowerCase() == "destroy") continue
|
||||
if(!entry.isStrictlySecondary) entry.toggleStrictlySecondary()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue