Mercurial > eagle-eye
comparison scan.pl @ 5:dbb97c4265ba
implemented the scores search tool
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 08 Oct 2008 01:51:28 +0800 |
parents | 0fb73a7a0b94 |
children | 2040ccc95670 |
comparison
equal
deleted
inserted
replaced
4:c0287e8ff168 | 5:dbb97c4265ba |
---|---|
6 | 6 |
7 my $i = new Ikariam("s2.ikariam.tw", "chihchun", "c795d57d"); | 7 my $i = new Ikariam("s2.ikariam.tw", "chihchun", "c795d57d"); |
8 $i->login; | 8 $i->login; |
9 | 9 |
10 my @islands; | 10 my @islands; |
11 if($#ARGV >= 2) { | 11 if($#ARGV >= 1) { |
12 @islands = $i->viewWorldMap($ARGV[0], $ARGV[1]); | 12 @islands = $i->viewWorldMap($ARGV[0], $ARGV[1]); |
13 } else { | 13 } else { |
14 @islands = $i->viewHomeMap(); | 14 @islands = $i->viewHomeMap(); |
15 } | 15 } |
16 # my @islands = $i->viewWorldMap(50, 34); | |
17 | 16 |
18 foreach my $island (@islands) | 17 foreach my $island (@islands) |
19 { | 18 { |
20 printf("checking island %d\n", $island->{id}); | 19 printf("checking island %d\n", $island->{id}); |
21 if(my $c = Ikariam::Islands->retrieve($island->{id})) { | 20 if(my $c = Ikariam::Islands->retrieve($island->{id})) { |
31 foreach my $city (@cities) | 30 foreach my $city (@cities) |
32 { | 31 { |
33 $city->{island} = $island->{id}; | 32 $city->{island} = $island->{id}; |
34 if(my $c = Ikariam::Cities->retrieve($city->{cityId})) | 33 if(my $c = Ikariam::Cities->retrieve($city->{cityId})) |
35 { | 34 { |
36 #foreach my $i (keys(%$city)) | 35 foreach my $i (keys(%$city)) |
37 #{ | 36 { |
38 # eval($c->$i($city->{$i})); | 37 eval($c->$i($city->{$i})); |
39 # printf("%s %s ", $i, $city->{$i}); | 38 # printf("%s %s ", $i, $city->{$i}); |
40 #} | 39 } |
41 #print ("\n"); | 40 #print ("\n"); |
42 | 41 |
43 $c->autoupdate(1); | 42 $c->autoupdate(1); |
44 $c->update(); | 43 $c->update(); |
45 } else { | 44 } else { |
47 } | 46 } |
48 printf("city %d %s saved\n", $city->{cityId}, $city->{cityname}); | 47 printf("city %d %s saved\n", $city->{cityId}, $city->{cityname}); |
49 } | 48 } |
50 } | 49 } |
51 | 50 |
52 | |
53 # TODO | |
54 # $i->worldmap($x, $y); | |
55 # http://s2.ikariam.tw/index.php?view=worldmap_iso | |
56 # xajax getMapData | |
57 # xajaxargs[] 54 | |
58 # xajaxargs[] 30 | |
59 # xajaxr 1223302744553 | |
60 # $i->getAcount() account database. | |
61 | |
62 # 經濟, 軍事 | |
63 # http://s2.ikariam.tw/index.php | |
64 # view highscore | |
65 # highscoreType score | |
66 # offset -1 | |
67 # searchUser chihchun | |
68 | |
69 # $i->getCityInfo(); | 51 # $i->getCityInfo(); |