View/Edit #13:@lineage @lineage!

Switch to edit mode.

Name(s): @lineage @lineage!
1:  "@lineage  [obj]"
2:  "@lineage! [obj]"
3:  "Shows not only all children of object <obj> but all of thier children too, and those children's children, and so on, etc."
4:  "! Shows non-fertile objects as well."
5:  if (!argstr)
6:    return player:Tell("Syntax:  @lineage &lt;obj&gt;")
7:  endif
8:  if ($cmd_utils:object_match_failed(dobj = player:my_match_object(dobjstr), dobjstr))
9:    return
10: elseif (!children(dobj))
11:   return player:Tell($su:nn(dobj), " has no kids.")
12: endif
13: {ol, nl, go} = {{dobj}, {}, 1}
14: while (go)
15:   it = ol[1]
16:   ol = listdelete(ol, 1)
17:   cl = children(it)
18:   ol = {@ol, @cl}
19:   w = it in nl
20:   if (w)
21:     {beg, end} = {nl[1..w], nl[w + 1..length(nl)]}
22:     typeof(beg) != $LIST ? beg = {beg} | 0
23:     typeof(end) != $LIST ? end = {end} | 0
24:     cl ? nl = {@beg, "+", @cl, "-", @end} | 0
25:   else
26:     cl ? nl = {@nl, it, "+", @cl, "-"} | (nl = {@nl, it})
27:   endif
28:   ol ? 1 | (go = 0)
29:   ticks_left() < 1000 || seconds_left() < 2 ? suspend(0) | 0
30: endwhile
31: prefix = ""
32: for item in (nl)
33:   if (item == "+")
34:     prefix = prefix + ".."
35:   elseif (item == "-")
36:     prefix = prefix[1..length(prefix) - 2]
37:   else
38:     if (index(verb, "!") || children(item))
39:       player:tell(prefix, item, " (", `item:title() ! ANY => item.name', ")")
40:     endif
41:   endif
42:   ticks_left() < 1000 || seconds_left() < 2 ? suspend(0) | 0
43: endfor
44: "Merlinita@ShadowsInTyme"
45: "Eve (#2633)@SNM"
46: "Angelina@dtdream"
47: "Last modified by Dax (#789) on Mon Aug  7 21:46:45 2006 MDT."

Verb arguments: any none none
Verb perms: Readable NOT-Debug
Verb owned by: Lao-Tzu (#8084)

You are not logged in.

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