# HG changeset patch # User "Rex Tsai " # Date 1228160308 -28800 # Node ID 8355ec8514f9c97849b107d7fef5b6efb603490e # Parent c1333052a4ede05928d1a826ff8d1b9e1a163bf3 refined output data diff -r c1333052a4ed -r 8355ec8514f9 planner.pl --- a/planner.pl Tue Dec 02 02:08:50 2008 +0800 +++ b/planner.pl Tue Dec 02 03:38:28 2008 +0800 @@ -84,15 +84,18 @@ my \$ikariam = new Ikariam(\$::server, \$::user, \$::pass); EOF -printf ("# %s %s %s %s\n", $targetCity->cityname, $targetCity->owner, $targetCity->island->x, $targetCity->island->y); +printf ("# %s %s [%s:%s]\n", $targetCity->owner, $targetCity->cityname, $targetCity->island->x, $targetCity->island->y); +printf ("# http://%s/index.php?view=island&id=%d&selectCity=%d\n", $::server, $targetCity->island->id, $targetCity->id); for(my $i = ($#cities + 1) ; $i-- ; $i < 0 ) { - if($i ne $#cities){ + if($i ne $#cities) { + # TODO, 計算港口速度 + # 減掉 cities[$i+1]->buliding->port 的速度 printf("sleep(%d*60);\n", ($cities[$i+1]->{distance} - $cities[$i]->{distance})); } - printf("\n\n\n# %s %s %dm\n", $cities[$i]->{name}, $cities[$i]->{type}, $cities[$i]->{distance}); + printf("\n# %s %s %dm\n", $cities[$i]->{name}, $cities[$i]->{type}, $cities[$i]->{distance}); printf('$ikariam->login;' . "\n"); if($cities[$i]->{type} eq "navy") {