Add magic plugin, more decoders and commands.

This commit is contained in:
Major-
2013-11-03 23:48:17 +00:00
parent ac4c8408a3
commit 82b12e30a2
58 changed files with 1730 additions and 96 deletions
+10 -9
View File
@@ -1,19 +1,20 @@
require 'java'
java_import 'org.apollo.game.model.Position'
on :command, :pos, RIGHTS_ADMIN do |player, command|
on :command, :pos, RIGHTS_MOD do |player, command|
player.send_message "You are at: " + player.position.to_s
end
on :command, :tele, RIGHTS_ADMIN do |player, command|
args = command.arguments
if (2..3).include? args.length
x = args[0].to_i
y = args[1].to_i
z = args.length == 3 ? args[2].to_i : 0
player.teleport Position.new(x, y, z)
else
player.send_message "Syntax: ::tele [x] [y] [z=0]"
unless (2..3).include? args.length
player.send_message "Invalid syntax - ::tele [x] [y] [optional-z]"
return
end
x = args[0].to_i
y = args[1].to_i
z = args.length == 3 ? args[2].to_i : 0
player.teleport Position.new(x, y, z)
end