Highlight the item you want and hit enter to pull up the 'Price History, Bid, and Sort' menu. Highlight bid and the bot will do the rest.
Settings: Look in the macro, pretty straight forward. Windower or not, location of windower, and bid-price.
Notes: Make sure ffact is in a folder called FFACT inside wherever you put this macro.
-Alt-F1 starts the bot, Alt-F2 stops it - keep pressing alt-f2 - timing is not great.
Code: Select all
// FFACT
Include FFACT\FfactTemp.inc
//Registry Events
ReadRegistry $POLInstallPath = hkey_local_machine,Software\PlayOnlineUS\InstallFolder,1000
ReadRegistry $AcToolsVersion = hkey_current_user,Software\AcTool,Version
Constructs
Procedures = List
End
Constants // Only change the top 5 settings
LaunchPolAuto = 1 // AutoLaunches POL
RunWindowed = 1 // 1 = Use Windower | 0 = Not
PathToWindower = D:\FFXI_Fisher_Bot\Windower 2.1\launch.bat // Path to windower
WaitBid = 90 // How often to bid between unsuccessful bids
BidAmount = 4000 // Amount to bid on item
zOnes = 0
zTens = 0
zHundreds = 0
zThousands = 0
zTenThousands = 0
zHundredThousands = 0
zMillions = 0
zTenMillions = 0
zTempVar = 0
CurrentProcedure = 3
AcToolsVersion = 0
POLInstallPath = text
PolExeLocation = text
End
Call FFACTInit FFACT\
If $LaunchPolAuto = 1
If $RunWindowed = 1
ExecProgram $PathToWindower
Else
setconst PolExeLocation = $PolInstallPath + \pol.exe
ExecProgram $PolExeLocation
End
End
//Loads the Procedures List
ListAdd Procedures, PauseBid // Procedure 1
ListAdd Procedures, StartBid // Procedure 2
ListAdd Procedures, CalculateBidAmount // Procedure 3
While 1 = 1
Call Procedures[$CurrentProcedure]
Delay 500
End
//---------------------------------Procedures--------------------------------------
Procedure PauseBid // Procedure 1
ClearGlobalKeys
While 1 = 1
delay 500
If {globalkeys} contains @112 //Alt F1
SetConst CurrentProcedure = 2
ClearGlobalKeys
SetActiveWindow FFXiApp
Exit
End
End
End
Procedure StartBid // Procedure 2
While 1=1
If {GlobalKeys} Contains @113 //Alt F2
keydown @n 250
SetConst CurrentProcedure = 1
ClearGlobalKeys
Exit
Else
// Main Bidding Code Here
If $ffact_DescbarDescription = Place a bid on this merchandise.
Delay 1 sec
Keydown {RETURN} 80
Delay 1 sec
// Start gil select
If $zOnes > 0
Loop $zOnes
Delay 400
Keydown {UP} 80
End // Ones Loop
End // Ones If
Delay 600
Compute zTempVar = $zTens + $zHundreds + $zThousands + $zTenThousands + $zHundredThousands + $zMillions + $zTenMillions
If $zTempVar > 0
Keydown {LEFT} 80
If $zTens > 0
Loop $zTens
Delay 400
Keydown {UP} 80
End // Tens Loop
End // Tens If
delay 600
Compute zTempVar = $zHundreds + $zThousands + $zTenThousands + $zHundredThousands + $zMillions + $zTenMillions
If $zTempVar > 0
Keydown {LEFT} 80
If $zHundreds > 0
Loop $zHundreds
Delay 400
Keydown {UP} 80
End // Hundreds Loop
End // Hundreds If
delay 600
Compute zTempVar = $zThousands + $zTenThousands + $zHundredThousands + $zMillions + $zTenMillions
If $zTempVar > 0
Keydown {LEFT} 80
If $zThousands > 0
Loop $zThousands
Delay 400
Keydown {UP} 80
End // Thousands Loop
End // Thousands If
delay 600
Compute zTempVar = $zTenThousands + $zHundredThousands + $zMillions + $zTenMillions
If $zTempVar > 0
Keydown {LEFT} 80
If $zTenThousands > 0
Loop $zTenThousands
Delay 400
Keydown {UP} 80
End // Ten Thousands Loop
End // Ten Thousands If
delay 600
Compute zTempVar = $zHundredThousands + $zMillions + $zTenMillions
If $zTempVar > 0
Keydown {LEFT} 80
If $zHundredThousands > 0
Loop $zHundredThousands
Delay 400
Keydown {UP} 80
End // Hundred Thousands Loop
End // Hundred Thousands If
delay 600
Compute zTempVar = $zMillions + $zTenMillions
If $zTempVar > 0
Keydown {LEFT} 80
If $zMillions > 0
Loop $zMillions
Delay 400
Keydown {UP} 80
End // Millions Loop
End // Millions If
delay 600
Compute zTempVar = $zTenMillions
If $zTempVar > 0
Keydown {LEFT} 80
If $zTenMillions > 0
Loop $zTenMillions
Delay 400d
Keydown {UP} 80
End // Ten Millions Loop
End // Ten Millions If
delay 600
End // Ten Millions Check
End // Millions Check
End // Hundred Thousands Check
End // Ten Thousands Check
End // Thousands Check
End // Hundreds Check
End // Tens Check
// End gil select
Keydown {RETURN} 80
delay 600
Keydown {LEFT} 80
delay 600
Keydown {RETURN} 80
delay 600
Keydown {RETURN} 80
delay 600
Keys /echo -
delay 100
Keys {Return}
delay 1 sec
// Check for success or failure
While 1 = 1 // Could get stuck here if out of gil
If $ffact_ChatLastLine contains You buy the
// Buy Success - will repeat procedure
Loop 5
Delay 900
End
Exit
End
If $ffact_ChatLastLine contains You were unable
// Buy Unsuccessful - will retry in $WaitBid seconds
Loop $WaitBid
Delay 900
End
Exit
End
Delay 100
End // Check for success or failure
// Should never get here
SetConst CurrentProcedure = 1
Exit
Else
delay 1 sec
End // If Bid Menu is highlighted
End // Check for alt-f2
End // Procedure While
End // Procedure
Procedure CalculateBidAmount // Procedure 3
SetConst CurrentProcedure = 1
// Ten Millions
Compute zTenMillions = $BidAmount DIV 10000000
If $zMillions > 0
Compute BidAmount = $BidAmount - ($zTenMillions * 10000000)
End
// Millions
Compute zMillions = $BidAmount DIV 1000000
If $zMillions > 0
Compute BidAmount = $BidAmount - ($zMillions * 1000000)
End
// Hundred Thousands
Compute zHundredThousands = $BidAmount DIV 100000
If $zHundredThousands > 0
Compute BidAmount = $BidAmount - ($zHundredThousands * 100000)
End
// Ten Thousands
Compute zTenThousands = $BidAmount DIV 10000
If $zTenThousands > 0
Compute BidAmount = $BidAmount - ($zTenThousands * 10000)
End
// Thousands
Compute zThousands = $BidAmount DIV 1000
If $zThousands > 0
Compute BidAmount = $BidAmount - ($zThousands * 1000)
End
// Hundreds
Compute zHundreds = $BidAmount DIV 100
If $zHundreds > 0
Compute BidAmount = $BidAmount - ($zHundreds * 100)
End
// Tens
Compute zTens = $BidAmount DIV 10
If $zTens > 0
Compute BidAmount = $BidAmount - ($zTens * 10)
End
// Ones
Compute zOnes = $BidAmount DIV 1
Exit
End