Housekeeping

This commit is contained in:
KeepBotting
2019-03-26 14:05:40 -04:00
parent a0c78ced90
commit 739c331860
135 changed files with 4 additions and 4 deletions
+20
View File
@@ -0,0 +1,20 @@
require 'java'
java_import 'org.apollo.game.model.Animation'
java_import 'org.apollo.game.model.Graphic'
# Makes the player perform the animation with the specified id.
on :command, :animate, RIGHTS_MOD do |player, command|
args = command.arguments
next unless valid_arg_length(args, 1, player, 'Invalid syntax - ::animate [animation-id]')
player.play_animation(Animation.new(args[0].to_i))
end
# Makes the player perform the graphic with the specified id.
on :command, :graphic, RIGHTS_MOD do |player, command|
args = command.arguments
next unless valid_arg_length(args, 1, player, 'Invalid syntax - ::graphic [graphic-id]')
player.play_graphic(Graphic.new(args[0].to_i))
end
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<plugin>
<id>cmd-animate</id>
<version>1</version>
<name>Animate Commands</name>
<description>Adds animation-related commands.</description>
<authors>
<author>Major</author>
</authors>
<scripts>
<script>animate.rb</script>
</scripts>
<dependencies />
</plugin>