Add kotlin port of the walk/run toggle plugin

This commit is contained in:
Gary Tierney
2017-06-25 02:49:58 +01:00
parent 8dc10e80bf
commit cb14c32b71
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
name = "run"
+10
View File
@@ -0,0 +1,10 @@
import org.apollo.game.message.impl.ButtonMessage
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()
}