Default apollo.

This commit is contained in:
Major-
2013-10-27 17:45:36 +00:00
commit 08c72bf9aa
406 changed files with 23043 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
on :command, :item, RIGHTS_ADMIN do |player, command|
args = command.arguments
if (1..2).include? args.length
id = args[0].to_i
amount = args.length == 2 ? args[1].to_i : 1
player.inventory.add id, amount
else
player.send_message "Syntax: ::item [id] [amount=1]"
end
end
on :command, :destroy, RIGHTS_ADMIN do |player, command|
args = command.arguments
if (1..2).include? args.length
id = args[0].to_i
amount = args.length == 2 ? args[1].to_i : 1
player.inventory.remove id, amount
else
player.send_message "Syntax: ::destroy [id] [amount=1]"
end
end
on :command, :empty, RIGHTS_ADMIN do |player, command|
player.inventory.clear
end
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<plugin>
<id>cmd-item</id>
<version>1</version>
<name>Item Commands</name>
<description>Adds ::item, ::destroy and ::empty commands.</description>
<authors>
<author>Graham</author>
</authors>
<scripts>
<script>item.rb</script>
</scripts>
<dependencies />
</plugin>