… | |
… | |
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 |
|
|
11 | |
9 | |
12 | my $TIMEOUT = 60; |
10 | my $TIMEOUT = 60; |
13 | |
11 | |
14 | # determine whether map cell is damned |
12 | # determine whether map cell is damned |
15 | sub is_damned { |
13 | sub is_damned { |
… | |
… | |
98 | sub teleport { |
96 | sub teleport { |
99 | my ($pl, $map, $x, $y) = @_; |
97 | my ($pl, $map, $x, $y) = @_; |
100 | |
98 | |
101 | my $portal = cf::object::new "exit"; |
99 | my $portal = cf::object::new "exit"; |
102 | |
100 | |
103 | $portal->set_slaying ($map->path); |
101 | $portal->slaying ($map->path); |
104 | $portal->set_hp ($x); |
102 | $portal->hp ($x); |
105 | $portal->set_sp ($y); |
103 | $portal->sp ($y); |
106 | |
104 | |
107 | $portal->apply ($pl); |
105 | $portal->apply ($pl); |
108 | |
106 | |
109 | $portal->free; |
107 | $portal->free; |
110 | } |
108 | } |
… | |
… | |
126 | $who->message ("A godly force starts to pull you up..."); |
124 | $who->message ("A godly force starts to pull you up..."); |
127 | teleport $who, @{$inv}[1,2,3]; |
125 | teleport $who, @{$inv}[1,2,3]; |
128 | $who->message ("... and sets you down where $args invited you to."); |
126 | $who->message ("... and sets you down where $args invited you to."); |
129 | |
127 | |
130 | } |
128 | } |
131 | } |
129 | }; |
132 | |
130 | |