--- deliantra/server/ext/invite.ext 2008/05/03 09:30:38 1.4 +++ deliantra/server/ext/invite.ext 2008/05/17 16:40:01 1.6 @@ -77,7 +77,7 @@ } elsif ($plevel >= $mlevel) { if (my $other = cf::player::find_active $args) { $who->message ("inviting player '$args', to cancel, use invite with no arguments or wait $TIMEOUT seconds"); - $other->ob->message ("$name invites you to $maplevel[$mlevel], to accept, use 'accept-invitation $name"); + $other->ob->message ("$name invites you to $maplevel[$mlevel], to accept, use C (or C)"); $invite{$name}{$args} = [time + $TIMEOUT, $map, $x, $y]; } else { $who->message ("cannot invite '$args': no such player"); @@ -95,20 +95,6 @@ } }; -sub teleport { - my ($pl, $map, $x, $y) = @_; - - my $portal = cf::object::new "exit"; - - $portal->slaying ($map->path); - $portal->stats->hp ($x); - $portal->stats->sp ($y); - - $portal->apply ($pl); - - $portal->destroy; -} - cf::register_command "accept-invitation" => sub { my ($who, $args) = @_; @@ -128,7 +114,7 @@ } else { my $inv = delete $invite{$args}{$name}; $who->message ("A godly force starts to pull you up..."); - teleport $who, @{$inv}[1,2,3]; + $who->goto (@$inv[1,2,3]); $who->message ("... and sets you down where $args invited you to."); } };