Next, save this as Autopot.ahk in Notepad:
Code:
#SingleInstance force #Persistent IniRead, pctHP, autopot.ini, Threshold, health, 50 IniRead, pctMP, autopot.ini, Threshold, mana, 50 IniRead, pctVG, autopot.ini, Threshold, vigor, 25 IniRead, keyHP, autopot.ini, Hotkey, health, 9 IniRead, keyMP, autopot.ini, Hotkey, mana, 0 IniRead, keyVG, autopot.ini, Hotkey, vigor, 8 IniRead, keyST, autopot.ini, Hotkey, status, X IniRead, keyOP, autopot.ini, Hotkey, options, ^`` IniRead, delay, autopot.ini, Delay, delay, 1 Menu, Tray, NoStandard Menu, Tray, Add, Options, Gui Menu, Tray, Default, Options Menu, Tray, Add, About, About Menu, Tray, Add Menu, Tray, Add, Exit, Quit Menu, Tray, Click, 2 Menu, Tray, Tip, AutoPot IfExist, autopot.ini Goto, Init Gui: If delay >= 1000 { delay := delay / 1000 } Gui, +AlwaysOnTop Gui, Add, GroupBox, w136 h70, Health Gui, Add, Text, Section xp+8 yp+15, Hotkey: Gui, Add, Hotkey, ys-3 w73 vkeyHP, %keyHP% Gui, Add, Slider, xs h20 TickInterval10 vpctHP, %pctHP% Gui, Add, GroupBox, xp-8 yp+32 w136 h70, Mana Gui, Add, Text, Section xp+8 yp+15, Hotkey: Gui, Add, Hotkey, ys-3 w73 vkeyMP, %keyMP% Gui, Add, Slider, xs h20 TickInterval10 vpctMP, %pctMP% Gui, Add, GroupBox, xp-8 yp+32 w136 h70, Vigor Gui, Add, Text, Section xp+8 yp+15, Hotkey: Gui, Add, Hotkey, ys-3 w73 vkeyVG, %keyVG% Gui, Add, Slider, xs h20 TickInterval10 vpctVG, %pctVG% Gui, Add, GroupBox, xp-8 yp+32 w136 h39, Status Gui, Add, Text, Section xp+8 yp+15, Hotkey: Gui, Add, Hotkey, ys-3 w73 vkeyST, %keyST% Gui, Add, GroupBox, xp-55 yp+28 w136 h39, Options Gui, Add, Text, Section xp+8 yp+15, Hotkey: Gui, Add, Hotkey, ys-3 w73 vkeyOP, %keyOP% Gui, Add, Edit, xp-47 yp+34 vdelay, 1 Gui, Add, UpDown, Range-0-10, %delay% Gui, Add, Text, xp+36 yp+3, s Delay Gui, Add, Button, xp+47 yp-5, Apply Gui, Show,, Options Return GuiClose: ExitApp Return GuiSize: IfEqual, A_EventInfo, 1 Gui, Destroy Return ButtonApply: Gui, Submit Gui, Destroy IniWrite, %pctHP%, autopot.ini, Threshold, health IniWrite, %pctMP%, autopot.ini, Threshold, mana IniWrite, %pctVG%, autopot.ini, Threshold, vigor IniWrite, %keyHP%, autopot.ini, Hotkey, health IniWrite, %keyMP%, autopot.ini, Hotkey, mana IniWrite, %keyVG%, autopot.ini, Hotkey, vigor IniWrite, %keyST%, autopot.ini, Hotkey, status IniWrite, %keyOP%, autopot.ini, Hotkey, options IniWrite, %delay%, autopot.ini, Delay, delay Hotkey, %keyOP%, Options FileSetAttrib, +H+T, autopot.ini Goto, Init Return Options: Goto, Gui Return about: MsgBox, 32, About AutoPot, Brought to you by Cruor. Return Quit: ExitApp Return Init: delay := 1000 * delay crdHP := 84 + 120 * (pctHP/100) crdMP := 84 + 120 * (pctMP/100) crdVG := 84 + 120 * (pctVG/100) Transform, crdHP, Round, crdHP Transform, crdMP, Round, crdMP Transform, crdVG, Round, crdVG hpColor = 0x6F030D,0x6C030E,0x6B030E,0x6A040F,0x68040F,0x66040E mpColor = 0x0F1C4C,0x112055,0x101E4F,0x101E4E,0x102051,0x0F1D4C,0x101F4F,0x0F1D4A,0x101F4E,0x112052,0x101E4D,0x0F1E4B SetKeyDelay, 100 Goto, Main Return Main: Loop { WinGetActiveTitle, wndTitle IfEqual, wndTitle, SRO_Client { PixelGetColor,boolIG,172,23,rgb PixelGetColor,boolIG2,173,25,rgb If (boolIG = 0xFFD953 || boolIG2 = 0xFFD953) { PixelGetColor,boolHP,crdHP,32,rgb PixelGetColor,boolMP,crdMP,48,rgb PixelGetColor,boolHV,crdVG,32,rgb PixelGetColor,boolMV,crdVG,48,rgb if boolHV not in %hpColor% Send %keyVG% if boolMV not in %mpColor% Send %keyVG% if boolHP not in %hpColor% Send %keyHP% if boolMP not in %mpColor% Send %keyMP% PixelGetColor,boolST1,218,59,rgb PixelGetColor,boolST2,218,60,rgb PixelGetColor,boolST3,218,61,rgb if (boolST1 = 0x84E7FF && boolST2 = 0x00CEFF && boolST3 = 0x000000) Send %keyST% } } Sleep delay } Return
Credits for the Autopot go to Cruor.
Here is a guide using pictures:
Step 1:
Step 2:
Step 3:
Step 4:
Have fun, it takes up hardly any RAM and works perfectly.
Vista users should run as Administrator and should be good to go!