// Petrarch
// Merentha Lib 1.0
// <goto>
varargs int command(string str) {
object env, ob;
if(!str) return notify_fail("Syntax: goto <person|room>\n");
if(!ob=find_player(str)) {
if(str[0..0]!="/") str=this_player()->query_cwd()+str;
if(file_size(str)<0 && file_size(str+".c")<0) return notify_fail("Person/room does not exist.\n");
if(this_player()->move(str)) return notify_fail("Move error.\n");
this_player()->force_me("look");
return 1;
}
if(!env=environment(ob)) return notify_fail("No environment for "+str+"\n");
if(this_player()->move(env)) return notify_fail("Move error.\n");
this_player()->force_me("look");
return 1;
}
string help() {
return "Syntax: goto <person|file>\n\nThis command allows you to instantly transport to the same location as the person you specify, or to the room you name.";
}