View/Edit #2385:@addpals @rmpals @pals

Switch to edit mode.

Name(s): @addpals @rmpals @pals
1:  "This verb was made by Thoth (#9780)"
2:  if (verb == "@addpal" || verb == "@rmpal")
3:    who = $su:match_player(argstr)
4:    if (verb == "@addpal")
5:      player.pals = setadd(player.pals, who)
6:      player:Tell(who:title() + " (" + tostr(who) + ") has been added to your pals list.")
7:    elseif (verb == "@rmpal")
8:      if (who in player.pals)
9:        player.pals = setremove(player.pals, who)
10:       player:Tell(who:title() + " (" + tostr(who) + ") has been removed from your pals list.")
11:     else
12:       player:tell("He's not even in your pals list!")
13:     endif
14:   endif
15: elseif (verb == "@pals")
16:   while (#-1 in this.pals || #-2 in this.pals || #-3 in this.pals)
17:     this.pals = setremove(this.pals, #-1)
18:     this.pals = setremove(this.pals, #-2)
19:     this.pals = setremove(this.pals, #-3)
20:     suspend(0)
21:   endwhile
22:   pals = {}
23:   for x in (this.pals)
24:     pals = {@pals, {x:title(), tostr(x), x:connected() ? "Awake" | "Asleep", x.location:title(), tostr(x.location)}}
25:   endfor
26:   player:tellColumns({20, 4, 6, 10, 4}, {"Pal", "#", "Status", "Location", "#"}, @pals)
27: endif
28: "Last modified by Slackeur (#55) on Mon Dec 28 16:19:12 1998 MST."

Verb arguments: any any any
Verb perms: Readable NOT-Debug
Verb owned by: NiceGuy (#2385)

You are not logged in.

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