Mercurial > eagle-eye
diff inactive-map.pl @ 119:755e5f5434e4
merged for fixed inactive-map.pl and hacks for highscore search.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Thu, 30 Oct 2008 15:08:56 +0800 |
parents | da0dd597401c |
children |
line wrap: on
line diff
--- a/inactive-map.pl Thu Oct 30 15:08:20 2008 +0800 +++ b/inactive-map.pl Thu Oct 30 15:08:56 2008 +0800 @@ -10,13 +10,13 @@ Ikariam::User->set_sql(inactivity => qq { SELECT user.id FROM user, cities, island - WHERE user.id == cities.user - AND cities.island == island.id + WHERE user.id = cities.user + AND cities.island = island.id AND island.x <= ? AND island.x >= ? AND island.y <= ? AND island.y >= ? - AND cities.status == 'i' + AND cities.status = 'i' } ); #Ikariam::User->set_sql(sheeps => qq { @@ -36,9 +36,9 @@ Ikariam::User->set_sql(sheeps => qq { SELECT user.id FROM user, cities - WHERE user.id == cities.user - AND cities.status == 'i' - AND user.trader_score_secondary >= 50000 + WHERE user.id = cities.user + AND cities.status = 'i' + AND user.trader_score_secondary >= 50000 AND user.army_score_main <= 40 } ); @@ -69,7 +69,7 @@ # 所得金錢 = 對方城鎮等級x(對方城鎮等級-1)x對方金錢/10000 my $robbery = $c->citylevel * ($c->citylevel - 1) * $sheep->trader_score_secondary / 10000; - next if($robbery < 2000); + next if($robbery < 1000); $maps{$island->x}{$island->y}{'id'} = $island->id; $maps{$island->x}{$island->y}{'density'} += 1; @@ -95,16 +95,16 @@ } </style></head><body><table border=1>"); - foreach my $x ($x1..$x2) + foreach my $y($y1..$y2) { print(OUT "<tr>"); - foreach my $y($y1..$y2) + foreach my $x ($x1..$x2) { # printf("<div stlye='float:left; background-color: black; padding: 0; Display:inline;'>o</div>"); if(defined($maps{$x}{$y}{'density'})) { my $c = 255 - (15 * $maps{$x}{$y}{'density'}); - printf(OUT "<td style=\"background-color: rgb(255,%d,%d);\"><a href=\"http://s2.ikariam.tw/index.php?view=island&id=%d\" title=\"[%d,%d] (%d)\">[%d,%d]</a></td>", - $c, $c, $maps{$x}{$y}{'id'}, $x, $y, $maps{$x}{$y}{'density'}, $x, $y); + printf(OUT "<td style=\"background-color: rgb(255,%d,%d);\"><a href=\"http://%s/index.php?view=island&id=%d\" title=\"[%d,%d] (%d)\">[%d,%d]</a></td>", + $c, $c, $::server, $maps{$x}{$y}{'id'}, $x, $y, $maps{$x}{$y}{'density'}, $x, $y); } else { printf(OUT "<td style=\"background-color: rgb(255,255,255);\">[%d,%d]</td>", $x, $y); }