changeset 186:270e608bb0b6

branch merged.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 02 Nov 2008 18:36:28 +0800
parents dba0543daf36 (diff) bff16e6ee3ef (current diff)
children fa34cdb6879a
files
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/freeland.pl	Sun Nov 02 16:33:01 2008 +0800
+++ b/freeland.pl	Sun Nov 02 18:36:28 2008 +0800
@@ -7,10 +7,10 @@
 my @tradegoodText = qw/NULL 葡萄酒 大理石 水晶 硫磺/;
 my @wonderText = qw/NULL 赫菲斯拓斯的熔爐 蓋亞的神殿 狄奧尼索斯的花園 雅典娜的神殿 赫秘士的神殿 阿瑞斯的要塞 波賽頓的神殿 克羅瑟斯的神殿/;
 
-if($#ARGV != 1) {
-    die("Usage: $0 x y\n");
+if($#ARGV != 2) {
+    die("Usage: $0 x y tradegood (1 葡萄酒, 2 大理石, 3 水晶, 4 硫磺/)\n");
 }
-my ($x, $y) = @ARGV;
+my ($x, $y, $tradegood) = @ARGV;
 
 my @location = (($x + 6), ($x - 6), ($y + 6), ($y - 6));
 
@@ -27,7 +27,7 @@
 
 # 
 my @islands = Ikariam::Island->retrieve_from_sql(qq{
-        tradegood == 2
+        tradegood == $tradegood
     AND people < 16
     AND x <= $location[0]
     AND x >= $location[1]