mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 08:39:11 +00:00
Correct typo in ::objectinfo and print width and height, format command.rb.
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user