# HG changeset patch # User "Rex Tsai " # Date 1239699605 -28800 # Node ID 9f19fe8d189c2e9fb08c473616faa62e79fd9c65 # Parent 0522468991c1433724a47ffb03576a800d930f09 withdraw the ship 10 minutes first, we have only need 2 ships for blocking a town. diff -r 0522468991c1 -r 9f19fe8d189c disturb.pl --- 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; } }