X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Commands%2FPA.pm;h=b6cd08c3e071f9e59aafdc55b14447f503ba8dd1;hb=a94fe8052ba36e7ffbf608aa6b69b4a895126e38;hp=0d834846ae6e30b3edb9986f94fd657b5116441f;hpb=21cb796be35d56fc6620af557355ab57b6c00e88;p=NDIRC.git diff --git a/Commands/PA.pm b/Commands/PA.pm index 0d83484..b6cd08c 100644 --- a/Commands/PA.pm +++ b/Commands/PA.pm @@ -29,6 +29,14 @@ use MooseX::MethodAttributes; use NDIRC::Misc; use ND::Include; + +sub bcalc + : Help(Lists bcalc and stats info) +{ + my ($self, $c, $msg) = @_; + $c->reply("http://game.planetarion.com/bcalc.pl http://game.planetarion.com/manual.php?page=stats"); +} + sub p : Help(usage: .p X:Y:Z | or .p nick with high enough access) { @@ -166,7 +174,7 @@ SELECT value,score FROM planet_stats WHERE tick = $2 AND my $attackers = $c->model->prepare(q{ SELECT coords(p.x,p.y,p.z), ruler, planet FROM current_planet_stats p JOIN planet_stats ps using (id) -WHERE ps.tick = $1 AND (2000.0*$2*$3/ps.value)::int = $4 +WHERE ps.tick = $1 AND trunc(2000.0*$2*$3/ps.value)::int = $4 }); $attackers->execute($tick,$agents,$value,$stolen); if ($attackers->rows == 0){