View/Edit #2168:@f*riends @addpal @rmpal

Switch to edit mode.

Name(s): @f*riends @addpal @rmpal
1:  if (caller != this)
2:    raise(E_PERM, "Get your own friends!")
3:  endif
4:  f = $su:match_player(dobjstr)
5:  for x in (this.friendly)
6:    if (!$recycler:valid(x))
7:      player:tell("Warning: removing ", x, ", an invalid object, from the friends list.")
8:      this.friendly = setremove(this.friendly, x)
9:    endif
10: endfor
11: if (verb == "@f" || verb == "@friends")
12:   if (argstr == "off")
13:     player:tell("Well aren't we the rude one?")
14:   endif
15:   if (argstr == "all")
16:     $code_utils:show_who_listing(this.friendly)
17:   else
18:     $code_utils:show_who_listing(this:connected_ppl()) || player:notify("No friendly players currently logged in.")
19:   endif
20:   "I don't feel like having two verbs to do this so just combine everything into one"
21:   "add someone"
22: elseif (verb == "@addpal")
23:   this.friendly = setadd(this.friendly, f)
24:   this:tell(f:title(), " added.")
25:   "remove someone"
26: elseif (verb == "@rmpal")
27:   this.friendly = setremove(this.friendly, f)
28:   this:tell(f:title(), " removed.")
29: endif
30: "Last modified by Avator (#2168) on Thu Oct 24 16:36:17 2002 MDT."

Verb arguments: any none none
Verb perms: Readable NOT-Debug
Verb owned by: Avator (#2168)

You are not logged in.

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