View/Edit #9579:title titlec @morph*me @mood

Switch to edit mode.

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

Verb arguments: any any any
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: TriNitY (#9579)

You are not logged in.

[home | help | who | search | setup | code]