View/Edit #456:parse_rspec

Switch to edit mode.

Name(s): parse_rspec
1:  set_task_perms(caller_perms())
2:  {v} = args
3:  m = match(v, "^%([^.:!]*%)%(%([.:!]%)%([^ ]*%|%)%|%)$")
4:  if (!m)
5:    return player:tell("Invalid specifier: ", v)
6:  endif
7:  o = player:match_object(ostr = v[m[3][1][1]..m[3][1][2]])
8:  if (!valid(o))
9:    return player:tell("Can't find: ", ostr)
10: endif
11: t = "PVF"
12: encnames = {}
13: if (m[3][3][1])
14:   t = {"P", "V", "F"}[v[m[3][3][1]] in {".", ":", "!"}]
15:   if (m[3][4][1] && m[3][4][1] < m[3][4][2])
16:     v = v[m[3][4][1]..m[3][4][2]]
17:     if (t == "V")
18:       v = `verb_info(o, v)[3] ! E_VERBNF => v'
19:     endif
20:     encnames = {t + v}
21:   endif
22: endif
23: if (!encnames)
24:   if (index(t, "P"))
25:     for p in (o:all_nonclear_properties())
26:       encnames = {@encnames, "P" + p}
27:     endfor
28:   endif
29:   if (index(t, "V"))
30:     for p in (verbs(o))
31:       encnames = {@encnames, "V" + p}
32:     endfor
33:   endif
34:   if (index(t, "F"))
35:   endif
36:   for x in (encnames)
37:     x in this.default_ignores && (encnames = setremove(encnames, x))
38:     match(x, "^P_cvs") && (encnames = setremove(encnames, x))
39:     `x in o.cvs_ignore && (encnames = setremove(encnames, x)) ! E_PROPNF'
40:   endfor
41: endif
42: return {o, @encnames}
43: "Last modified by manta (#7165) on Mon Sep 24 14:08:27 2001 MDT."
44: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:06 2002 MDT)."
45: "Last modified by Dax (#789) on Sat Aug 17 14:50:06 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

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