[Health Autopot & AutoChicken] Soothe your wounds until PoEHUD is safe again menu

User Tag List

Page 5 of 8 FirstFirst 12345678 LastLast
Results 61 to 75 of 107
  1. #61
    LaFlame's Avatar Member
    Reputation
    2
    Join Date
    Jun 2017
    Posts
    24
    Thanks G/R
    14/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As I said before, I was just using the script itself nothing more. I used to bot and stuff, my main account got banned last league, so I started on a fresh account and got banned after 5 hours.

    [Health Autopot & AutoChicken] Soothe your wounds until PoEHUD is safe again
  2. #62
    kevel1's Avatar Member
    Reputation
    4
    Join Date
    Jan 2013
    Posts
    338
    Thanks G/R
    13/3
    Trade Feedback
    4 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    weird ive been using all day today and a bit yest im still safe.

  3. #63
    SoulBeats's Avatar Member
    Reputation
    3
    Join Date
    Sep 2018
    Posts
    10
    Thanks G/R
    4/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any chance to boost mana potion in this script?

  4. #64
    niks71's Avatar Member
    Reputation
    1
    Join Date
    Jul 2017
    Posts
    26
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need to change it for my permission. I'm using a script to determine the position of the cursor.
    Получить координаты курсора на экране
    And I substitute the received values ​​in the setting.ini, explaining explain image.png. I found almost all the values ​​except hpmiddley = 1100.
    What is this variable? Can I have a picture?
    I did not find it on the diagram

    At the same time autopot works fine, but AutoChicken works too late 1-3 seconds after death.
    I would be grateful for a transcript of all the variables and where to get them in case I still confused something (The values below are tentative for my resolution)
    logoutbtnx=789
    logoutbtny=248
    windoww=1360
    windowh=768
    hpmiddlex=94
    hpmiddley= ???
    hptopy=609
    chaticonx=6
    chaticony=625
    Last edited by niks71; 09-03-2018 at 06:57 AM.

  5. #65
    llsandmanll's Avatar Member
    Reputation
    1
    Join Date
    Aug 2017
    Posts
    3
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any way to change delay? the script use the potion, and 500 ms for use again =(

  6. #66
    EthEth's Avatar Active Member
    Reputation
    51
    Join Date
    Aug 2016
    Posts
    78
    Thanks G/R
    57/38
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've made some modification while lying sick in bed (and with internet so crappy that online play is no-go). They are in-professional, so... yeah. But there is something for you to work with!

    New settings.ini:
    Code:
    [border]
    borderleft=0
    borderright=0
    bordertop=0
    borderdown=0
    
    [potion]
    hpremain=50
    flask=1
    
    [defensive_potion]
    hpremain=70
    flask=2
    
    [mana_potion]
    mpremain=50
    flask=5
    
    [logout]
    hpremain=35
    flask=
    
    [anchor]
    logoutbtnx=912
    logoutbtny=436
    windoww=1920
    windowh=1080
    hpmiddlex=117
    hpmiddley=1100
    hptopy=847
    mpmiddlex=1805
    mpmiddley=1100
    mptopy=847
    chaticonx=17
    chaticony=881
    
    [other]
    mousespeed=0
    checkdelay=rand(331,427)
    New script code:
    Code:
    #IfWinActive, Path of Exile ;check if a window with title "Path of Exile", casesensitive
    Menu, Tray, Icon, Images\Off.ico ;get a icon image
    Menu, Tray, Tip, Antyradio.pl ;tool tip when mouse over icon
    Menu, Tray, Add ;creates a separator line
    Menu, Tray, Add, Windowed (Borders), Border ; create a new menu item
    Menu, Tray, Add, Windowed (Borderless), Borderless
    Menu, Tray, Add, How To Use, HowToUse
    
    ;load border information from ini file
    toggle = 0
    IniRead, bl, setting.ini, border, borderleft
    IniRead, br, setting.ini, border, borderright
    IniRead, bt, setting.ini, border, bordertop
    IniRead, bd, setting.ini, border, borderdown
    IniRead, bd, setting.ini, border, borderdown
    
    ;load potion information from ini file
    IniRead, usepotionhp, setting.ini, potion, hpremain
    IniRead, usepotionflaskindex, setting.ini, potion, flask
    
    ;load defensive potion information from ini file
    IniRead, usepotiondefensive, setting.ini, defensive_potion, hpremain
    IniRead, usedefensivepotionflaskindex, setting.ini, defensive_potion, flask
    
    ;load mana potion information from ini file
    IniRead, usepotionmp, setting.ini, mana_potion, mpremain
    IniRead, usemanapotionflaskindex, setting.ini, mana_potion, flask
    
    ;load logout information from ini file
    IniRead, logouthp, setting.ini, logout, hpremain
    IniRead, logoutflaskindex, setting.ini, logout, flask
    
    ;load anchor information from ini file
    IniRead, defaultLogoutX, setting.ini, anchor, logoutbtnx
    IniRead, defaultLogoutY, setting.ini, anchor, logoutbtny
    
    IniRead, defaultWindowWidth, setting.ini, anchor, windoww
    IniRead, defaultWindowHeight, setting.ini, anchor, windowh
    
    IniRead, defaultHPMiddleX, setting.ini, anchor, hpmiddlex
    IniRead, defaultHPMiddleY, setting.ini, anchor, hpmiddley
    IniRead, defaultHPTopY, setting.ini, anchor, hptopy
    
    IniRead, defaultMPMiddleX, setting.ini, anchor, mpmiddlex
    IniRead, defaultMPMiddleY, setting.ini, anchor, mpmiddley
    IniRead, defaultMPTopY, setting.ini, anchor, mptopy
    
    IniRead, defaultChatX, setting.ini, anchor, chaticonx
    IniRead, defaultChatY, setting.ini, anchor, chaticony
    
    ;load other information from ini file
    IniRead, mousespeed, setting.ini, other, mousespeed ;0~100(instant~slow)
    IniRead, checkdelay, setting.ini, other, checkdelay
    
    defaultUsePotionHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotionhp) / 100
    defaultUseDefensivePotionHPY :=  defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotiondefensive) / 100
    defaultUseManaPotionMPY := defaultMPTopY + (defaultWindowHeight-defaultMPTopY-bd) * (100-usepotionmp) / 100
    defaultLogoutHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-logouthp) / 100
    adjustLogout_X := 0
    adjustLogout_Y := 0
    return
    
    ;debug
    `::
    MouseGetPos, xpos, ypos 
    MsgBox, The cursor is at X%xpos% Y%ypos%. 
    return
    
    
    ;`:: 
    ;run, cports.exe /close * * * * PathofExile_x64.exe
    ;return
    
    F4::
    WinGetPos,,, w, h, A
    heightResizeRatio := (h-bt-bd)/(defaultWindowHeight-bt-bd)
    ; calculate log out button position
    if (adjustLogout_X == 0 && adjustLogout_Y == 0)
    {
        adjustLogout_X := w/2
        adjustLogout_Y := (defaultLogoutY-bt)*heightResizeRatio+bt
    }
    
    ; calculate HP center position and chat icon position
    ;note that we can't use widthResizeRatio, since 16:9, 4:3 has different width
    HX := (defaultHPMiddleX-bl)*heightResizeRatio+bl
    HY := (defaultHPMiddleY-bt)*heightResizeRatio+bt
    MX := (defaultMPMiddleX-bl)*heightResizeRatio+bl
    MY := (defaultMPMiddleY-bt)*heightResizeRatio+bt
    CX := (defaultChatX-bl)*heightResizeRatio+bl
    CY := (defaultChatY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, HY
    MouseMove MX, MY
    ;MouseMove CX, CY
    
    ; calculate use potion and logout HP Y
    adjustUsePotionHPY := (defaultUsePotionHPY-bt)*heightResizeRatio+bt
    adjustUseDefensivePotionHPY := (defaultUseDefensivePotionHPY-bt)*heightResizeRatio+bt
    adjustUseManaPotionMPY := (defaultUseManaPotionMPY-bt)*heightResizeRatio+bt
    adjustLogoutHPY := (defaultLogoutHPY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, adjustUsePotionHPY
    ;MouseMove HX, adjustUseDefensivePotionHPY
    MouseMove MX, adjustUseManaPotionMPY
    ;MouseMove HX, adjustLogoutHPY
    
    ;calculate chat icon search region, top left:(chatX1, chatY1), buttom right:(chatX2, chatY2)
    chatX1 := CX-7
    chatX2 := CX+7
    chatY1 := CY-7
    chatY2 := CY+7
    
    ;calculate use potion hp search region, top left:(hp1_X1, hp1_Y1), buttom right:(hp1_X2, hp1_Y2)
    hp1_X1 := HX-7
    hp1_X2 := HX+7
    hp1_Y1 := adjustUsePotionHPY-7
    hp1_Y2 := adjustUsePotionHPY+7
    
    ;calculate use defensive potion hp search region, top left:(hp3_X1, hp3_Y1), buttom right:(hp3_X2, hp3_Y2)
    hp3_X1 := HX-7
    hp3_X2 := HX+7
    hp3_Y1 := adjustUseDefensivePotionHPY-7
    hp3_Y2 := adjustUseDefensivePotionHPY+7
    
    ;calculate use mana potion mp search region, top left:(mp1_X1, mp1_Y1), buttom right:(mp1_X2, mp1_Y2)
    mp1_X1 := MX-7
    mp1_X2 := MX+7
    mp1_Y1 := adjustUseManaPotionMPY-7
    mp1_Y2 := adjustUseManaPotionMPY+7
    
    ;calculate log out hp search region, top left:(hp2_X1, hp2_Y1), buttom right:(hp2_X2, hp2_Y2)
    hp2_X1 := HX-7
    hp2_X2 := HX+7
    hp2_Y1 := adjustLogoutHPY-7
    hp2_Y2 := adjustLogoutHPY+7
    
    ;get hp center color and chat icon color used for pixel search later
    PixelGetColor, hpcolor1 , %HX%, %adjustUsePotionHPY% ; get color GRB
    PixelGetColor, hpcolor1rgb , %HX%, %adjustUsePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor2 , %HX%, %adjustLogoutHPY% ; get color GRB
    PixelGetColor, hpcolor2rgb , %HX%, %adjustLogoutHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor3 , %HX%, %adjustUseDefensivePotionHPY% ; get color GRB
    PixelGetColor, hpcolor3rgb , %HX%, %adjustUseDefensivePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, mpcolor1 , %MX%, %adjustUseManaPotionMPY% ; get color GRB
    PixelGetColor, mpcolor1rgb , %MX%, %adjustUseManaPotionMPY%, RGB ; get color RGB
    
    PixelGetColor, chaticoncolor , %CX%, %CY% 
    PixelGetColor, chaticoncolorrgb , %CX%, %CY%, RGB
    
    ;pop up a gui showing the finding color for user to double check
    gui, new
    gui, Default
    gui, +LastFound ; make the GUI window the last found window for use by the line below.
    gui, add, groupbox, w205 h120, Colors found:
    gui, add, text, yp+25 xp+10, Chat Icon Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%chaticoncolorrgb%,100
    gui, add, text, yp+25 xp-80, Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor1rgb%,100
    gui, add, text, yp+25 xp-80, Logout Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor2rgb%,100
    gui, add, text, yp+25 xp-80, 2nd Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor3rgb%,100
    gui, add, text, yp+25 xp-80, Mana Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%mpcolor1rgb%,100
    gui, add, button, xp-80 yp+25 w25 h25 gDone, OK
    gui, show, ,Activated
    Menu, Tray, Icon, Images\On.ico
    
    ;start searching (render a frame takes 0.03 sec in 30FPS, so we set the search time to 0.1 sec to make sure it won't search the same frame twice)
    Loop 
    {
        IfWinActive, Path of Exile
        {
            ;find the orange chat Icon (makes sure you are on a character)
            ;variable ErrorLevel is set to 0 if the color was found in the specified region, 1 if it was not found,
            ; or 2 if there was a problem that prevented the command from conducting the search.
            PixelSearch, FoundoX, FoundoY, %chatX1%, %chatY1%, %chatX2%, %chatY2%, %chaticoncolor%, 5, Fast    
            if ErrorLevel = 0
            {
                ;use potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp1_X1%, %hp1_Y1%, %hp1_X2%, %hp1_Y2%, %hpcolor1%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use defensive potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp3_X1%, %hp3_Y1%, %hp3_X2%, %hp3_Y2%, %hpcolor3%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use mana potion when MP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %mp1_X1%, %mp1_Y1%, %mp1_X2%, %mp1_Y2%, %mpcolor1%, 20, Fast
                ;if ErrorLevel = 1
                ;{
                ;    SendInput, %usepotionflaskindex%
    			;	Sleep, 3000
                ;}     
    			
                ;log out when HP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %hp2_X1%, %hp2_Y1%, %hp2_X2%, %hp2_Y2%, %hpcolor2%, 20, Fast
                ;if ErrorLevel = 1
                ;{
    			;	run, cports.exe /close * * * * PathofExile_x64.exe
                ;}
            }
        }
        Sleep, checkdelay
    }
    return
    
    Border:
    MsgBox, Windowed (Borders all around)
    ;For Windowed (with Borders all round)
    bl = 8
    br = 8
    bt = 29
    bd = 8
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown1212
    return
    
    Borderless:
    MsgBox, Borderless (No Borders)
    ;For Fullscreen Borderless
    bl = 0
    br = 0
    bt = 0
    bd = 0
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown
    return
    
    Done:
    gui, submit, nohide
    gui, destroy
    return
    
    HowToUse:
    MsgBox, `: Instant Logout`nF4: Activate`nF5: Reload`nF12: Exit`nCtrl+X: resync
    return
    
    ^x::
    SendInput, {Enter}
    sleep, 20
    SendInput, {/}oos
    SendInput, {Enter}
    return
    
    ;F5::Reload
    F12::ExitApp
    Changes:
    - disabled auto-quit (because script in the present state not always understands that we are not in the game, for example: press win button and open start menu...)
    - added secondary potion (named defensive potion) - you can use defensive potions or just first line of defense HP potions (and leave the standard potion for instant flasks)
    - added mana potion (very basic)
    - added debugg button that returns current mouse position (for easier configuration)

    With this you should be able to go a little wilder with potion configurations.

    Version above works for me. I don't have time and health to help you out with it more right now. GL!

  7. Thanks humiliat9r, SoulBeats (2 members gave Thanks to EthEth for this useful post)
  8. #67
    SoulBeats's Avatar Member
    Reputation
    3
    Join Date
    Sep 2018
    Posts
    10
    Thanks G/R
    4/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by EthEth View Post
    I've made some modification while lying sick in bed (and with internet so crappy that online play is no-go). They are in-professional, so... yeah. But there is something for you to work with!

    New settings.ini:
    Code:
    [border]
    borderleft=0
    borderright=0
    bordertop=0
    borderdown=0
    
    [potion]
    hpremain=50
    flask=1
    
    [defensive_potion]
    hpremain=70
    flask=2
    
    [mana_potion]
    mpremain=50
    flask=5
    
    [logout]
    hpremain=35
    flask=
    
    [anchor]
    logoutbtnx=912
    logoutbtny=436
    windoww=1920
    windowh=1080
    hpmiddlex=117
    hpmiddley=1100
    hptopy=847
    mpmiddlex=1805
    mpmiddley=1100
    mptopy=847
    chaticonx=17
    chaticony=881
    
    [other]
    mousespeed=0
    checkdelay=rand(331,427)
    New script code:
    Code:
    #IfWinActive, Path of Exile ;check if a window with title "Path of Exile", casesensitive
    Menu, Tray, Icon, Images\Off.ico ;get a icon image
    Menu, Tray, Tip, Antyradio.pl ;tool tip when mouse over icon
    Menu, Tray, Add ;creates a separator line
    Menu, Tray, Add, Windowed (Borders), Border ; create a new menu item
    Menu, Tray, Add, Windowed (Borderless), Borderless
    Menu, Tray, Add, How To Use, HowToUse
    
    ;load border information from ini file
    toggle = 0
    IniRead, bl, setting.ini, border, borderleft
    IniRead, br, setting.ini, border, borderright
    IniRead, bt, setting.ini, border, bordertop
    IniRead, bd, setting.ini, border, borderdown
    IniRead, bd, setting.ini, border, borderdown
    
    ;load potion information from ini file
    IniRead, usepotionhp, setting.ini, potion, hpremain
    IniRead, usepotionflaskindex, setting.ini, potion, flask
    
    ;load defensive potion information from ini file
    IniRead, usepotiondefensive, setting.ini, defensive_potion, hpremain
    IniRead, usedefensivepotionflaskindex, setting.ini, defensive_potion, flask
    
    ;load mana potion information from ini file
    IniRead, usepotionmp, setting.ini, mana_potion, mpremain
    IniRead, usemanapotionflaskindex, setting.ini, mana_potion, flask
    
    ;load logout information from ini file
    IniRead, logouthp, setting.ini, logout, hpremain
    IniRead, logoutflaskindex, setting.ini, logout, flask
    
    ;load anchor information from ini file
    IniRead, defaultLogoutX, setting.ini, anchor, logoutbtnx
    IniRead, defaultLogoutY, setting.ini, anchor, logoutbtny
    
    IniRead, defaultWindowWidth, setting.ini, anchor, windoww
    IniRead, defaultWindowHeight, setting.ini, anchor, windowh
    
    IniRead, defaultHPMiddleX, setting.ini, anchor, hpmiddlex
    IniRead, defaultHPMiddleY, setting.ini, anchor, hpmiddley
    IniRead, defaultHPTopY, setting.ini, anchor, hptopy
    
    IniRead, defaultMPMiddleX, setting.ini, anchor, mpmiddlex
    IniRead, defaultMPMiddleY, setting.ini, anchor, mpmiddley
    IniRead, defaultMPTopY, setting.ini, anchor, mptopy
    
    IniRead, defaultChatX, setting.ini, anchor, chaticonx
    IniRead, defaultChatY, setting.ini, anchor, chaticony
    
    ;load other information from ini file
    IniRead, mousespeed, setting.ini, other, mousespeed ;0~100(instant~slow)
    IniRead, checkdelay, setting.ini, other, checkdelay
    
    defaultUsePotionHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotionhp) / 100
    defaultUseDefensivePotionHPY :=  defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotiondefensive) / 100
    defaultUseManaPotionMPY := defaultMPTopY + (defaultWindowHeight-defaultMPTopY-bd) * (100-usepotionmp) / 100
    defaultLogoutHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-logouthp) / 100
    adjustLogout_X := 0
    adjustLogout_Y := 0
    return
    
    ;debug
    `::
    MouseGetPos, xpos, ypos 
    MsgBox, The cursor is at X%xpos% Y%ypos%. 
    return
    
    
    ;`:: 
    ;run, cports.exe /close * * * * PathofExile_x64.exe
    ;return
    
    F4::
    WinGetPos,,, w, h, A
    heightResizeRatio := (h-bt-bd)/(defaultWindowHeight-bt-bd)
    ; calculate log out button position
    if (adjustLogout_X == 0 && adjustLogout_Y == 0)
    {
        adjustLogout_X := w/2
        adjustLogout_Y := (defaultLogoutY-bt)*heightResizeRatio+bt
    }
    
    ; calculate HP center position and chat icon position
    ;note that we can't use widthResizeRatio, since 16:9, 4:3 has different width
    HX := (defaultHPMiddleX-bl)*heightResizeRatio+bl
    HY := (defaultHPMiddleY-bt)*heightResizeRatio+bt
    MX := (defaultMPMiddleX-bl)*heightResizeRatio+bl
    MY := (defaultMPMiddleY-bt)*heightResizeRatio+bt
    CX := (defaultChatX-bl)*heightResizeRatio+bl
    CY := (defaultChatY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, HY
    MouseMove MX, MY
    ;MouseMove CX, CY
    
    ; calculate use potion and logout HP Y
    adjustUsePotionHPY := (defaultUsePotionHPY-bt)*heightResizeRatio+bt
    adjustUseDefensivePotionHPY := (defaultUseDefensivePotionHPY-bt)*heightResizeRatio+bt
    adjustUseManaPotionMPY := (defaultUseManaPotionMPY-bt)*heightResizeRatio+bt
    adjustLogoutHPY := (defaultLogoutHPY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, adjustUsePotionHPY
    ;MouseMove HX, adjustUseDefensivePotionHPY
    MouseMove MX, adjustUseManaPotionMPY
    ;MouseMove HX, adjustLogoutHPY
    
    ;calculate chat icon search region, top left:(chatX1, chatY1), buttom right:(chatX2, chatY2)
    chatX1 := CX-7
    chatX2 := CX+7
    chatY1 := CY-7
    chatY2 := CY+7
    
    ;calculate use potion hp search region, top left:(hp1_X1, hp1_Y1), buttom right:(hp1_X2, hp1_Y2)
    hp1_X1 := HX-7
    hp1_X2 := HX+7
    hp1_Y1 := adjustUsePotionHPY-7
    hp1_Y2 := adjustUsePotionHPY+7
    
    ;calculate use defensive potion hp search region, top left:(hp3_X1, hp3_Y1), buttom right:(hp3_X2, hp3_Y2)
    hp3_X1 := HX-7
    hp3_X2 := HX+7
    hp3_Y1 := adjustUseDefensivePotionHPY-7
    hp3_Y2 := adjustUseDefensivePotionHPY+7
    
    ;calculate use mana potion mp search region, top left:(mp1_X1, mp1_Y1), buttom right:(mp1_X2, mp1_Y2)
    mp1_X1 := MX-7
    mp1_X2 := MX+7
    mp1_Y1 := adjustUseManaPotionMPY-7
    mp1_Y2 := adjustUseManaPotionMPY+7
    
    ;calculate log out hp search region, top left:(hp2_X1, hp2_Y1), buttom right:(hp2_X2, hp2_Y2)
    hp2_X1 := HX-7
    hp2_X2 := HX+7
    hp2_Y1 := adjustLogoutHPY-7
    hp2_Y2 := adjustLogoutHPY+7
    
    ;get hp center color and chat icon color used for pixel search later
    PixelGetColor, hpcolor1 , %HX%, %adjustUsePotionHPY% ; get color GRB
    PixelGetColor, hpcolor1rgb , %HX%, %adjustUsePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor2 , %HX%, %adjustLogoutHPY% ; get color GRB
    PixelGetColor, hpcolor2rgb , %HX%, %adjustLogoutHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor3 , %HX%, %adjustUseDefensivePotionHPY% ; get color GRB
    PixelGetColor, hpcolor3rgb , %HX%, %adjustUseDefensivePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, mpcolor1 , %MX%, %adjustUseManaPotionMPY% ; get color GRB
    PixelGetColor, mpcolor1rgb , %MX%, %adjustUseManaPotionMPY%, RGB ; get color RGB
    
    PixelGetColor, chaticoncolor , %CX%, %CY% 
    PixelGetColor, chaticoncolorrgb , %CX%, %CY%, RGB
    
    ;pop up a gui showing the finding color for user to double check
    gui, new
    gui, Default
    gui, +LastFound ; make the GUI window the last found window for use by the line below.
    gui, add, groupbox, w205 h120, Colors found:
    gui, add, text, yp+25 xp+10, Chat Icon Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%chaticoncolorrgb%,100
    gui, add, text, yp+25 xp-80, Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor1rgb%,100
    gui, add, text, yp+25 xp-80, Logout Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor2rgb%,100
    gui, add, text, yp+25 xp-80, 2nd Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor3rgb%,100
    gui, add, text, yp+25 xp-80, Mana Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%mpcolor1rgb%,100
    gui, add, button, xp-80 yp+25 w25 h25 gDone, OK
    gui, show, ,Activated
    Menu, Tray, Icon, Images\On.ico
    
    ;start searching (render a frame takes 0.03 sec in 30FPS, so we set the search time to 0.1 sec to make sure it won't search the same frame twice)
    Loop 
    {
        IfWinActive, Path of Exile
        {
            ;find the orange chat Icon (makes sure you are on a character)
            ;variable ErrorLevel is set to 0 if the color was found in the specified region, 1 if it was not found,
            ; or 2 if there was a problem that prevented the command from conducting the search.
            PixelSearch, FoundoX, FoundoY, %chatX1%, %chatY1%, %chatX2%, %chatY2%, %chaticoncolor%, 5, Fast    
            if ErrorLevel = 0
            {
                ;use potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp1_X1%, %hp1_Y1%, %hp1_X2%, %hp1_Y2%, %hpcolor1%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use defensive potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp3_X1%, %hp3_Y1%, %hp3_X2%, %hp3_Y2%, %hpcolor3%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use mana potion when MP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %mp1_X1%, %mp1_Y1%, %mp1_X2%, %mp1_Y2%, %mpcolor1%, 20, Fast
                ;if ErrorLevel = 1
                ;{
                ;    SendInput, %usepotionflaskindex%
    			;	Sleep, 3000
                ;}     
    			
                ;log out when HP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %hp2_X1%, %hp2_Y1%, %hp2_X2%, %hp2_Y2%, %hpcolor2%, 20, Fast
                ;if ErrorLevel = 1
                ;{
    			;	run, cports.exe /close * * * * PathofExile_x64.exe
                ;}
            }
        }
        Sleep, checkdelay
    }
    return
    
    Border:
    MsgBox, Windowed (Borders all around)
    ;For Windowed (with Borders all round)
    bl = 8
    br = 8
    bt = 29
    bd = 8
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown1212
    return
    
    Borderless:
    MsgBox, Borderless (No Borders)
    ;For Fullscreen Borderless
    bl = 0
    br = 0
    bt = 0
    bd = 0
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown
    return
    
    Done:
    gui, submit, nohide
    gui, destroy
    return
    
    HowToUse:
    MsgBox, `: Instant Logout`nF4: Activate`nF5: Reload`nF12: Exit`nCtrl+X: resync
    return
    
    ^x::
    SendInput, {Enter}
    sleep, 20
    SendInput, {/}oos
    SendInput, {Enter}
    return
    
    ;F5::Reload
    F12::ExitApp
    Changes:
    - disabled auto-quit (because script in the present state not always understands that we are not in the game, for example: press win button and open start menu...)
    - added secondary potion (named defensive potion) - you can use defensive potions or just first line of defense HP potions (and leave the standard potion for instant flasks)
    - added mana potion (very basic)
    - added debugg button that returns current mouse position (for easier configuration)

    With this you should be able to go a little wilder with potion configurations.

    Version above works for me. I don't have time and health to help you out with it more right now. GL!
    Hello friend, thank you for the time spent.
    Unfortunately, the defensive jar and mana did not work here, they just are not used.
    Potion 1 is being used normally.

    Is everything normal for you?

  9. #68
    SoulBeats's Avatar Member
    Reputation
    3
    Join Date
    Sep 2018
    Posts
    10
    Thanks G/R
    4/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by EthEth View Post
    I've made some modification while lying sick in bed (and with internet so crappy that online play is no-go). They are in-professional, so... yeah. But there is something for you to work with!

    New settings.ini:
    Code:
    [border]
    borderleft=0
    borderright=0
    bordertop=0
    borderdown=0
    
    [potion]
    hpremain=50
    flask=1
    
    [defensive_potion]
    hpremain=70
    flask=2
    
    [mana_potion]
    mpremain=50
    flask=5
    
    [logout]
    hpremain=35
    flask=
    
    [anchor]
    logoutbtnx=912
    logoutbtny=436
    windoww=1920
    windowh=1080
    hpmiddlex=117
    hpmiddley=1100
    hptopy=847
    mpmiddlex=1805
    mpmiddley=1100
    mptopy=847
    chaticonx=17
    chaticony=881
    
    [other]
    mousespeed=0
    checkdelay=rand(331,427)
    New script code:
    Code:
    #IfWinActive, Path of Exile ;check if a window with title "Path of Exile", casesensitive
    Menu, Tray, Icon, Images\Off.ico ;get a icon image
    Menu, Tray, Tip, Antyradio.pl ;tool tip when mouse over icon
    Menu, Tray, Add ;creates a separator line
    Menu, Tray, Add, Windowed (Borders), Border ; create a new menu item
    Menu, Tray, Add, Windowed (Borderless), Borderless
    Menu, Tray, Add, How To Use, HowToUse
    
    ;load border information from ini file
    toggle = 0
    IniRead, bl, setting.ini, border, borderleft
    IniRead, br, setting.ini, border, borderright
    IniRead, bt, setting.ini, border, bordertop
    IniRead, bd, setting.ini, border, borderdown
    IniRead, bd, setting.ini, border, borderdown
    
    ;load potion information from ini file
    IniRead, usepotionhp, setting.ini, potion, hpremain
    IniRead, usepotionflaskindex, setting.ini, potion, flask
    
    ;load defensive potion information from ini file
    IniRead, usepotiondefensive, setting.ini, defensive_potion, hpremain
    IniRead, usedefensivepotionflaskindex, setting.ini, defensive_potion, flask
    
    ;load mana potion information from ini file
    IniRead, usepotionmp, setting.ini, mana_potion, mpremain
    IniRead, usemanapotionflaskindex, setting.ini, mana_potion, flask
    
    ;load logout information from ini file
    IniRead, logouthp, setting.ini, logout, hpremain
    IniRead, logoutflaskindex, setting.ini, logout, flask
    
    ;load anchor information from ini file
    IniRead, defaultLogoutX, setting.ini, anchor, logoutbtnx
    IniRead, defaultLogoutY, setting.ini, anchor, logoutbtny
    
    IniRead, defaultWindowWidth, setting.ini, anchor, windoww
    IniRead, defaultWindowHeight, setting.ini, anchor, windowh
    
    IniRead, defaultHPMiddleX, setting.ini, anchor, hpmiddlex
    IniRead, defaultHPMiddleY, setting.ini, anchor, hpmiddley
    IniRead, defaultHPTopY, setting.ini, anchor, hptopy
    
    IniRead, defaultMPMiddleX, setting.ini, anchor, mpmiddlex
    IniRead, defaultMPMiddleY, setting.ini, anchor, mpmiddley
    IniRead, defaultMPTopY, setting.ini, anchor, mptopy
    
    IniRead, defaultChatX, setting.ini, anchor, chaticonx
    IniRead, defaultChatY, setting.ini, anchor, chaticony
    
    ;load other information from ini file
    IniRead, mousespeed, setting.ini, other, mousespeed ;0~100(instant~slow)
    IniRead, checkdelay, setting.ini, other, checkdelay
    
    defaultUsePotionHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotionhp) / 100
    defaultUseDefensivePotionHPY :=  defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotiondefensive) / 100
    defaultUseManaPotionMPY := defaultMPTopY + (defaultWindowHeight-defaultMPTopY-bd) * (100-usepotionmp) / 100
    defaultLogoutHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-logouthp) / 100
    adjustLogout_X := 0
    adjustLogout_Y := 0
    return
    
    ;debug
    `::
    MouseGetPos, xpos, ypos 
    MsgBox, The cursor is at X%xpos% Y%ypos%. 
    return
    
    
    ;`:: 
    ;run, cports.exe /close * * * * PathofExile_x64.exe
    ;return
    
    F4::
    WinGetPos,,, w, h, A
    heightResizeRatio := (h-bt-bd)/(defaultWindowHeight-bt-bd)
    ; calculate log out button position
    if (adjustLogout_X == 0 && adjustLogout_Y == 0)
    {
        adjustLogout_X := w/2
        adjustLogout_Y := (defaultLogoutY-bt)*heightResizeRatio+bt
    }
    
    ; calculate HP center position and chat icon position
    ;note that we can't use widthResizeRatio, since 16:9, 4:3 has different width
    HX := (defaultHPMiddleX-bl)*heightResizeRatio+bl
    HY := (defaultHPMiddleY-bt)*heightResizeRatio+bt
    MX := (defaultMPMiddleX-bl)*heightResizeRatio+bl
    MY := (defaultMPMiddleY-bt)*heightResizeRatio+bt
    CX := (defaultChatX-bl)*heightResizeRatio+bl
    CY := (defaultChatY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, HY
    MouseMove MX, MY
    ;MouseMove CX, CY
    
    ; calculate use potion and logout HP Y
    adjustUsePotionHPY := (defaultUsePotionHPY-bt)*heightResizeRatio+bt
    adjustUseDefensivePotionHPY := (defaultUseDefensivePotionHPY-bt)*heightResizeRatio+bt
    adjustUseManaPotionMPY := (defaultUseManaPotionMPY-bt)*heightResizeRatio+bt
    adjustLogoutHPY := (defaultLogoutHPY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, adjustUsePotionHPY
    ;MouseMove HX, adjustUseDefensivePotionHPY
    MouseMove MX, adjustUseManaPotionMPY
    ;MouseMove HX, adjustLogoutHPY
    
    ;calculate chat icon search region, top left:(chatX1, chatY1), buttom right:(chatX2, chatY2)
    chatX1 := CX-7
    chatX2 := CX+7
    chatY1 := CY-7
    chatY2 := CY+7
    
    ;calculate use potion hp search region, top left:(hp1_X1, hp1_Y1), buttom right:(hp1_X2, hp1_Y2)
    hp1_X1 := HX-7
    hp1_X2 := HX+7
    hp1_Y1 := adjustUsePotionHPY-7
    hp1_Y2 := adjustUsePotionHPY+7
    
    ;calculate use defensive potion hp search region, top left:(hp3_X1, hp3_Y1), buttom right:(hp3_X2, hp3_Y2)
    hp3_X1 := HX-7
    hp3_X2 := HX+7
    hp3_Y1 := adjustUseDefensivePotionHPY-7
    hp3_Y2 := adjustUseDefensivePotionHPY+7
    
    ;calculate use mana potion mp search region, top left:(mp1_X1, mp1_Y1), buttom right:(mp1_X2, mp1_Y2)
    mp1_X1 := MX-7
    mp1_X2 := MX+7
    mp1_Y1 := adjustUseManaPotionMPY-7
    mp1_Y2 := adjustUseManaPotionMPY+7
    
    ;calculate log out hp search region, top left:(hp2_X1, hp2_Y1), buttom right:(hp2_X2, hp2_Y2)
    hp2_X1 := HX-7
    hp2_X2 := HX+7
    hp2_Y1 := adjustLogoutHPY-7
    hp2_Y2 := adjustLogoutHPY+7
    
    ;get hp center color and chat icon color used for pixel search later
    PixelGetColor, hpcolor1 , %HX%, %adjustUsePotionHPY% ; get color GRB
    PixelGetColor, hpcolor1rgb , %HX%, %adjustUsePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor2 , %HX%, %adjustLogoutHPY% ; get color GRB
    PixelGetColor, hpcolor2rgb , %HX%, %adjustLogoutHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor3 , %HX%, %adjustUseDefensivePotionHPY% ; get color GRB
    PixelGetColor, hpcolor3rgb , %HX%, %adjustUseDefensivePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, mpcolor1 , %MX%, %adjustUseManaPotionMPY% ; get color GRB
    PixelGetColor, mpcolor1rgb , %MX%, %adjustUseManaPotionMPY%, RGB ; get color RGB
    
    PixelGetColor, chaticoncolor , %CX%, %CY% 
    PixelGetColor, chaticoncolorrgb , %CX%, %CY%, RGB
    
    ;pop up a gui showing the finding color for user to double check
    gui, new
    gui, Default
    gui, +LastFound ; make the GUI window the last found window for use by the line below.
    gui, add, groupbox, w205 h120, Colors found:
    gui, add, text, yp+25 xp+10, Chat Icon Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%chaticoncolorrgb%,100
    gui, add, text, yp+25 xp-80, Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor1rgb%,100
    gui, add, text, yp+25 xp-80, Logout Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor2rgb%,100
    gui, add, text, yp+25 xp-80, 2nd Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor3rgb%,100
    gui, add, text, yp+25 xp-80, Mana Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%mpcolor1rgb%,100
    gui, add, button, xp-80 yp+25 w25 h25 gDone, OK
    gui, show, ,Activated
    Menu, Tray, Icon, Images\On.ico
    
    ;start searching (render a frame takes 0.03 sec in 30FPS, so we set the search time to 0.1 sec to make sure it won't search the same frame twice)
    Loop 
    {
        IfWinActive, Path of Exile
        {
            ;find the orange chat Icon (makes sure you are on a character)
            ;variable ErrorLevel is set to 0 if the color was found in the specified region, 1 if it was not found,
            ; or 2 if there was a problem that prevented the command from conducting the search.
            PixelSearch, FoundoX, FoundoY, %chatX1%, %chatY1%, %chatX2%, %chatY2%, %chaticoncolor%, 5, Fast    
            if ErrorLevel = 0
            {
                ;use potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp1_X1%, %hp1_Y1%, %hp1_X2%, %hp1_Y2%, %hpcolor1%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use defensive potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp3_X1%, %hp3_Y1%, %hp3_X2%, %hp3_Y2%, %hpcolor3%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use mana potion when MP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %mp1_X1%, %mp1_Y1%, %mp1_X2%, %mp1_Y2%, %mpcolor1%, 20, Fast
                ;if ErrorLevel = 1
                ;{
                ;    SendInput, %usepotionflaskindex%
    			;	Sleep, 3000
                ;}     
    			
                ;log out when HP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %hp2_X1%, %hp2_Y1%, %hp2_X2%, %hp2_Y2%, %hpcolor2%, 20, Fast
                ;if ErrorLevel = 1
                ;{
    			;	run, cports.exe /close * * * * PathofExile_x64.exe
                ;}
            }
        }
        Sleep, checkdelay
    }
    return
    
    Border:
    MsgBox, Windowed (Borders all around)
    ;For Windowed (with Borders all round)
    bl = 8
    br = 8
    bt = 29
    bd = 8
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown1212
    return
    
    Borderless:
    MsgBox, Borderless (No Borders)
    ;For Fullscreen Borderless
    bl = 0
    br = 0
    bt = 0
    bd = 0
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown
    return
    
    Done:
    gui, submit, nohide
    gui, destroy
    return
    
    HowToUse:
    MsgBox, `: Instant Logout`nF4: Activate`nF5: Reload`nF12: Exit`nCtrl+X: resync
    return
    
    ^x::
    SendInput, {Enter}
    sleep, 20
    SendInput, {/}oos
    SendInput, {Enter}
    return
    
    ;F5::Reload
    F12::ExitApp
    Changes:
    - disabled auto-quit (because script in the present state not always understands that we are not in the game, for example: press win button and open start menu...)
    - added secondary potion (named defensive potion) - you can use defensive potions or just first line of defense HP potions (and leave the standard potion for instant flasks)
    - added mana potion (very basic)
    - added debugg button that returns current mouse position (for easier configuration)

    With this you should be able to go a little wilder with potion configurations.

    Version above works for me. I don't have time and health to help you out with it more right now. GL!
    As I said in the above comment, the defensive jar and mana did not work here, they just are not used.
    So I made some modifications to the settings.ini and it seems to work now.

    My settings.ini:
    Code:
    #IfWinActive, Path of Exile ;check if a window with title "Path of Exile", casesensitive
    Menu, Tray, Icon, Images\Off.ico ;get a icon image
    Menu, Tray, Tip, Antyradio.pl ;tool tip when mouse over icon
    Menu, Tray, Add ;creates a separator line
    Menu, Tray, Add, Windowed (Borders), Border ; create a new menu item
    Menu, Tray, Add, Windowed (Borderless), Borderless
    Menu, Tray, Add, How To Use, HowToUse
    
    ;load border information from ini file
    toggle = 0
    IniRead, bl, setting.ini, border, borderleft
    IniRead, br, setting.ini, border, borderright
    IniRead, bt, setting.ini, border, bordertop
    IniRead, bd, setting.ini, border, borderdown
    IniRead, bd, setting.ini, border, borderdown
    
    ;load potion information from ini file
    IniRead, usepotionhp, setting.ini, potion, hpremain
    IniRead, usepotionflaskindex, setting.ini, potion, flask
    
    ;load defensive potion information from ini file
    IniRead, usepotiondefensive, setting.ini, defensive_potion, hpremain
    IniRead, usedefensivepotionflaskindex, setting.ini, defensive_potion, flask
    
    ;load mana potion information from ini file
    IniRead, usepotionmp, setting.ini, mana_potion, mpremain
    IniRead, usemanapotionflaskindex, setting.ini, mana_potion, flask
    
    ;load logout information from ini file
    IniRead, logouthp, setting.ini, logout, hpremain
    IniRead, logoutflaskindex, setting.ini, logout, flask
    
    ;load anchor information from ini file
    IniRead, defaultLogoutX, setting.ini, anchor, logoutbtnx
    IniRead, defaultLogoutY, setting.ini, anchor, logoutbtny
    
    IniRead, defaultWindowWidth, setting.ini, anchor, windoww
    IniRead, defaultWindowHeight, setting.ini, anchor, windowh
    
    IniRead, defaultHPMiddleX, setting.ini, anchor, hpmiddlex
    IniRead, defaultHPMiddleY, setting.ini, anchor, hpmiddley
    IniRead, defaultHPTopY, setting.ini, anchor, hptopy
    
    IniRead, defaultMPMiddleX, setting.ini, anchor, mpmiddlex
    IniRead, defaultMPMiddleY, setting.ini, anchor, mpmiddley
    IniRead, defaultMPTopY, setting.ini, anchor, mptopy
    
    IniRead, defaultChatX, setting.ini, anchor, chaticonx
    IniRead, defaultChatY, setting.ini, anchor, chaticony
    
    ;load other information from ini file
    IniRead, mousespeed, setting.ini, other, mousespeed ;0~100(instant~slow)
    IniRead, checkdelay, setting.ini, other, checkdelay
    
    defaultUsePotionHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotionhp) / 100
    defaultUseDefensivePotionHPY :=  defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotiondefensive) / 100
    defaultUseManaPotionMPY := defaultMPTopY + (defaultWindowHeight-defaultMPTopY-bd) * (100-usepotionmp) / 100
    defaultLogoutHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-logouthp) / 100
    adjustLogout_X := 0
    adjustLogout_Y := 0
    return
    
    ;debug
    `::
    MouseGetPos, xpos, ypos 
    MsgBox, The cursor is at X%xpos% Y%ypos%. 
    return
    
    
    ;`:: 
    ;run, cports.exe /close * * * * PathofExile_x64.exe
    ;return
    
    F3::
    WinGetPos,,, w, h, A
    heightResizeRatio := (h-bt-bd)/(defaultWindowHeight-bt-bd)
    ; calculate log out button position
    if (adjustLogout_X == 0 && adjustLogout_Y == 0)
    {
        adjustLogout_X := w/2
        adjustLogout_Y := (defaultLogoutY-bt)*heightResizeRatio+bt
    }
    
    ; calculate HP center position and chat icon position
    ;note that we can't use widthResizeRatio, since 16:9, 4:3 has different width
    HX := (defaultHPMiddleX-bl)*heightResizeRatio+bl
    HY := (defaultHPMiddleY-bt)*heightResizeRatio+bt
    MX := (defaultMPMiddleX-bl)*heightResizeRatio+bl
    MY := (defaultMPMiddleY-bt)*heightResizeRatio+bt
    CX := (defaultChatX-bl)*heightResizeRatio+bl
    CY := (defaultChatY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    MouseMove HX, HY
    ;MouseMove MX, MY
    ;MouseMove CX, CY
    
    ; calculate use potion and logout HP Y
    adjustUsePotionHPY := (defaultUsePotionHPY-bt)*heightResizeRatio+bt
    adjustUseDefensivePotionHPY := (defaultUseDefensivePotionHPY-bt)*heightResizeRatio+bt
    adjustUseManaPotionMPY := (defaultUseManaPotionMPY-bt)*heightResizeRatio+bt
    adjustLogoutHPY := (defaultLogoutHPY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    MouseMove HX, adjustUsePotionHPY
    ;MouseMove HX, adjustUseDefensivePotionHPY
    ;MouseMove MX, adjustUseManaPotionMPY
    ;MouseMove HX, adjustLogoutHPY
    
    ;calculate chat icon search region, top left:(chatX1, chatY1), buttom right:(chatX2, chatY2)
    chatX1 := CX-7
    chatX2 := CX+7
    chatY1 := CY-7
    chatY2 := CY+7
    
    ;calculate use potion hp search region, top left:(hp1_X1, hp1_Y1), buttom right:(hp1_X2, hp1_Y2)
    hp1_X1 := HX-7
    hp1_X2 := HX+7
    hp1_Y1 := adjustUsePotionHPY-7
    hp1_Y2 := adjustUsePotionHPY+7
    
    ;calculate use defensive potion hp search region, top left:(hp3_X1, hp3_Y1), buttom right:(hp3_X2, hp3_Y2)
    hp3_X1 := HX-7
    hp3_X2 := HX+7
    hp3_Y1 := adjustUseDefensivePotionHPY-7
    hp3_Y2 := adjustUseDefensivePotionHPY+7
    
    ;calculate use mana potion mp search region, top left:(mp1_X1, mp1_Y1), buttom right:(mp1_X2, mp1_Y2)
    mp1_X1 := MX-7
    mp1_X2 := MX+7
    mp1_Y1 := adjustUseManaPotionMPY-7
    mp1_Y2 := adjustUseManaPotionMPY+7
    
    ;calculate log out hp search region, top left:(hp2_X1, hp2_Y1), buttom right:(hp2_X2, hp2_Y2)
    hp2_X1 := HX-7
    hp2_X2 := HX+7
    hp2_Y1 := adjustLogoutHPY-7
    hp2_Y2 := adjustLogoutHPY+7
    
    ;get hp center color and chat icon color used for pixel search later
    PixelGetColor, hpcolor1 , %HX%, %adjustUsePotionHPY% ; get color GRB
    PixelGetColor, hpcolor1rgb , %HX%, %adjustUsePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor2 , %HX%, %adjustLogoutHPY% ; get color GRB
    PixelGetColor, hpcolor2rgb , %HX%, %adjustLogoutHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor3 , %HX%, %adjustUseDefensivePotionHPY% ; get color GRB
    PixelGetColor, hpcolor3rgb , %HX%, %adjustUseDefensivePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, mpcolor1 , %MX%, %adjustUseManaPotionMPY% ; get color GRB
    PixelGetColor, mpcolor1rgb , %MX%, %adjustUseManaPotionMPY%, RGB ; get color RGB
    
    PixelGetColor, chaticoncolor , %CX%, %CY% 
    PixelGetColor, chaticoncolorrgb , %CX%, %CY%, RGB
    
    ;pop up a gui showing the finding color for user to double check
    gui, new
    gui, Default
    gui, +LastFound ; make the GUI window the last found window for use by the line below.
    gui, add, groupbox, w205 h120, Colors found:
    gui, add, text, yp+25 xp+10, Chat Icon Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%chaticoncolorrgb%,100
    gui, add, text, yp+25 xp-80, Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor1rgb%,100
    gui, add, text, yp+25 xp-80, Logout Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor2rgb%,100
    gui, add, text, yp+25 xp-80, 2nd Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor3rgb%,100
    gui, add, text, yp+25 xp-80, Mana Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%mpcolor1rgb%,100
    gui, add, button, xp-80 yp+25 w25 h25 gDone, OK
    gui, show, ,Activated
    Menu, Tray, Icon, Images\On.ico
    
    ;start searching (render a frame takes 0.03 sec in 30FPS, so we set the search time to 0.1 sec to make sure it won't search the same frame twice)
    Loop 
    {
        IfWinActive, Path of Exile
        {
            ;find the orange chat Icon (makes sure you are on a character)
            ;variable ErrorLevel is set to 0 if the color was found in the specified region, 1 if it was not found,
            ; or 2 if there was a problem that prevented the command from conducting the search.
            PixelSearch, FoundoX, FoundoY, %chatX1%, %chatY1%, %chatX2%, %chatY2%, %chaticoncolor%, 5, Fast    
            if ErrorLevel = 0
            {
                ;use potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp1_X1%, %hp1_Y1%, %hp1_X2%, %hp1_Y2%, %hpcolor1%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 2000
                }
    
                ;use defensive potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp3_X1%, %hp3_Y1%, %hp3_X2%, %hp3_Y2%, %hpcolor3%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usedefensivepotionflaskindex%
    				Sleep, 6000
                }
    
                ;use mana potion when MP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %mp1_X1%, %mp1_Y1%, %mp1_X2%, %mp1_Y2%, %mpcolor1%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usemanapotionflaskindex%
    				Sleep, 6000
                }     
    			
                ;log out when HP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %hp2_X1%, %hp2_Y1%, %hp2_X2%, %hp2_Y2%, %hpcolor2%, 20, Fast
                ;if ErrorLevel = 1
                ;{
    			;	run, cports.exe /close * * * * PathofExile_x64.exe
                ;}
            }
        }
        Sleep, checkdelay
    }
    return
    
    Border:
    MsgBox, Windowed (Borders all around)
    ;For Windowed (with Borders all round)
    bl = 8
    br = 8
    bt = 29
    bd = 8
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown1212
    return
    
    Borderless:
    MsgBox, Borderless (No Borders)
    ;For Fullscreen Borderless
    bl = 0
    br = 0
    bt = 0
    bd = 0
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown
    return
    
    Done:
    gui, submit, nohide
    gui, destroy
    return
    
    HowToUse:
    MsgBox, `: Instant Logout`nF3: Activate`nF4: Reload`nF12: Exit`nCtrl+X: resync
    return
    
    ^x::
    SendInput, {Enter}
    sleep, 20
    SendInput, {/}oos
    SendInput, {Enter}
    return
    
    ;F4::Reload
    F12::ExitApp
    I hope this can help someone.
    Last edited by SoulBeats; 09-05-2018 at 09:22 PM.

  10. Thanks EthEth, humiliat9r (2 members gave Thanks to SoulBeats for this useful post)
  11. #69
    EthEth's Avatar Active Member
    Reputation
    51
    Join Date
    Aug 2016
    Posts
    78
    Thanks G/R
    57/38
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I see that my code is messed up more then New Orlean after the storm... When I get better I will sit to it. Nice thing that you were able to find your way around mate!

  12. #70
    EthEth's Avatar Active Member
    Reputation
    51
    Join Date
    Aug 2016
    Posts
    78
    Thanks G/R
    57/38
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got ton of work after sick-leave, so... no update or cleanup to the code.

    I've got some questions:
    1. What would be more important for you: tutorial how to change this script yourself OR modification to this version?
    2. Do you need changes to this script? (like: separate cool-downs for potions - as I understand, sleep works for the whole loop blocking other flasks or defensive flasks?)
    3. For fellow devs: is there any sense to hide autopot inside the most popular trade-macro? Am I correct that even if they detect process sending key-presses to the game, they will have info that it is some different version of trade macro (and will be treated as false-positive?)?

  13. #71
    humiliat9r's Avatar Member
    Reputation
    1
    Join Date
    Mar 2018
    Posts
    6
    Thanks G/R
    12/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nvm delete
    Last edited by humiliat9r; 09-27-2018 at 04:18 PM.

  14. #72
    SoulBeats's Avatar Member
    Reputation
    3
    Join Date
    Sep 2018
    Posts
    10
    Thanks G/R
    4/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by EthEth View Post
    Got ton of work after sick-leave, so... no update or cleanup to the code.

    I've got some questions:
    1. What would be more important for you: tutorial how to change this script yourself OR modification to this version?
    2. Do you need changes to this script? (like: separate cool-downs for potions - as I understand, sleep works for the whole loop blocking other flasks or defensive flasks?)
    3. For fellow devs: is there any sense to hide autopot inside the most popular trade-macro? Am I correct that even if they detect process sending key-presses to the game, they will have info that it is some different version of trade macro (and will be treated as false-positive?)?
    Hello again.

    1: Personally, I'm very interested in "tutorial how to change this script yourself". (I do not understand what this "checkdelay" is and how it works, for example ...)
    2: I noticed that the cooldowns were being shared, so what I did was separate the script into 3, one for each type of potion. (This does not seem to be the best solution, as it may be generating unnecessary efforts, but it worked fine for now.)
    3: I can not say much about it. But in my opinion it should remain separate to be clearer. ^^

  15. #73
    EthEth's Avatar Active Member
    Reputation
    51
    Join Date
    Aug 2016
    Posts
    78
    Thanks G/R
    57/38
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by SoulBeats View Post
    1: Personally, I'm very interested in "tutorial how to change this script yourself". (I do not understand what this "checkdelay" is and how it works, for example ...)
    2: I noticed that the cooldowns were being shared, so what I did was separate the script into 3, one for each type of potion. (This does not seem to be the best solution, as it may be generating unnecessary efforts, but it worked fine for now.)
    3: I can not say much about it. But in my opinion it should remain separate to be clearer. ^^
    1: Working on it,
    2: It's approach that can work, but bad performance-wise. I'm looking into autohotkey documentation to find a good method for this.
    3: From what I understand, it would be just block of code added to the main script.

  16. Thanks SoulBeats (1 members gave Thanks to EthEth for this useful post)
  17. #74
    darksabre91's Avatar Member
    Reputation
    1
    Join Date
    Sep 2018
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the script. It does a good job keeping me alive.

    However, I have run into an issue where it will log me out when switching zones occasionally.

  18. #75
    hacker143's Avatar Knight
    Reputation
    21
    Join Date
    Mar 2017
    Posts
    218
    Thanks G/R
    32/19
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by EthEth View Post
    I've made some modification while lying sick in bed (and with internet so crappy that online play is no-go). They are in-professional, so... yeah. But there is something for you to work with!

    New settings.ini:
    Code:
    [border]
    borderleft=0
    borderright=0
    bordertop=0
    borderdown=0
    
    [potion]
    hpremain=50
    flask=1
    
    [defensive_potion]
    hpremain=70
    flask=2
    
    [mana_potion]
    mpremain=50
    flask=5
    
    [logout]
    hpremain=35
    flask=
    
    [anchor]
    logoutbtnx=912
    logoutbtny=436
    windoww=1920
    windowh=1080
    hpmiddlex=117
    hpmiddley=1100
    hptopy=847
    mpmiddlex=1805
    mpmiddley=1100
    mptopy=847
    chaticonx=17
    chaticony=881
    
    [other]
    mousespeed=0
    checkdelay=rand(331,427)
    New script code:
    Code:
    #IfWinActive, Path of Exile ;check if a window with title "Path of Exile", casesensitive
    Menu, Tray, Icon, Images\Off.ico ;get a icon image
    Menu, Tray, Tip, Antyradio.pl ;tool tip when mouse over icon
    Menu, Tray, Add ;creates a separator line
    Menu, Tray, Add, Windowed (Borders), Border ; create a new menu item
    Menu, Tray, Add, Windowed (Borderless), Borderless
    Menu, Tray, Add, How To Use, HowToUse
    
    ;load border information from ini file
    toggle = 0
    IniRead, bl, setting.ini, border, borderleft
    IniRead, br, setting.ini, border, borderright
    IniRead, bt, setting.ini, border, bordertop
    IniRead, bd, setting.ini, border, borderdown
    IniRead, bd, setting.ini, border, borderdown
    
    ;load potion information from ini file
    IniRead, usepotionhp, setting.ini, potion, hpremain
    IniRead, usepotionflaskindex, setting.ini, potion, flask
    
    ;load defensive potion information from ini file
    IniRead, usepotiondefensive, setting.ini, defensive_potion, hpremain
    IniRead, usedefensivepotionflaskindex, setting.ini, defensive_potion, flask
    
    ;load mana potion information from ini file
    IniRead, usepotionmp, setting.ini, mana_potion, mpremain
    IniRead, usemanapotionflaskindex, setting.ini, mana_potion, flask
    
    ;load logout information from ini file
    IniRead, logouthp, setting.ini, logout, hpremain
    IniRead, logoutflaskindex, setting.ini, logout, flask
    
    ;load anchor information from ini file
    IniRead, defaultLogoutX, setting.ini, anchor, logoutbtnx
    IniRead, defaultLogoutY, setting.ini, anchor, logoutbtny
    
    IniRead, defaultWindowWidth, setting.ini, anchor, windoww
    IniRead, defaultWindowHeight, setting.ini, anchor, windowh
    
    IniRead, defaultHPMiddleX, setting.ini, anchor, hpmiddlex
    IniRead, defaultHPMiddleY, setting.ini, anchor, hpmiddley
    IniRead, defaultHPTopY, setting.ini, anchor, hptopy
    
    IniRead, defaultMPMiddleX, setting.ini, anchor, mpmiddlex
    IniRead, defaultMPMiddleY, setting.ini, anchor, mpmiddley
    IniRead, defaultMPTopY, setting.ini, anchor, mptopy
    
    IniRead, defaultChatX, setting.ini, anchor, chaticonx
    IniRead, defaultChatY, setting.ini, anchor, chaticony
    
    ;load other information from ini file
    IniRead, mousespeed, setting.ini, other, mousespeed ;0~100(instant~slow)
    IniRead, checkdelay, setting.ini, other, checkdelay
    
    defaultUsePotionHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotionhp) / 100
    defaultUseDefensivePotionHPY :=  defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-usepotiondefensive) / 100
    defaultUseManaPotionMPY := defaultMPTopY + (defaultWindowHeight-defaultMPTopY-bd) * (100-usepotionmp) / 100
    defaultLogoutHPY := defaultHPTopY + (defaultWindowHeight-defaultHPTopY-bd) * (100-logouthp) / 100
    adjustLogout_X := 0
    adjustLogout_Y := 0
    return
    
    ;debug
    `::
    MouseGetPos, xpos, ypos 
    MsgBox, The cursor is at X%xpos% Y%ypos%. 
    return
    
    
    ;`:: 
    ;run, cports.exe /close * * * * PathofExile_x64.exe
    ;return
    
    F4::
    WinGetPos,,, w, h, A
    heightResizeRatio := (h-bt-bd)/(defaultWindowHeight-bt-bd)
    ; calculate log out button position
    if (adjustLogout_X == 0 && adjustLogout_Y == 0)
    {
        adjustLogout_X := w/2
        adjustLogout_Y := (defaultLogoutY-bt)*heightResizeRatio+bt
    }
    
    ; calculate HP center position and chat icon position
    ;note that we can't use widthResizeRatio, since 16:9, 4:3 has different width
    HX := (defaultHPMiddleX-bl)*heightResizeRatio+bl
    HY := (defaultHPMiddleY-bt)*heightResizeRatio+bt
    MX := (defaultMPMiddleX-bl)*heightResizeRatio+bl
    MY := (defaultMPMiddleY-bt)*heightResizeRatio+bt
    CX := (defaultChatX-bl)*heightResizeRatio+bl
    CY := (defaultChatY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, HY
    MouseMove MX, MY
    ;MouseMove CX, CY
    
    ; calculate use potion and logout HP Y
    adjustUsePotionHPY := (defaultUsePotionHPY-bt)*heightResizeRatio+bt
    adjustUseDefensivePotionHPY := (defaultUseDefensivePotionHPY-bt)*heightResizeRatio+bt
    adjustUseManaPotionMPY := (defaultUseManaPotionMPY-bt)*heightResizeRatio+bt
    adjustLogoutHPY := (defaultLogoutHPY-bt)*heightResizeRatio+bt
    
    ;use this to check if the position is correct
    ;MouseMove HX, adjustUsePotionHPY
    ;MouseMove HX, adjustUseDefensivePotionHPY
    MouseMove MX, adjustUseManaPotionMPY
    ;MouseMove HX, adjustLogoutHPY
    
    ;calculate chat icon search region, top left:(chatX1, chatY1), buttom right:(chatX2, chatY2)
    chatX1 := CX-7
    chatX2 := CX+7
    chatY1 := CY-7
    chatY2 := CY+7
    
    ;calculate use potion hp search region, top left:(hp1_X1, hp1_Y1), buttom right:(hp1_X2, hp1_Y2)
    hp1_X1 := HX-7
    hp1_X2 := HX+7
    hp1_Y1 := adjustUsePotionHPY-7
    hp1_Y2 := adjustUsePotionHPY+7
    
    ;calculate use defensive potion hp search region, top left:(hp3_X1, hp3_Y1), buttom right:(hp3_X2, hp3_Y2)
    hp3_X1 := HX-7
    hp3_X2 := HX+7
    hp3_Y1 := adjustUseDefensivePotionHPY-7
    hp3_Y2 := adjustUseDefensivePotionHPY+7
    
    ;calculate use mana potion mp search region, top left:(mp1_X1, mp1_Y1), buttom right:(mp1_X2, mp1_Y2)
    mp1_X1 := MX-7
    mp1_X2 := MX+7
    mp1_Y1 := adjustUseManaPotionMPY-7
    mp1_Y2 := adjustUseManaPotionMPY+7
    
    ;calculate log out hp search region, top left:(hp2_X1, hp2_Y1), buttom right:(hp2_X2, hp2_Y2)
    hp2_X1 := HX-7
    hp2_X2 := HX+7
    hp2_Y1 := adjustLogoutHPY-7
    hp2_Y2 := adjustLogoutHPY+7
    
    ;get hp center color and chat icon color used for pixel search later
    PixelGetColor, hpcolor1 , %HX%, %adjustUsePotionHPY% ; get color GRB
    PixelGetColor, hpcolor1rgb , %HX%, %adjustUsePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor2 , %HX%, %adjustLogoutHPY% ; get color GRB
    PixelGetColor, hpcolor2rgb , %HX%, %adjustLogoutHPY%, RGB ; get color RGB
    
    PixelGetColor, hpcolor3 , %HX%, %adjustUseDefensivePotionHPY% ; get color GRB
    PixelGetColor, hpcolor3rgb , %HX%, %adjustUseDefensivePotionHPY%, RGB ; get color RGB
    
    PixelGetColor, mpcolor1 , %MX%, %adjustUseManaPotionMPY% ; get color GRB
    PixelGetColor, mpcolor1rgb , %MX%, %adjustUseManaPotionMPY%, RGB ; get color RGB
    
    PixelGetColor, chaticoncolor , %CX%, %CY% 
    PixelGetColor, chaticoncolorrgb , %CX%, %CY%, RGB
    
    ;pop up a gui showing the finding color for user to double check
    gui, new
    gui, Default
    gui, +LastFound ; make the GUI window the last found window for use by the line below.
    gui, add, groupbox, w205 h120, Colors found:
    gui, add, text, yp+25 xp+10, Chat Icon Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%chaticoncolorrgb%,100
    gui, add, text, yp+25 xp-80, Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor1rgb%,100
    gui, add, text, yp+25 xp-80, Logout Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor2rgb%,100
    gui, add, text, yp+25 xp-80, 2nd Potion Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%hpcolor3rgb%,100
    gui, add, text, yp+25 xp-80, Mana Color:
    gui, add, Progress, xp+80 yp-5 w100 h20 c%mpcolor1rgb%,100
    gui, add, button, xp-80 yp+25 w25 h25 gDone, OK
    gui, show, ,Activated
    Menu, Tray, Icon, Images\On.ico
    
    ;start searching (render a frame takes 0.03 sec in 30FPS, so we set the search time to 0.1 sec to make sure it won't search the same frame twice)
    Loop 
    {
        IfWinActive, Path of Exile
        {
            ;find the orange chat Icon (makes sure you are on a character)
            ;variable ErrorLevel is set to 0 if the color was found in the specified region, 1 if it was not found,
            ; or 2 if there was a problem that prevented the command from conducting the search.
            PixelSearch, FoundoX, FoundoY, %chatX1%, %chatY1%, %chatX2%, %chatY2%, %chaticoncolor%, 5, Fast    
            if ErrorLevel = 0
            {
                ;use potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp1_X1%, %hp1_Y1%, %hp1_X2%, %hp1_Y2%, %hpcolor1%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use defensive potion when HP reaches the ratio user set
                PixelSearch, FoundhX, FoundhY, %hp3_X1%, %hp3_Y1%, %hp3_X2%, %hp3_Y2%, %hpcolor3%, 20, Fast
                if ErrorLevel = 1
                {
                    SendInput, %usepotionflaskindex%
    				Sleep, 5000
                }
    
                ;use mana potion when MP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %mp1_X1%, %mp1_Y1%, %mp1_X2%, %mp1_Y2%, %mpcolor1%, 20, Fast
                ;if ErrorLevel = 1
                ;{
                ;    SendInput, %usepotionflaskindex%
    			;	Sleep, 3000
                ;}     
    			
                ;log out when HP reaches the ratio user set
                ;PixelSearch, FoundhX, FoundhY, %hp2_X1%, %hp2_Y1%, %hp2_X2%, %hp2_Y2%, %hpcolor2%, 20, Fast
                ;if ErrorLevel = 1
                ;{
    			;	run, cports.exe /close * * * * PathofExile_x64.exe
                ;}
            }
        }
        Sleep, checkdelay
    }
    return
    
    Border:
    MsgBox, Windowed (Borders all around)
    ;For Windowed (with Borders all round)
    bl = 8
    br = 8
    bt = 29
    bd = 8
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown1212
    return
    
    Borderless:
    MsgBox, Borderless (No Borders)
    ;For Fullscreen Borderless
    bl = 0
    br = 0
    bt = 0
    bd = 0
    IniWrite, %bl%, setting.ini, border, borderleft
    IniWrite, %br%, setting.ini, border, borderright
    IniWrite, %bt%, setting.ini, border, bordertop
    IniWrite, %bd%, setting.ini, border, borderdown
    return
    
    Done:
    gui, submit, nohide
    gui, destroy
    return
    
    HowToUse:
    MsgBox, `: Instant Logout`nF4: Activate`nF5: Reload`nF12: Exit`nCtrl+X: resync
    return
    
    ^x::
    SendInput, {Enter}
    sleep, 20
    SendInput, {/}oos
    SendInput, {Enter}
    return
    
    ;F5::Reload
    F12::ExitApp
    Changes:
    - disabled auto-quit (because script in the present state not always understands that we are not in the game, for example: press win button and open start menu...)
    - added secondary potion (named defensive potion) - you can use defensive potions or just first line of defense HP potions (and leave the standard potion for instant flasks)
    - added mana potion (very basic)
    - added debugg button that returns current mouse position (for easier configuration)

    With this you should be able to go a little wilder with potion configurations.

    Version above works for me. I don't have time and health to help you out with it more right now. GL!
    bro, can you change it that works perfectly on resolution 1366x768? thank youu

Page 5 of 8 FirstFirst 12345678 LastLast

Similar Threads

  1. [Selling] RANK1 WoW-Accounts-SCARAB LORD-INVINCIBLE-TIER 3-Get Your Account Now! MoP is Near !
    By V1rTualMMO in forum WoW-US Account Buy Sell Trade
    Replies: 4
    Last Post: 09-13-2012, 08:29 PM
  2. [Selling] RANK1 WoW-Accounts-SCARAB LORD-INVINCIBLE-TIER 3-Get Your Account Now! MoP is Near !
    By V1rTualMMO in forum WoW-EU Account Buy Sell Trade
    Replies: 0
    Last Post: 09-13-2012, 02:37 AM
  3. [Buying] Buying your gold, fast easy and safe!
    By Zergdude in forum Diablo 3 Buy Sell Trade
    Replies: 9
    Last Post: 07-16-2012, 06:05 PM
  4. [How To] Keep your World of Warcraft Account Safe
    By Energizer Rabbit in forum WoW Scam Prevention
    Replies: 17
    Last Post: 03-10-2010, 03:39 PM
  5. Replies: 43
    Last Post: 02-16-2009, 08:13 PM
All times are GMT -5. The time now is 01:56 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search