Switch to edit mode.
Name(s): title titlec @morph*me @mood1: "Copied from Cecil (#7407):@morph Jul 2 15:18:19 2001"
2: `this.morph ! E_PROPNF => add_property(this, "morph", this.name, {this, "rc"})'
3: `this.old_morph ! E_PROPNF => add_property(this, "old_morph", this.name, {this, "rc"})'
4: `this.mood ! E_PROPNF => add_property(this, "mood", "", {this, "rc"})'
5: if (verb[1] == "t")
6: if (typeof(extra = `this:extratitle() ! ANY => 0') == $STR && extra)
7: return extra
8: endif
9: return this.morph && typeof(name = this.morph) == $STR ? this.mood ? tostr(name, " (", this.mood, ")") | name | (this.morph = this.name)
10: elseif (verb == "@mood")
11: if (callers() && !$perm_utils:controls(caller_perms(), this))
12: raise(E_PERM)
13: endif
14: callers() && (argstr = tostr(@args))
15: if (!argstr)
16: player:tell("Your mood is: ", this.mood)
17: player:tell("To delete your @mood, type \"@mood delete\"")
18: elseif (argstr == "delete")
19: this.mood = ""
20: player:tell("You have deleted your mood.")
21: else
22: this.mood = argstr
23: player:tell("You become ", this.mood)
24: this.location:Announce_All_but({this}, this:title() + " becomes " + this.mood)
25: endif
26: else
27: if (callers() && !$perm_utils:controls(caller_perms(), this))
28: return E_PERM
29: endif
30: callers() && (argstr = tostr(@args))
31: quiet = 0
32: index(argstr, "-quiet") == 1 || index(argstr, " -quiet") && (quiet = 1)
33: if (index(argstr, "-name=\""))
34: name = argstr[(i = index(argstr, "-name=\"")) + 7..index(argstr[i + 7..$], "\"") + i + 5 || length(argstr)]
35: elseif (index(argstr, "-last"))
36: name = this.old_morph
37: elseif (index(argstr, "-norm") || argstr == "delete")
38: name = this.name
39: elseif (!quiet && argstr)
40: name = argstr
41: else
42: name = $cmd_utils:read("a new name")
43: endif
44: this.old_morph = this.morph
45: this.morph = name
46: player:tell("You have morphed into ", this:title())
47: !quiet && this:sub_announce((msg = `this:msg_omorph() ! E_PROPNF => 0') ? msg | "%1 has morphed into %2", this.old_morph, this:title())
48: endif
49: "Last modified by Dax (#789) on Tue May 3 14:03:27 2005 MDT."