changeset 181:dba0543daf36

now, you can assign tradegood for search freeland
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 02 Nov 2008 16:52:40 +0800
parents 0cfc7a19a4d2
children d86186ae4329 270e608bb0b6
files freeland.pl
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/freeland.pl	Sun Nov 02 04:12:23 2008 +0800
+++ b/freeland.pl	Sun Nov 02 16:52:40 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]