All pastes #910894 Raw Edit

Murd0ck

public text v1 · immutable
·published 2008-02-20 08:52 UTC
rendered paste body
#include <IE.au3>

Global $strExplore = "http://apps.facebook.com/pirates/explore.php"
Global $strIndex = "http://apps.facebook.com/pirates/index.php"
Global $strFoundLand = "http://apps.facebook.com/pirates/found_land.php"
Global $strClearAction = "http://apps.facebook.com/pirates/clear_action.php"
Global $strIsland = "http://apps.facebook.com/pirates/island.php"
Global $strIslandBooty = "http://apps.facebook.com/pirates/island_booty.php"
Global $intMiles = 0
Global $intBank = 1

$oIE = _IECreate ($strIndex,0 ,0)

While (WinExists($oIE))
	$url = _IEPropertyGet ($oIE, "locationurl")
	If StringInStr($url, $strExplore) Or StringInStr($url, $strIndex) Then
		_IENavigate ($oIE, $strExplore)
		$intMiles += 1
	ElseIf StringInStr($url, $strFoundLand) Then
		_IENavigate ($oIE, "http://apps.facebook.com/pirates/head_towards_land.php")
		_IELoadWait ($oIE)
		Land($oIE)
	Else
		_IENavigate ($oIE, $strClearAction)
	EndIf
	
	If $intMiles >= 200 Then 
		_IEQuit ($oIE)
		ExitLoop
	EndIf
	
WEnd

Func Land($foIE)
	If $intMiles > 180 And $intBank Then
		_IENavigate ($foIE, "http://apps.facebook.com/pirates/bury_coins_arr.php")
		$intBank = 0
	Else
		_IENavigate ($foIE, $strIslandBooty)
	EndIf
	
	_IENavigate ($foIE, $strIndex)
	Sleep(50)
EndFunc   ;==>Land