# HG changeset patch # User "Rex Tsai " # Date 1225292918 -28800 # Node ID da0dd597401cd0e3ff05ec969941d7179fbb79e3 # Parent 8155f93283963ab70deeade977ef6c32f404aaac fixed the x/y position diff -r 8155f9328396 -r da0dd597401c inactive-map.pl --- a/inactive-map.pl Wed Oct 29 17:53:46 2008 +0800 +++ b/inactive-map.pl Wed Oct 29 23:08:38 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 @@ } "); - foreach my $x ($x1..$x2) + foreach my $y($y1..$y2) { print(OUT ""); - foreach my $y($y1..$y2) + foreach my $x ($x1..$x2) { # printf("
o
"); if(defined($maps{$x}{$y}{'density'})) { my $c = 255 - (15 * $maps{$x}{$y}{'density'}); - printf(OUT "", - $c, $c, $maps{$x}{$y}{'id'}, $x, $y, $maps{$x}{$y}{'density'}, $x, $y); + printf(OUT "", + $c, $c, $::server, $maps{$x}{$y}{'id'}, $x, $y, $maps{$x}{$y}{'density'}, $x, $y); } else { printf(OUT "", $x, $y); }
[%d,%d][%d,%d][%d,%d]