--- deliantra/server/ext/gravedigger.ext 2010/03/20 16:43:37 1.3 +++ deliantra/server/ext/gravedigger.ext 2010/04/21 08:13:11 1.5 @@ -2,7 +2,7 @@ our $WAIT_TIME = 5 * 60; # 5 minutes # the max price is base_price * 1.5 -our $MAX_BASE_PRICE = 100 * 100 * 25; # 50 platinum (for lvl 115 players) +our $MAX_BASE_PRICE = 100 * 100 * 25; # 25 platinum (for lvl 115 players) our $MIN_BASE_PRICE = 100 * 10; # 10 gold sub calc_player_price { @@ -20,6 +20,10 @@ sub calc_text_price_ratio { my ($txt) = @_; + if ($txt =~ /killed\s+by\s+foolery/) { + return 0.001; # greatly punish foolery, the gravedigger doesn't like this! + } + my $some_constant = 111; my $cnt = 0; @@ -52,9 +56,9 @@ } } - my (@stones) = cf::match::match <<'MATCH', $who; -(type=SIGN and { $_->msg =~ /hero.*killed.*by/si }) in inv -MATCH + my (@stones) = cf::match::match + '(type=SIGN and { $_->msg =~ /hero.*killed.*by/si }) in inv', + $who; unless (@stones) { $who->reply ($npc, "I'm sorry sir, but you don't have any gravestones with you " @@ -84,9 +88,11 @@ my $price_txt = cf::cost_string_from_value $price; $who->reply ($npc, - "I gave you $price_txt for the gravestone of " - . $player - . ". Poor fellow, $reason can be tricky..."); + "I gave you $price_txt for the gravestone of " . $player . ". " + . ($reason =~ /^\s*foolery/ + ? "Stupid fellow. Being foolish and making my job" + . " harder than it already is kind of upsets me..." + : "Poor fellow, $reason can be tricky...")); $who->{gravedigger_last_time} = time; };