diff freeland.pl @ 189:7150e7b3dbec

merge
author Thinker K.F. Li <thinker@branda.to>
date Sun, 02 Nov 2008 22:32:09 +0800
parents dba0543daf36
children a9847bf80058
line wrap: on
line diff
--- a/freeland.pl	Sun Nov 02 22:31:06 2008 +0800
+++ b/freeland.pl	Sun Nov 02 22:32:09 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]