cmd_drop.rb
znmud-0.0.1/cmd/zombie/cmd_drop.rb · 646 B
From the archive znmud-minimal-0.0.1.tar.gz
Download the archive « Back to the archive contents
#
# file:: cmd_drop.rb
# Additional Contributor: Craig Smith
#
# This source code copyright (C) 2005 by Jon A. Lambert
# All rights reserved.
#
# Released under the terms of the TeensyMUD Public License
# See LICENSE file for additional information.
#
module Cmd
def cmd_drop(args)
case args
when nil, ""
sendto("Drop what?")
when "all"
objects.each do |q|
add_event(id,q.id,:drop)
end
else
objs = find_inv(args)
if objs.size > 0
objs.each do |o|
add_event(id,o.id,:drop)
end
else
sendto("You are not carrying #{args}")
end
end
end
end