View/Edit #13:@list #* $* @cat @type @lsit

Switch to edit mode.

Name(s): @list #* $* @cat @type @lsit
1:  "#<obj> [for <code>]"
2:  "#<obj>.[<property>] [for <code>]"
3:  "#<obj>:[<verb>] [<dobj> <prep> <iobj>] [with(out) parens|numbers] [ranges]"
4:  "#<obj>![<file>] [ranges]"
5:  if (player != this)
6:    return $msg:mtell("huh")
7:  endif
8:  set_task_perms(this)
9:  if (verb[1] == "#" && verb != "#")
10:   dobjstr = tostr(verb, " ", dobjstr)
11: elseif (verb[1] == "$" && verb != "$")
12:   dobjstr = tostr(verb, " ", dobjstr)
13: endif
14: dobjstr = $string_utils:trimr(dobjstr)
15: if (!dobjstr)
16:   return $msg:mtell("nothing")
17: endif
18: "Do we have code?  If so, save it, and remove from command line."
19: (code = prepstr == "for" ? iobjstr | "") && (prepstr = iobjstr = "")
20: "Rebuild the command line without code and with the #-split."
21: args = $string_utils:explode(tostr(dobjstr, " ", prepstr, " ", iobjstr))
22: "Split the object from the prop/verb/file-name."
23: punct = min(index(args[1] + ".", "."), index(args[1] + ":", ":"), index(args[1] + "!", "!"))
24: dobjstr = args[1][1..punct - 1]
25: name = args[1][punct + 1..$]
26: punct = `args[1][punct] ! E_RANGE'
27: args = listdelete(args, 1)
28: excuse = dobj = this:my_match_object(dobjstr)
29: !valid(dobj) && $code_utils:toint(dobjstr) != E_TYPE && valid(dobj = $code_utils:toobj("#" + dobjstr)) && (excuse = dobj)
30: if (!$command_utils:object_match_failed(excuse, dobjstr))
31:   if (!punct)
32:     "Object"
33:     data = dobj
34:   else
35:     if (name)
36:       if (punct == ".")
37:         data = `dobj.(name) ! ANY'
38:         if (typeof(data) != $ERR)
39:           player:tell(dobj, ".\"", name, "\"  ", `property_info(dobj, name)[2] ! E_PROPNF => "(builtin)"')
40:         endif
41:       elseif (punct == ":")
42:         return this:_list_verb(dobj, name, args)
43:       elseif (punct == "!")
44:         return this:_list_file(dobj, name, args)
45:       endif
46:     else
47:       "List the object's props/verbs/files"
48:       if (punct == ".")
49:         data = `properties(dobj) ! ANY'
50:       elseif (punct == ":")
51:         data = `verbs(dobj) ! ANY'
52:       elseif (punct == "!")
53:         data = `dobj:filelist() ! ANY'
54:       endif
55:     endif
56:   endif
57:   if (!code)
58:     player:notify(player:eval_value_to_string(data))
59:   elseif (!player.programmer)
60:     player:tell("Sorry, you cannot use the code functions on this verb until you become a programmer.")
61:   else
62:     program = strsub(code + ";", "%#", toliteral(data))
63:     end = 1
64:     while ("A" <= (l = program[end]) && l <= "Z")
65:       end = end + 1
66:     endwhile
67:     if ((value = this:eval_cmd_string(program, 0))[1])
68:       player:notify(this:eval_value_to_string(value[2]))
69:     else
70:       player:notify(value[2])
71:       nerrors = length(value[2])
72:       player:notify(tostr(nerrors, " error", nerrors == 1 ? "." | "s."))
73:     endif
74:   endif
75: endif
76: "Last modified by Dax (#789) on Wed May  4 06:46:28 2005 MDT."

Verb arguments: any any any
Verb perms: Readable NOT-Debug
Verb owned by: Dax (#789)

You are not logged in.

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