]> ruin.nu Git - NDIRC.git/blobdiff - Commands/PA.pm
Better help for the point commands
[NDIRC.git] / Commands / PA.pm
index 0d834846ae6e30b3edb9986f94fd657b5116441f..b6cd08c3e071f9e59aafdc55b14447f503ba8dd1 100644 (file)
@@ -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){