View/Edit #12:@join

Switch to edit mode.

Name(s): @join
1:  "Moves the player to the location of the requested player or object."
2:  set_task_perms(callers() ? caller_perms() | player)
3:  victim = $string_utils:match_local_player(dobjstr)
4:  if (valid(dobj) && !valid(victim))
5:    victim = dobj
6:  elseif ($command_utils:player_match_failed(victim, dobjstr))
7:    return
8:  endif
9:  "Lets be a pain in the neck and refuse to @join when using one exit will do. -- Dax"
10: for exit in (`player.location:exits() ! ANY => {}')
11:   if (`exit:isa($exit) ! ANY => 0' && exit.dest == victim.location)
12:     player:sub_tell("%1 is in the next room!  Use the '%2' exit, instead of teleporting.  Thanks for not polluting!", victim, exit)
13:     return
14:   endif
15: endfor
16: dest = player.location
17: places = victim.location:isa($editor) ? {@$list_utils:reverse($object_utils:locations(origin = {#-1, @victim.location.original}[1 + (victim in victim.location.active)])), origin} | $list_utils:reverse($object_utils:locations(victim))
18: for place in (places)
19:   if ($object_utils:isa(place, $room))
20:     dest = place
21:   endif
22: endfor
23: dest == victim.location || player:sub_tell("%1 is in %2, moving you to %3.", victim, victim.location, dest)
24: prepstr = victim
25: "This hack is to store the victim for potential use in later verbs."
26: dobjstr = tostr(dobj = this)
27: iobjstr = tostr(iobj = dest)
28: player:_move_obj(dobj, iobjstr)
29: "Last modified by whiz (#3135) on Tue May  8 15:32:18 2001 MDT."
30: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:04 2002 MDT)."
31: "Last modified by Dax (#789) on Sat Aug 17 14:50:04 2002 MDT."

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]