ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/invite.ext
(Generate patch)

Comparing deliantra/maps/perl/invite.ext (file contents):
Revision 1.5 by root, Tue Feb 7 23:35:56 2006 UTC vs.
Revision 1.6 by root, Thu Feb 9 01:15:25 2006 UTC

4# level 2: private rooms and saving maps (guilds, some other public saving maps) 4# level 2: private rooms and saving maps (guilds, some other public saving maps)
5# level 3: invite everywhere where no monsters are on the map 5# level 3: invite everywhere where no monsters are on the map
6# level 4: invite everywhere 6# level 4: invite everywhere
7 7
8# implement a 'follow' command 8# implement a 'follow' command
9
10#TODO: fon't invite on damned ground
9 11
10my $TIMEOUT = 60; 12my $TIMEOUT = 60;
11 13
12# determine level available to the player 14# determine level available to the player
13sub player_level { 15sub player_level {
107 if (!exists $invite{$args} || !exists $invite{$args}{$name}) { 109 if (!exists $invite{$args} || !exists $invite{$args}{$name}) {
108 $who->message ("Sorry, $args hasn't invited you."); 110 $who->message ("Sorry, $args hasn't invited you.");
109 } elsif ($invite{$args}{$name}[0] < time) { 111 } elsif ($invite{$args}{$name}[0] < time) {
110 $who->message ("Sorry, $args\'s invitation has expired."); 112 $who->message ("Sorry, $args\'s invitation has expired.");
111 } else { 113 } else {
114 my $inv = delete $invite{$args}{$name};
112 $who->message ("A godly force starts to pull you up..."); 115 $who->message ("A godly force starts to pull you up...");
113 teleport $who, @{$invite{$args}{$name}}[1,2,3]; 116 teleport $who, @{$inv}[1,2,3];
114 $who->message ("... and sets you down where $args invited you to."); 117 $who->message ("... and sets you down where $args invited you to.");
118
115 } 119 }
116} 120}
117 121

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines