#include $pExplore = "http://apps.facebook.com/pirates/explore.php" $pIndex = "http://apps.facebook.com/pirates/index.php" $pFoundMerchantShip = "http://apps.facebook.com/pirates/found_merchant_ship.php" $pFoundLand = "http://apps.facebook.com/pirates/found_land.php" ;$pEnemyShip = "http://apps.facebook.com/pirates/enemy_ship.php" $pThrowBomb = "http://apps.facebook.com/pirates/throw_bomb.php" If WinExists("Facebook | Pirates") Then $oIE = _IEAttach("Facebook | Pirates") Else $oIE = _IECreate ("http://apps.facebook.com/pirates/index.php") EndIf While (1) $url = _IEPropertyGet($oIE, "locationurl") If StringInStr($url, $pExplore) OR StringInStr($url, $pIndex) Then _IENavigate ($oIE, "http://apps.facebook.com/pirates/explore.php") ElseIf StringInStr($url, $pThrowBomb) OR StringInStr($url, $pFoundMerchantShip) Then _IENavigate($oIE, "http://apps.facebook.com/pirates/clear_action.php") ElseIf StringInStr($url, $pFoundLand) Then land($oIE, $url) EndIf WEnd Func land($foIE, $fUrl) _IENavigate ($foIE, "http://apps.facebook.com/pirates/head_towards_land.php") _IENavigate ($foIE, "http://apps.facebook.com/pirates/island_booty.php") _IENavigate ($foIE, "http://apps.facebook.com/pirates/index.php") EndFunc