Code:
#Include
TrayTip ( "Guild bank grabber", "Numpad 1 sets first click point" & @CRLF & "Numpad 2 sets second click point" & @CRLF & "Numpad 3 executes clicks and attempts to take items" , 16 )
Func GetPos1 ()
$Pos1 = MouseGetPos ()
IniWrite ( "GBG.ini", "POS-1", "X", $Pos1[0] )
IniWrite ( "GBG.ini", "POS-1", "Y", $Pos1[1] )
TrayTip ( "Position 1 set!", $Pos1[0] & "," & $Pos1[1], 16 )
EndFunc
Func GetPos2 ()
$Pos2 = MouseGetPos ()
IniWrite ( "GBG.ini", "POS-2", "X", $Pos2[0] )
IniWrite ( "GBG.ini", "POS-2", "Y", $Pos2[1] )
TrayTip ( "Position 2 set!", $Pos2[0] & "," & $Pos2[1], 16 )
EndFunc
Func Take ()
TrayTip ( "Guild bank grabber", "Taking items...", 16 )
$Click1 = IniRead ( "GBG.ini", "POS-1", "X", "0" )
$Click2 = IniRead ( "GBG.ini", "POS-1", "Y", "0" )
$Click3 = IniRead ( "GBG.ini", "POS-2", "X", "0" )
$Click4 = IniRead ( "GBG.ini", "POS-2", "Y", "0" )
Sleep ( 500 )
MouseClick ( "left", $Click1, $Click2, 1, 0 )
Sleep ( 50 )
MouseClick ( "right", $Click3, $Click4, 5, 0 )
Sleep ( 500 )
TrayTip ( "Guild bank grabber", "Clicked successfully. *should* have items! If not, try again.", 16 )
EndFunc
While 1
Select
Case _IsPressed ( "61" )
GetPos1 ()
Case _IsPressed ( "62" )
GetPos2 ()
Case _IsPressed ( "63" )
Take ()
EndSelect
WEnd