--- deliantra/server/ext/invite.ext 2007/02/11 02:25:25 1.3 +++ deliantra/server/ext/invite.ext 2008/05/04 08:55:52 1.5 @@ -72,7 +72,8 @@ my $mlevel = map_level $map, $x, $y; if (is_damned ($map, $x, $y)) { - $who->message ("Your god isn't present here, you can't invite someone to unholy ground."); + $who->message ("Your god isn't present here, you can't invite someone to unholy ground. " + . "H"); } 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"); @@ -82,9 +83,11 @@ $who->message ("cannot invite '$args': no such player"); } } elsif ($plevel) { - $who->message ("Valriel deems you not worthy yet. Gorokh is annoyed by your sacrilege."); + $who->message ("Valriel deems you not worthy yet. Gorokh is annoyed by your sacrilege. " + . "H"); } else { - $who->message ("You haven't proven your worthyness in the mountain maze."); + $who->message ("You haven't proven your worthyness in the mountain maze. " + . "H"); } } else { $who->message ("canceling all invites"); @@ -92,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) = @_; @@ -115,17 +104,18 @@ my ($map, $x, $y) = ($who->map, $who->x, $who->y); if (is_damned ($map, $x, $y)) { - $who->message ("You can't be invited from a place where your god isn't present."); + $who->message ("You can't be invited from a place where your god isn't present. " + . "H"); } elsif (!exists $invite{$args} || !exists $invite{$args}{$name}) { $who->message ("Sorry, $args hasn't invited you."); } elsif ($invite{$args}{$name}[0] < time) { - $who->message ("Sorry, $args\'s invitation has expired."); + $who->message ("Sorry, $args\'s invitation has expired. " + . "H"); } 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."); - } };