Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Diablo 4
You last visited: Today at 16:35

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Easy AHK Script to auto heal at certain HP for D4

Discussion on Easy AHK Script to auto heal at certain HP for D4 within the Diablo 4 forum part of the Popular Games category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2022
Posts: 2
Received Thanks: 0
Cool Easy AHK Script to auto heal at certain HP for D4

Hey there - here is a script I coded in a few minutes for 1440p. Feel free to take this source and use how you want. Has a nice overlay included just change coordinates and colors if needed.

Code:
; Diablo 4 HP

;\\ Some fancy diablo 4 magic with ahk - checks hp and heals at a certain point
;\\ I made this for 1440p but can easily determine window size and automatically find positions with a few more minutes of work


#NoEnv
CoordMode, Mouse, Client
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetBatchLines -1
SetMouseDelay, 0


; some fancy gui overlay magic - pauses in menus/vendors
go:
text1 = Launched...
WinActivate, ahk_class SunAwtFrame 
WinGetPos, wx, wy, wwx, wwy,ahk_class SunAwtFrame             
Gui +ToolWindow -Caption +Owner +border +AlwaysOnTop
Gui, Color, c262322
Gui, Font, s10 cB5B5B5
Gui Add, Text, x5 y-1 w120 h23 +0x200, Diablo 4 Tool
Gui Add, Button, x117 y54 w80 h23 gstart, Start
Gui Add, Text, x7 y28 w120 h24 +0x200, Status:
Gui, Font, c00FF00
Gui Add, Text, x58 y29 w120 h23 +0x200 vtext1, %text1%
wy += 1330
wx += 20
Gui Show, x%wx% y%wy% w206 h84, Tom's Agility
return



start:
guicontrol,, text1, Getting HP Status...
WinACtivate, ahk_class Diablo IV Main Window Class
loop{
WinACtivate, ahk_class Diablo IV Main Window Class
PixelSearch, px, py, 812, 1296, 847, 1315, 0x9E3038, 25, Fast RGB ; coords for HP
    If (errorlevel = 0)
        {
            guicontrol,, text1, Healthy...
            WinACtivate, ahk_class Diablo IV Main Window Class
        }
    If (errorlevel = 1)
        {
            sleep 300
            Pixelsearch, px2,py2, 2488, 19, 2553, 69, 0xB64131, 15, Fast RGB ; coords for tab menu exit button
            If (errorlevel = 0)
                {
                    guicontrol,, text1, Paused.
                    WinActivate, ahk_class Diablo IV Main Window Class
                }
            If (errorlevel = 1)
                {

                    Pixelsearch, px2,py2, 2514, 83, 2555, 115, 0x842422, 15, Fast RGB ; coords for shop inventory exit button
                    If (errorlevel = 0)
                        {
                            guicontrol,, text1, Paused.
                            WinACtivate, ahk_class Diablo IV Main Window Class
                        }
                        If (errorlevel = 1)
                            {
            guicontrol,, text1, Healing...
            WinACtivate, ahk_class Diablo IV Main Window Class
            Send {XButton1} ; potion bind
                }
        }
    }
    }
return

F9::Exitapp
Enjoy
tomwa333 is offline  
Old 07/11/2023, 08:38   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 301
Received Thanks: 23
There have been several bans using ahk.
mojoe87 is offline  
Reply


Similar Threads Similar Threads
[Buying] ARMA 3 AHK SCRIPT: looking for superb pulldown ahk or colorcoded aimlock ahk (buying)
02/04/2022 - ArmA Trading - 0 Replies
Hi I am looking for a custom made pulldown.ahk script (for Arma 3) that is designed for: - guns 6.5mm (like Type 115, Promet..)/7.62mm (like MK1) - only activates/enables when in-game hipfire mode (combat stance) and ARCO scope/zoomed in/holding breath ARCO scope 1x and 2x - works when I hold the scope down with right click (so no toggle scope command) - make sure it works when zoomed in also (1x and 2x) whilst not holding and holding breath - that works on any fov/screen resolution and...
how to award certain player certain items
01/14/2015 - EO PServer Hosting - 7 Replies
hi there, trying to figure out how to award items to certain players for donating and such. lets go with the newbiegift as example, how would i get it to a non pm player?



All times are GMT +1. The time now is 16:35.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.