[Turn on line numbering]
arg cmdstr, cmd, args;
var what, dest, loc, opts, src, fromto;
(> .perms(caller(), 'command) <);
[src, args, opts] = args;
if (args && type(args[1]) == 'string) {
if (args[1] == "to")
args = delete(args, 1);
if (!args)
throw(~stop, "You must move to somewhere.");
catch ~obj, ~namenf, ~ambig
dest = $parse_lib.ref(join(args));
with
throw(~stop, traceback()[1][2]);
} else {
dest = args;
}
what = src[2];
dest = dest[2];
catch any {
loc = what.location();
fromto = " from " + ((| loc.name() |) || $nowhere) + " to " + dest.name();
(| what.tell("You are suddenly yanked" + fromto + " by " + .name() + ".") |);
(> what.move_to(dest) <);
// hook into messages eventually
(| loc.announce(what.name() + " suddenly disappears.") |);
(| dest.announce(what.name() + " suddenly appears.", what) |);
return "You move " + what.name() + fromto + ".";
} with {
(| what.tell("You feel as if " + .name() + " was incapable of moving you, you did not go anywhere.") |);
return traceback()[1][2];
}
// $#Edited: 10 Dec 98 21:43 $user_bruce
["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]