Dump of #112297 (Generic Dyable LRPG Thing) @create #517 named Generic Dyable LRPG Thing:Generic Dyable LRPG Thing,dyable thing,dyable,LRPG dyable ;;#112297.("manufactured") = 923451666 "#112297.("worth") => E_PERM (Permission denied) ;;#112297.("condition") = E_NONE ;;#112297.("odrop_failed_msg") = "% to drop %t but fails!" ;;#112297.("odrop_succeeded_msg") = "% %t." ;;#112297.("otake_succeeded_msg") = "% up %t." "#112297.("key") => E_PERM (Permission denied) ;;#112297.("aliases") = {"Generic Dyable LRPG Thing", "dyable thing", "dyable", "LRPG dyable"} ;;#112297.("description") = "A tangible object for use in the LambdaMOO RPG, which also allows you to change its colour." ;;#112297.("object_size") = {3144, 1141286565} @verb #112297:"set_color set_colour" this none this @program #112297:set_color "if (caller != this)"; if (!$local.rpg:trusted(caller_perms())) return E_PERM; else {colour} = args; this:set_name(strsub(this.name, this.colour, colour)); if (!index(this.name, colour)) this:set_name((colour + " ") + this.name); endif aliases = this.aliases; for i in [1..length(aliases)] aliases[i] = strsub(aliases[i], this.colour, colour); endfor if (!(this.name in aliases)) aliases = {this.name, @aliases}; endif this:set_aliases(aliases); this.colour = colour; endif "Hydros (#106189) - Thu Jan 6, 2005 - Changed the security check. Robin the hood wasn't able to change his hood colour."; . @verb #112297:"dye" this to any rxd @program #112297:dye if (this.unique || (!this.dyable)) player:tell("You can't dye that."); elseif (this.location != player) player:tell("You'll have to be holding it to accomplish that."); elseif (!((color = iobjstr) in `this.dye_colours ! E_PROPNF => $local.rpg.object_db.colours')) player:tell(color, " is not an acceptable colour!"); elseif (color == this.colour) player:tell("It's already coloured ", color, "!"); else $local.rpg:say_action(("%N % %p %t " + color) + "."); this:set_colour(color); endif . @verb #112297:"description" this none this @program #112297:description return $string_utils:pronoun_sub(pass(@args)); . @verb #112297:"hidden_verbs" this none this @program #112297:hidden_verbs {who} = args; prev = pass(who); if (this.unique || (!this.dyable)) prev = {@prev, {$local.rpg.dyable, "dye", {"this", "at/to", "any"}}}; endif return prev; . "***finished***