View/Edit #12:@addfeature*! @add-feature*!

Switch to edit mode.

Name(s): @addfeature*! @add-feature*!
1:  "Usage:  @addfeature <feature object(s)>"
2:  "Add an object to your features list."
3:  "@addfeature! adds the object at the top of your features list."
4:  set_task_perms(player)
5:  if (length(args) > 1)
6:    FOs = {}
7:    for x in (args)
8:      if (valid(dobj = this:my_match_object(x)))
9:        FOs = {@FOs, dobj}
10:     else
11:       $command_utils:object_match_failed(dobj, x)
12:     endif
13:   endfor
14: elseif (dobjstr)
15:   dobj = this:my_match_object(dobjstr)
16:   if ($command_utils:object_match_failed(dobj, dobjstr))
17:     return
18:   endif
19:   FOs = {dobj}
20: else
21:   return player:tell("Usage:  @addfeature &lt;object(s)&gt;")
22: endif
23: for x in (FOs)
24:   if (x in player.features)
25:     player:tell(x.name, " is already one of your features.")
26:   elseif (player:add_feature(x, verb[length(verb)] == "!"))
27:     player:tell($string_utils:nn(x), " added as a feature.")
28:   else
29:     player:tell("You can't seem to add ", $string_utils:nn(x), " to your features list.")
30:   endif
31: endfor
32: "Last modified by Dax (#789) on Thu Nov  8 11:38:30 2001 MST."

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

You are not logged in.

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