Path of Exile: Auto Loot AutoIt Script Source Code

This script was created in AutoIt, and is not perfect but could be added to a bot or edited to be more versatile. If you want an AutoLoot function, especially when running in a group to grab those yellows and oranges, then this is the script to get you started.

Buy Fast Gold & Safe Hand Leveling

Please give credit to Perplex and mmoexploiters.com for any changes or borrowing of code for other projects.

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Compile_Both=y
#AutoIt3Wrapper_Res_Comment=Path of Exile Auto Loot Tool. Visit mmoexploiters.com
#AutoIt3Wrapper_Res_Description=Made by Perplex
#AutoIt3Wrapper_Res_Fileversion=0.2.0.0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs ----------------------------------------------------------------------------
Author:         Perplex
Game:                   Path of Exile
#ce ----------------------------------------------------------------------------
#include 
Global $PAUSED
Global $PICKED = True
Global $DEBUGON = True
Opt("MouseCoordMode", 1)
Opt("PixelCoordMode", 1)
HotKeySet("{F2}", "Pause")
HotKeySet("{F3}", "Stop")
HotKeySet("{F4}", "RestartTool")
MsgBox("0", "Window Mode!", "Please Change Path of Exile to Window Mode")
;ToolTip('############     You are running "Path of Exile" Auto Loot Tool by Perplex     ############', 0, 0)
;Sleep(5000)
;ToolTip("############     Pause Loot Press F2     ############", 0, 0)
;Sleep(3000)
;ToolTip("############     Close Tool Press F3     ############", 0, 0)
;Sleep(3000)
;ToolTip("############     Restart Tool on Crash or Bug Press F4    ############", 0, 0)
;Sleep(3000)
;DEBUG("############     Please Focus the Path of Exile Client     ############")
WinWaitActive("Path of Exile")
Sleep(2000)
;DEBUG("############     Create Images to Desktop......     ############")
;DirCopy(@ScriptDir & "/Items", @DesktopDir & "/PoETool/Items")
;Sleep(5000)
;Sleep(3000)
;DEBUG("############     Auto loot will Start in 10 Seconds     ############")
;Sleep(5000)
;DEBUG("############     5     ############")
;Sleep(1000)
;DEBUG("############     4     ############")
;Sleep(1000)
;DEBUG("############     3    ############")
;Sleep(1000)
;DEBUG("############     2     ############")
;Sleep(1000)
;DEBUG("############     1     ############")
;Sleep(1000)
$IMGLOOT = True
$DIRECTORY = ("C:Users" & @UserName & "DesktopPoEToolItems")
$TOTALITEMS = 1
Global $pick[$totalItems], $size = WinGetClientSize("[TITLE:Path of Exile; CLASS:Direct3DWindowClass]"), $go = True, $Begin = False, $Dead = False, $Logout = False, $Window = False, $i = 0, $currentArrayItem = 0, $gX = 0, $gY = 0
$PICK[0] = "gruengem.png|50"
While 1
Call("pickItems")
Sleep(1000)
WEnd
Func PICKITEMS()
$CURRENTARRAYITEM = 0
For $GI = 0 To ($TOTALITEMS - 1)
$ARRAY = StringSplit($PICK[$GI], "|")
$FILE = $ARRAY[1]
$ACCURACY = $ARRAY[2]
$URLSTRING = $DIRECTORY & $FILE
DEBUG("############     searching...........     ############")
$TARGET = _IMAGESEARCHAREA($URLSTRING, 1, 0, 0, Round(1920), Round(1080), $GX, $GY, $ACCURACY)
ConsoleWrite($URLSTRING)
While $I <= 12
DEBUG("############     Item found     ############")
If $TARGET And ($GX > 15) And ($GY > 15) Then
MouseClick("left", $GX, $GY, 1, 0)
Sleep(Random(2000, 3000))
MouseMove(14, 14, 0)
Sleep(5)
$TARGET = _IMAGESEARCHAREA($URLSTRING, 1, 0, 0, Round(1920), Round(1080), $GX, $GY, $ACCURACY)
ConsoleWrite($URLSTRING)
$I += 1
Else
DEBUG("############     No Item found     ############")
ExitLoop
EndIf
WEnd
Next
EndFunc
Func RESTARTTOOL()
DEBUG("############    RESTARTING in 5 Seconds    ############")
Sleep(5000)
Call("pickItems")
EndFunc
Func PAUSE()
$PAUSED = Not $PAUSED
While $PAUSED
Sleep(100)
ToolTip("############     Paused...     ############", 0, 0)
WEnd
ToolTip("")
EndFunc
Func DEBUG($MESSAGE)
If $DEBUGON Then
ToolTip($MESSAGE, 0, 0)
EndIf
EndFunc
Func STOP()
Sleep(100)
ToolTip("############     Terminate Auto Loot Now     ############", 0, 0)
Sleep(2000)
Exit
EndFunc

8 Responses to Path of Exile: Auto Loot AutoIt Script Source Code

  1. mercury says:

    Cannot parse #include :s

  2. Spitt says:

    Are you using the recommended version of AHK, or a different one, like one already installed on your system?

  3. mercury says:

    i am using autoit not autohotkey
    may be it is the problem

  4. mercury says:

    i just copyed the code and pasted in an autoit script , was not the good way?

  5. Spitt says:

    AutoIt and AutoHotKey are 2 different macro programs. In the article above, there is a download for AutoHotKey, use it then run it again.

  6. Claus Mq says:

    Im getting this error message:
    —–
    Error at line 1.

    Line Text: #Region
    Error: This line does not contain a recongnized action.

    The program will exit.
    —–

    I’m running with two monitors, could that led to any problems?

  7. Spitt says:

    Did you make sure to install the required software? It will spit out an error, if you are using the wrong macro software version.

  8. Leon says:

    Can you please clarify.

    What is the exact version of AutoIT is this script intended to be used with ?

Leave a Reply

Your email address will not be published. Required fields are marked *

css.php
s2Member®