Mercurial > eagle-eye
changeset 372:9f19fe8d189c
withdraw the ship 10 minutes first, we have only need 2 ships for blocking a town.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 14 Apr 2009 17:00:05 +0800 |
parents | 0522468991c1 |
children | dd3d76f43999 |
files | disturb.pl |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/disturb.pl Tue Apr 14 16:59:14 2009 +0800 +++ b/disturb.pl Tue Apr 14 17:00:05 2009 +0800 @@ -25,8 +25,12 @@ if($from_city == $myCity && $to_city == $blockadeCity) { # Cancel the last attack $ikariam->{mech}->get(sprintf("http://%s/index.php%s", $::server, $extractor->find('//td[9]/a/@href'))); + $ikariam->logout; + + sleep(60); # Create a new one. + $ikariam->login; $ikariam->changeCity($myCity); $ikariam->blockadeCity($blockadeCity, { blockadeDuration => 8*60*60, @@ -34,7 +38,7 @@ }); $ikariam->logout; - sleep($travelTime*60); + sleep(($travelTime-1)*60); next LOOP; } }