… | |
… | |
48 | } |
48 | } |
49 | } |
49 | } |
50 | |
50 | |
51 | my @maplevel = ( |
51 | my @maplevel = ( |
52 | "some mysterious hideout", |
52 | "some mysterious hideout", |
53 | "his home", |
53 | "a private apartment", |
54 | "his guild", # wrong, this is any unique place !player-specific |
54 | "a guild guild", # wrong, this is any unique place !player-specific |
55 | "a nice place", |
55 | "some nice and safe place", |
56 | "a place with monsters", |
56 | "a place with monsters", |
57 | ); |
57 | ); |
58 | |
58 | |
59 | my %invite; |
59 | my %invite; |
60 | |
60 | |
… | |
… | |
75 | $who->message ("Your god isn't present here, you can't invite someone to unholy ground. " |
75 | $who->message ("Your god isn't present here, you can't invite someone to unholy ground. " |
76 | . "H<You can only use invite at places where you can use prayers.>"); |
76 | . "H<You can only use invite at places where you can use prayers.>"); |
77 | } elsif ($plevel >= $mlevel) { |
77 | } elsif ($plevel >= $mlevel) { |
78 | if (my $other = cf::player::find_active $args) { |
78 | if (my $other = cf::player::find_active $args) { |
79 | $who->message ("inviting player '$args', to cancel, use invite with no arguments or wait $TIMEOUT seconds"); |
79 | $who->message ("inviting player '$args', to cancel, use invite with no arguments or wait $TIMEOUT seconds"); |
80 | $other->ob->message ("$name invites you to $maplevel[$mlevel], to accept, use 'accept-invitation $name"); |
80 | $other->ob->message ("$name invites you to $maplevel[$mlevel], to accept, use C<accept-invitation $name> (or C<a-i $name>)"); |
81 | $invite{$name}{$args} = [time + $TIMEOUT, $map, $x, $y]; |
81 | $invite{$name}{$args} = [time + $TIMEOUT, $map, $x, $y]; |
82 | } else { |
82 | } else { |
83 | $who->message ("cannot invite '$args': no such player"); |
83 | $who->message ("cannot invite '$args': no such player"); |
84 | } |
84 | } |
85 | } elsif ($plevel) { |
85 | } elsif ($plevel) { |
… | |
… | |
112 | $who->message ("Sorry, $args\'s invitation has expired. " |
112 | $who->message ("Sorry, $args\'s invitation has expired. " |
113 | . "H<Invites are only valid for $TIMEOUT seconds, ask $args to invite you again.>"); |
113 | . "H<Invites are only valid for $TIMEOUT seconds, ask $args to invite you again.>"); |
114 | } else { |
114 | } else { |
115 | my $inv = delete $invite{$args}{$name}; |
115 | my $inv = delete $invite{$args}{$name}; |
116 | $who->message ("A godly force starts to pull you up..."); |
116 | $who->message ("A godly force starts to pull you up..."); |
117 | $who->goto ($inv->[1,2,3]); |
117 | $who->goto (@$inv[1,2,3]); |
118 | $who->message ("... and sets you down where $args invited you to."); |
118 | $who->message ("... and sets you down where $args invited you to."); |
119 | } |
119 | } |
120 | }; |
120 | }; |
121 | |
121 | |