cmd_invisible.rb

znmud-0.0.1/cmd/zombie/cmd_invisible.rb · 651 B

From the archive znmud-minimal-0.0.1.tar.gz

Download the archive   « Back to the archive contents

#
# file::    cmd_invisible.rb

# This source code copyright (C) 2009 Craig Smith
# All rights reserved.
#
# Released under the terms of the TeensyMUD Public License
# See LICENSE file for additional information.
#

module Cmd

  bindtextdomain("cmd")

  # The invisible command
  def cmd_invisible(args)
	if has_attribute? :invisible
		del_attribute :invisible
		sendto _("You are no longer invisible.")
		sendroom _("%{name} appears out of nowhere!" % {:name => name})
	else
		add_attribute :invisible
		sendto _("You are now invisible.")
		sendroom _("%{name} vanishes into thin air!" % {:name => name})
	end
  end

end

Site Stats

Snippets: 1791
Codebases: 571