This commit is contained in:
Gary Tierney
2019-08-04 02:00:48 +01:00
parent 12b4bef1f8
commit 8c50d3e091
20 changed files with 284 additions and 122 deletions
+4 -5
View File
@@ -1,10 +1,9 @@
import org.apollo.game.message.impl.ButtonMessage
import org.apollo.game.plugin.kotlin.message.ButtonClick
import org.apollo.game.plugin.kotlin.message.on
val WALK_BUTTON_ID = 152
val RUN_BUTTON_ID = 153
on { ButtonMessage::class }
.where { widgetId == WALK_BUTTON_ID || widgetId == RUN_BUTTON_ID }
.then {
it.toggleRunning()
}
on(ButtonClick, WALK_BUTTON_ID) { player.toggleRunning() }
on(ButtonClick, RUN_BUTTON_ID) { player.toggleRunning() }