mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 16:49:11 +00:00
Add running (no energy support).
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<plugin>
|
||||
<id>run</id>
|
||||
<version>1</version>
|
||||
<name>Running</name>
|
||||
<description>Adds support for running via the options interface.</description>
|
||||
<authors>
|
||||
<author>Major</author>
|
||||
</authors>
|
||||
<scripts>
|
||||
<script>run.rb</script>
|
||||
</scripts>
|
||||
<dependencies />
|
||||
</plugin>
|
||||
@@ -0,0 +1,17 @@
|
||||
WALK_BUTTON_ID = 152
|
||||
RUN_BUTTON_ID = 153
|
||||
|
||||
on :button, WALK_BUTTON_ID do |player|
|
||||
player.set_running(false)
|
||||
end
|
||||
|
||||
on :button, RUN_BUTTON_ID do |player|
|
||||
player.set_running(true)
|
||||
end
|
||||
|
||||
on :command, :run do |player, command|
|
||||
running = player.is_running
|
||||
player.set_running(!running)
|
||||
|
||||
player.send_message(running ? "You are now running." : "You are no longer running.")
|
||||
end
|
||||
Reference in New Issue
Block a user