diff sheep.pl @ 18:fd44e3a1f800

fixed the cache. show tradegoodText of sheeps. refined enemy.pl
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 08 Oct 2008 16:10:01 +0800
parents e68f4cadfabd
children 552528bb4917
line wrap: on
line diff
--- a/sheep.pl	Wed Oct 08 15:25:48 2008 +0800
+++ b/sheep.pl	Wed Oct 08 16:10:01 2008 +0800
@@ -4,6 +4,7 @@
 use Data::Dumper;
 
 package main;
+my @tradegoodText = qw/NULL 葡萄酒 大理石 水晶 硫磺/;
 
 Ikariam::User->has_many(cities => 'Ikariam::Cities');
 Ikariam::User->set_sql(inactivity => qq {
@@ -69,8 +70,9 @@
                 $sheep->trader_score_secondary, $c->status, $sheep->score, $sheep->army_score_main, $sheep->name, $sheep->ally, $members);
 
             my $island = Ikariam::Island->retrieve($c->island);
-            printf("%s,%d,[%d,%d],http://s2.ikariam.tw/index.php?view=island&id=%d\n", $c->cityname, $c->citylevel, 
+            printf("%s %d [%d,%d] %s http://s2.ikariam.tw/index.php?view=island&id=%d\n", $c->cityname, $c->citylevel, 
                 $island->x, $island->y,
+                $tradegoodText[$island->tradegood],
                 $island->id);
         }
         printf("\n");