--- deliantra/server/ext/rent.ext 2009/10/24 11:08:14 1.15 +++ deliantra/server/ext/rent.ext 2010/04/16 02:37:50 1.29 @@ -2,18 +2,22 @@ use List::Util; -my %apartment = ( +our %apartment = ( "/scorn/apartment/apartments" => [ 1, "scorn", "skorn"], "/santo_dominion/sdomino_appartment" => [ 10, "santo dominion", "domino"], "/darcap/darcap/apartment" => [ 30, "darcap", "thecap"], - "/celvear_port/tower2/tower2" => [ 100, "celvear port", "kevlar"], + "/gotischerbereich/steinwandstadt/sapartment1" => [ 100, "steinwandstadt", "konkret"], "/navar_city/apartments/apartment" => [ 250, "navar", "navar"], + "/celvear_port/tower2/tower2" => [ 300, "celvear port", "kevlar"], "/azumauindo/ranbounagisatoshi/apartments/sapartment" => [ 100, "乱暴渚都市", "benjo"], "/azumauindo/suno-yamatoshi/apartments/lapartment1" => [ 1000, "スノー大和島根", "sama"], - "/elmex/jeweler/jeweler_inn_upper" => [ 500, "jeweler town", "jewelor"], + "/valleynoy/jewelertown/jeweler_inn_upper" => [ 500, "jeweler town", "jewelor"], "/pup_land/nurnberg/apartment/main" => [ 300, "nürnberg", "sauerkraut"], - "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"], + "/lostwages/petapartment" => [ 5000, "lostwages", "losvegas"], + "/gotischerbereich/towerapartment/tower1" => [10000, "gotisch", "retreat"], + "/lake_country/Butakis/apartment" => [25000, "castle butakis", "expandor"], "/brest/apartments/brest_town_house" => [30000, "brest", "brecht"], + "/pup_land/lone_town/apartment/groundfloor" => [50000, "lone town", "looney"], ); # we have to special case some special cases :) @@ -95,7 +99,7 @@ while (my ($k, $v) = each %apartment) { my $type = exists $pl->{rent}{apartment}{$k} ? 1 : 2; - $pl->ob->reply (undef, "model \"$v->[2]\", situated in $v->[1] (" + $pl->ob->reply (undef, "model \"$v->[2]\", located in $v->[1] (" . (cf::cost_string_from_value $v->[0]) . "/hr)\n") if $type & $types; } @@ -162,6 +166,8 @@ on_enter => sub { my ($map, $pl, $x, $y) = @_; + return if $pl->ob->flag (cf::FLAG_WIZ); + my $pfx = sprintf "~%s/", $pl->ob->name; # only do something if entering ones own apartment @@ -173,7 +179,7 @@ if (check_balance $pl) { $pl->ob->reply (undef, "Welcome to your apartment, your highness!"); } else { - $pl->ob->reply (undef, "We are sorry, your highness, you have to pay your rent first."); + $pl->failmsg ("We are sorry, your highness, you have to pay your rent first."); reject_entry $pl; } @@ -181,7 +187,7 @@ } } - $pl->ob->reply (undef, "Your highness, you have to rent this apartment in The Apartment Shop in Scorn or other apartment shops first!"); + $pl->failmsg ("Your highness, you have to rent this apartment in The Apartment Shop in Scorn or other apartment shops first!"); reject_entry $pl; } },