From 57dc6c7c9cd37885d26cfbf2cc0ccf75c322f7a6 Mon Sep 17 00:00:00 2001 From: Major- Date: Thu, 11 Sep 2014 21:24:40 +0100 Subject: [PATCH] Correct typo in ::objectinfo and print width and height, format command.rb. --- data/plugins/cmd/lookup/lookup.rb | 3 ++- data/plugins/util/command.rb | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/data/plugins/cmd/lookup/lookup.rb b/data/plugins/cmd/lookup/lookup.rb index 13a07c7c..9e0f1ee7 100644 --- a/data/plugins/cmd/lookup/lookup.rb +++ b/data/plugins/cmd/lookup/lookup.rb @@ -55,9 +55,10 @@ end # Sends the user a message with information about the object with the specified id. on :command, :objectinfo, RIGHTS_ADMIN do |player, command| args = command.arguments - next unless valid_arg_length(args, 1, player, 'Invalid syntax - ::objectinfo [npc id]') + next unless valid_arg_length(args, 1, player, 'Invalid syntax - ::objectinfo [object id]') id = args[0].to_i definition = ObjectDefinition.lookup(id) player.send_message("Object #{id} is called #{definition.name} and its description is \"#{definition.description}\".") + player.send_message("Its width is #{definition.width} and its height is #{definition.height}.") end \ No newline at end of file diff --git a/data/plugins/util/command.rb b/data/plugins/util/command.rb index 4673b861..dacbf48f 100644 --- a/data/plugins/util/command.rb +++ b/data/plugins/util/command.rb @@ -14,4 +14,14 @@ class Hash keys.each { |key| return false unless has_key?(key) } return true end +end + + +class Player + + # Returns whether or not the player's + def has_level(skill, level) + return skill_set.get_skill(skill).current_level >= level + end + end \ No newline at end of file