mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 00:38:18 +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.
|
# Sends the user a message with information about the object with the specified id.
|
||||||
on :command, :objectinfo, RIGHTS_ADMIN do |player, command|
|
on :command, :objectinfo, RIGHTS_ADMIN do |player, command|
|
||||||
args = command.arguments
|
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
|
id = args[0].to_i
|
||||||
definition = ObjectDefinition.lookup(id)
|
definition = ObjectDefinition.lookup(id)
|
||||||
player.send_message("Object #{id} is called #{definition.name} and its description is \"#{definition.description}\".")
|
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
|
end
|
||||||
@@ -15,3 +15,13 @@ class Hash
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
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