ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/rent.ext
(Generate patch)

Comparing deliantra/server/ext/rent.ext (file contents):
Revision 1.3 by root, Thu Jan 4 18:38:22 2007 UTC vs.
Revision 1.6 by root, Sun Jan 21 21:28:27 2007 UTC

12 "/pup_land/nurnberg/apartment/main" => [ 300, "nürnberg", "sauerkraut"], 12 "/pup_land/nurnberg/apartment/main" => [ 300, "nürnberg", "sauerkraut"],
13 "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"], 13 "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"],
14 "/brest/apartments/brest_town_house" => [30000, "brest", "brecht"], 14 "/brest/apartments/brest_town_house" => [30000, "brest", "brecht"],
15); 15);
16 16
17sub teleport {
18 my ($pl, $map, $x, $y) = @_;
19
20 my $portal = cf::object::new "exit";
21
22 $portal->slaying ($map);
23 $portal->stats->hp ($x);
24 $portal->stats->sp ($y);
25 $portal->apply ($pl->ob);
26 $portal->destroy;
27}
28
29# we have to special case some special cases :) 17# we have to special case some special cases :)
30sub reject_entry { 18sub reject_entry {
31 my ($pl) = @_; 19 my ($pl) = @_;
32 20
33 cf::override; 21 cf::override;
34 22
35 $pl->goto_map ("/world/world_105_115", 2, 34) 23 $pl->goto ("/world/world_105_115", 2, 34)
36 unless 24 unless
37 $pl->ob->map 25 $pl->ob->map
38 && !$pl->ob->map->{path}{user_rel}; 26 && !$pl->ob->map->{path}{user_rel};
39} 27}
40 28
200 $pl->ob->reply (undef, "Sir, you have to rent this apartment in The Apartment Shop in Scorn first!"); 188 $pl->ob->reply (undef, "Sir, you have to rent this apartment in The Apartment Shop in Scorn first!");
201 reject_entry $pl; 189 reject_entry $pl;
202 }, 190 },
203; 191;
204 192
205our $RENT_TIMER = Event->timer (after => 60, interval => 3600, data => cf::WF_AUTOCANCEL, cb => sub { 193our $RENT_TIMER = Event->timer (
194 reentrant => 0,
195 after => 60,
196 interval => 3600,
197 data => cf::WF_AUTOCANCEL,
198 cb => sub {
206 pay_balance $_ for cf::player::list; 199 pay_balance $_ for cf::player::list;
200 },
207}); 201);
208 202

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines