• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Memory hack

Level 3
Joined
Feb 24, 2018
Messages
39
i can't use it,Error reported
as shown in the figure,just change this file?Is the code wrong?
QQ拼音截图20180625005232.jpg
QQ拼音截图20180625004702.jpg
 
Last edited:

sentrywiz

S

sentrywiz

I'm very interested in this. Not to create viruses of course.

But I don't use or understand much jass besides for cleaning leaks.
So can one explain in simple english can this be used to:

- make an outside server (preferably with a database of any sort) so that player data can be saved.
- if the above is possible, then I see "mmorpg" maps suddenly being a huge thing on hive.

Also, for real, any map can now be used to hack my machine?
Damn... that's scary.
 

sentrywiz

S

sentrywiz

sure you can create/write/save any files you want, speak with websites etc (better with library because writing it on pure ASM will be a pretty hard task)

Like... in the background, while the game is running it can also export data anywhere?
Like in intervals or once per load time?

You make it sound so easy... which is probably true, for you.
 
Also, for real, any map can now be used to hack my machine?

No it was removed in Patch 1.29, so basically this thread just means you have to only play the newest WarCraft III unless you want to risk a virus.
 

sentrywiz

S

sentrywiz

No it was removed in Patch 1.29, so basically this thread just means you have to only play the newest WarCraft III unless you want to risk a virus.

Which I haven't downloaded and updated to yet.

theres nothing like background, just in game's runtime, yeah

From hero to villain, your exploits force me to update my warcraft :D
J/k.

Do I need to learn cheat engine in order to make use of your system?
And also by library you mean some of the files you have on github?
 
Level 11
Joined
Jul 4, 2016
Messages
626
Tried using GetMouseX and GetMouseY in conjunction with TriggerHappy's MemeHack JNGP, however, it doesn't appear to be working, it just sets the unit/sfx to slightly above center of map. Does it have to be used with the appropriate event or something like the 1.30 mouse natives?
 
im afraid it cannot be used in multiplayer
Well, then how about Blizzard function? This uses a "Player" and does not call desync, however it can take only 4 keys. Maybe it's possible to combine those functions to use any key?

JASS:
 function    TriggerRegisterPlayerKeyEventBJ    trigger trig, player whichPlayer, integer keType, integer keKey
 
Level 11
Joined
Jul 4, 2016
Messages
626
Can anyone please help to make functions GetPlayerMouseX and GetPlayerMouseY?
In the recentagle editor api, there's a
function GetMouseX takes nothing returns real
function GetMouseY takes nothing returns real
Maybe these can be used to do that purpose?
 
Level 7
Joined
Feb 9, 2021
Messages
301
In the recentagle editor api, there's a
function GetMouseX takes nothing returns real
function GetMouseY takes nothing returns real
Maybe these can be used to do that purpose?
I saw them, but i think they don't work in multiplayer. It should take player. There are functions like this in 1.30+,so it should be possible to recreate them.
 
Level 5
Joined
Mar 6, 2017
Messages
190
I saw them, but i think they don't work in multiplayer. It should take player. There are functions like this in 1.30+,so it should be possible to recreate them.
make a custom function for it

for example:

JASS:
function GetMouseXOfPlayer takes player p returns real
    if p==GetLocalPlayer() then
        return GetMouseX()
    endif
    return 0.
endfunction
 
Level 7
Joined
Feb 9, 2021
Messages
301
make a custom function for it

for example:

JASS:
function GetMouseXOfPlayer takes player p returns real
    if p==GetLocalPlayer() then
        return GetMouseX()
    endif
    return 0.
endfunction
Wouldn't this cause desynchronisation if I use it, for example, to move the spell caster to the X and Y.
 
Level 7
Joined
Feb 9, 2021
Messages
301
yeah it will desync, you should sync those data via some other tools
Any ideas on how to do it? Really need those functions.

I found this solution, but it is too slow...

JASS:
gamecache cache = InitGameCache("cache")
function SyncReal takes player p, real val returns real
if (GetLocalPlayer() == p) then
StoreReal(cache, "", "", val)
endif
TriggerSyncStart()
if (GetLocalPlayer() == p) then
SyncStoredReal(cache, "", "")
endif
TriggerSleepAction(2)// smaller value cause desynch
TriggerSyncReady()
return GetStoredReal(cache, "", "")
endfunction
//==================================================
function Trig_CameraSynh_Actions takes nothing returns nothing
player p = Player(0)
real x=0
real y=0
real syncx=0
real syncy=0
string xs,ys
if GetLocalPlayer()==p
xs=R2S(GetMouseTerrainX())
ys=R2S(GetMouseTerrainY())
x=S2R(xs)
y=S2R(ys)
endif
syncx = SyncReal(p, x)
syncy = SyncReal(p, y)
CreateUnit(p, 'e009', syncx, syncy, 0)
endfunction

//===========================================================================
function InitTrig_CameraSynh takes nothing returns nothing
    set gg_trg_CameraSynh = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_CameraSynh, 2.10 )
    call TriggerAddAction( gg_trg_CameraSynh, function Trig_CameraSynh_Actions )
endfunction
 
Last edited:
Level 7
Joined
Feb 9, 2021
Messages
301
cause it detect so many mouse point ( 10 players in DotA ) so it cause desync. just make it detect just 1 player per use so it will be fine
Can you show, please? To be honest, I have no idea how to do it.

Also, Happy's Library looks great, and probably will work. Didn't figure out how to use it yet.
 
Level 7
Joined
Feb 9, 2021
Messages
301
Here I am again. Did anyone create these functions?

BlzGetAbilityIntegerLevelField
BlzSetAbilityIntegerLevelField
BlzGetAbilityRealLevelField
BlzSetAbilityRealLevelField

I want to use this system on 1.26 New Bonus [vJASS][LUA]
 
Last edited:
Level 7
Joined
Feb 9, 2021
Messages
301
I tried using MemoryHackTestAbilityChargesHook, but it gives an error "invalid address" when a hero learns a second spell with charges as well. What is the problem? To use it, I call for InitCustomAbilityAddressChargesHook() and then for EnableCustomUnitAbilityCharges() when each of the spells is learnt. Interestingly, if I InitCustomAbilityAddressChargesHook() for one of the spells and then EnableCustomUnitAbilityCharges() for another spell, it works and gives no error, but the spell with InitCustomAbilityAddressChargesHook() has to be learnt for this to work. I heard that is your code @DracoL1ch

JASS:
library MemoryHackTestAbilityChargesHook
    globals
        integer pDrawAbilityCharges         = 0
        integer pCommonAIJumpOut            = 0
        integer pGameUIAbilityChargesBox    = 0
        integer pGameUIAbilityChargesCount  = 0
        integer pHTLoadInteger              = 0
        integer pHTLoadBoolean              = 0
        integer pUnitUpdateCommandPanel     = 0
    
        hashtable ChargesIndicatorData      = InitHashtable( )
        integer ChargesIndicatorDataHandle  = GetHandleId( ChargesIndicatorData )
        integer pCustomChargesDisplayer     = 0
    endglobals

    function InitCustomChargesData takes nothing returns nothing
        set pfast_call_1  = AllocateExecutableMemory( 64000 )
        set pfast_call_2  = pfast_call_2 + 1000
        set pCustomChargesDisplayer = pfast_call_1 + 55500

        call WriteRealMemory( pfast_call_1, 0x0 )
        call WriteRealMemory( pfast_call_2, 0x0 )

        call WriteRealMemory( pCustomChargesDisplayer +   0x0, 0x0824448B )
        call WriteRealMemory( pCustomChargesDisplayer +   0x4, 0x7C8B5756 )
        call WriteRealMemory( pCustomChargesDisplayer +   0x8, 0x57500C24 )
        call WriteRealMemory( pCustomChargesDisplayer +   0xC, 0x8DE8F18B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x10, 0x85000372 )

        call WriteRealMemory( pCustomChargesDisplayer +  0xF, pDrawAbilityCharges - ( pCustomChargesDisplayer + 0xF ) - 0x4 )

        call WriteRealMemory( pCustomChargesDisplayer +  0x14, 0x397C75FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x18, 0x777F407E )
        call WriteRealMemory( pCustomChargesDisplayer +  0x1C, 0x51605E5F )
        call WriteRealMemory( pCustomChargesDisplayer +  0x20, 0x4E8B9090 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x24, 0xCC40B830 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x28, 0xD0FF6F2D )

        call WriteRealMemory( pCustomChargesDisplayer +  0x26, pCommonAIJumpOut )

        call WriteRealMemory( pCustomChargesDisplayer +  0x2C, 0x6974C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x30, 0x8B905159 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x34, 0x3476FFD8 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x38, 0x99996850 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x3C, 0x10B89999 )

        call WriteRealMemory( pCustomChargesDisplayer +  0x3A, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer +  0x40, 0xFF6F3CAB )
        call WriteRealMemory( pCustomChargesDisplayer +  0x3F, pHTLoadBoolean )

        call WriteRealMemory( pCustomChargesDisplayer +  0x44, 0x0CC483D0 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x48, 0x4C74C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x4C, 0x90905990 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x50, 0x828B168B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x54, 0x00000308 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x58, 0x53347E8B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x5C, 0xD0FFCE8B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x60, 0x533476FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x64, 0x99999968 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x68, 0xB8D88B99 )
        
        call WriteRealMemory( pCustomChargesDisplayer +  0x65, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer +  0x6C, pHTLoadInteger )

        call WriteRealMemory( pCustomChargesDisplayer +  0x70, 0xC483D0FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x74, 0x51C88B0C )
        call WriteRealMemory( pCustomChargesDisplayer +  0x78, 0xCF8BD38B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x7C, 0x332E10B8 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x80, 0x6AD0FF6F )
        
        call WriteRealMemory( pCustomChargesDisplayer +  0x7D, pGameUIAbilityChargesBox )

        call WriteRealMemory( pCustomChargesDisplayer +  0x84, 0x8BD38B01 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x88, 0x2E40B8CF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x8C, 0xD0FF6F33 )
        
        call WriteRealMemory( pCustomChargesDisplayer +  0x8A, pGameUIAbilityChargesCount )

        call WriteRealMemory( pCustomChargesDisplayer +  0x90, 0x5F07EB5B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x94, 0x0008C25E )
        call WriteRealMemory( pCustomChargesDisplayer +  0x98, 0xC2615990 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x9C, 0x90900008 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xA0, 0x0824448B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xA4, 0x7C8B5756 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xA8, 0x57500C24 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xAC, 0x8390F18B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xB0, 0x859008C4 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xB4, 0x397C75FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0xB8, 0x777F407E )
        call WriteRealMemory( pCustomChargesDisplayer +  0xBC, 0x51605E5F )
        call WriteRealMemory( pCustomChargesDisplayer +  0xC0, 0x4E8B9090 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xC4, 0xCC40B830 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xC8, 0xD0FF6F2D )
        
        call WriteRealMemory( pCustomChargesDisplayer +  0xC6, pCommonAIJumpOut )

        call WriteRealMemory( pCustomChargesDisplayer +  0xCC, 0x6974C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xD0, 0x8B905159 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xD4, 0x3476FFD8 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xD8, 0x99996850 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xDC, 0x10B89999 )

        call WriteRealMemory( pCustomChargesDisplayer +  0xDA, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer +  0xE0, 0xFF6F3CAB )

        call WriteRealMemory( pCustomChargesDisplayer +  0xDF, pHTLoadBoolean )

        call WriteRealMemory( pCustomChargesDisplayer +  0xE4, 0x0CC483D0 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xE8, 0x4C74C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xEC, 0x90905990 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xF0, 0x828B168B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xF4, 0x00000308 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xF8, 0x53347E8B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xFC, 0xD0FFCE8B )
        call WriteRealMemory( pCustomChargesDisplayer + 0x100, 0x533476FF )
        call WriteRealMemory( pCustomChargesDisplayer + 0x104, 0x99999968 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x108, 0xB8D88B99 )

        call WriteRealMemory( pCustomChargesDisplayer + 0x105, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer + 0x10C, pHTLoadInteger )

        call WriteRealMemory( pCustomChargesDisplayer + 0x110, 0xC483D0FF )
        call WriteRealMemory( pCustomChargesDisplayer + 0x114, 0x51C88B0C )
        call WriteRealMemory( pCustomChargesDisplayer + 0x118, 0xCF8BD38B )
        call WriteRealMemory( pCustomChargesDisplayer + 0x11C, 0x332E10B8 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x120, 0x6AD0FF6F )

        call WriteRealMemory( pCustomChargesDisplayer + 0x11D, pGameUIAbilityChargesBox )

        call WriteRealMemory( pCustomChargesDisplayer + 0x124, 0x8BD38B01 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x128, 0x2E40B8CF )
        call WriteRealMemory( pCustomChargesDisplayer + 0x12C, 0xD0FF6F33 )

        call WriteRealMemory( pCustomChargesDisplayer + 0x12A, pGameUIAbilityChargesCount )

        call WriteRealMemory( pCustomChargesDisplayer + 0x130, 0x5F07EB5B )
        call WriteRealMemory( pCustomChargesDisplayer + 0x134, 0x0008C25E )
        call WriteRealMemory( pCustomChargesDisplayer + 0x138, 0xC2615990 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x13C, 0x90900008 )
    endfunction

    function InitCustomAbilityAddressChargesHook takes integer pAbil returns nothing
        local integer pData         = 0
        local integer pAddr         = 0
        local integer oldprotection = 0

        if pAbil > 0 then
            set pData = ReadRealMemory( pAbil ) + 0x1C4
            set pAddr = ReadRealMemory( pData )

            if pAddr > 0 then
                if pAddr == pDrawAbilityCharges or pAddr == pGameDLL + 0x20AF0 then
                    set oldprotection = ChangeOffsetProtection( pData, 0x4, 0x40 )

                    if pAddr == pDrawAbilityCharges then
                        call WriteRealMemory( pData, pCustomChargesDisplayer )
                    elseif pAddr == pGameDLL + 0x20AF0 then
                        call WriteRealMemory( pData, pCustomChargesDisplayer + 0xA0 )
                    endif

                    call ChangeOffsetProtection( pData, 0x4, oldprotection )
                else
                    call DisplayTextToPlayer( GetLocalPlayer( ), 0, 0, "Invalid Address: " + I2S( pAddr ) )
                endif
            endif
        endif
    endfunction

    function EnableCustomUnitAbilityCharges takes unit u, integer aid returns nothing
        call SaveBoolean( ChargesIndicatorData, GetHandleId( u ), aid, true )
    endfunction

    function DisableCustomUnitAbilityCharges takes unit u, integer aid returns nothing
        call SaveBoolean( ChargesIndicatorData, GetHandleId( u ), aid, false )
    endfunction

    function GetCustomUnitAbilityCharges takes unit u, integer aid returns integer
        return LoadInteger( ChargesIndicatorData, GetHandleId( u ), aid )
    endfunction

    function SetCustomUnitAbilityCharges takes unit u, integer aid, integer charges returns nothing
        if not HaveSavedBoolean( ChargesIndicatorData, GetHandleId( u ), aid ) then
            call InitCustomAbilityAddressChargesHook( GetUnitAbilityData( u, aid, 1 ) )
            call SaveBoolean( ChargesIndicatorData, GetHandleId( u ), aid, true )
        endif
        call UpdateGameUI()
        call SaveInteger( ChargesIndicatorData, GetHandleId( u ), aid, charges )
    endfunction

    function Init_MemHackCustomAbilityChargesHook takes nothing returns nothing
        if PatchVersion != "" then
            if PatchVersion == "1.26a" then
                set pDrawAbilityCharges         = pGameDLL + 0x0378A0
                set pCommonAIJumpOut            = pGameDLL + 0x2DCC40
                set pGameUIAbilityChargesBox    = pGameDLL + 0x332E10
                set pGameUIAbilityChargesCount  = pGameDLL + 0x332E40
                set pHTLoadInteger              = pGameDLL + 0x3CAA90
                set pHTLoadBoolean              = pGameDLL + 0x3CAB10
        elseif PatchVersion == "1.27a" then
                set pDrawAbilityCharges         = pGameDLL + 0x413FE0 // !(*(int (**)(void))(*a1 + 788))() && (!a3 || a4 == v4[27]) )
                set pCommonAIJumpOut            = pGameDLL + 0x88F250 // GetBuilding -> JUMPOUT
                set pGameUIAbilityChargesBox    = pGameDLL + 0x359C00 // v9, v7 + 852027, v11, a2, v9);
                set pGameUIAbilityChargesCount  = pGameDLL + 0x359C30 // under ^
                set pHTLoadInteger              = pGameDLL + 0x1F0710 // LoadInteger
                set pHTLoadBoolean              = pGameDLL + 0x1F04D0 // LoadBoolean
        elseif PatchVersion == "1.27b" then
                set pDrawAbilityCharges         = pGameDLL + 0x431720
                set pCommonAIJumpOut            = pGameDLL + 0x9BA350
                set pGameUIAbilityChargesBox    = pGameDLL + 0x3773A0
                set pGameUIAbilityChargesCount  = pGameDLL + 0x3773D0
                set pHTLoadInteger              = pGameDLL + 0x20E150
                set pHTLoadBoolean              = pGameDLL + 0x20DF10
        elseif PatchVersion == "1.28f" then
                set pDrawAbilityCharges         = pGameDLL + 0x465830
                set pCommonAIJumpOut            = pGameDLL + 0x96F2E0
                set pGameUIAbilityChargesBox    = pGameDLL + 0x3AB4B0
                set pGameUIAbilityChargesCount  = pGameDLL + 0x3AB4E0
                set pHTLoadInteger              = pGameDLL + 0x240940
                set pHTLoadBoolean              = pGameDLL + 0x240700
            endif
            
            call InitCustomChargesData( )
            call ReallocateCallMemory( pfast_call_1 )
        endif
    endfunction
endlibrary

//===========================================================================
function InitTrig_MemHackCustomAbilityChargesHook takes nothing returns nothing
    //set gg_trg_MemHackCustomAbilityChargesHook = CreateTrigger(  )
endfunction
 
Level 5
Joined
Mar 6, 2017
Messages
190
I tried using MemoryHackTestAbilityChargesHook, but it gives an error "invalid address" when a hero learns a second spell with charges as well. What is the problem? To use it, I call for InitCustomAbilityAddressChargesHook() and then for EnableCustomUnitAbilityCharges() when each of the spells is learnt. Interestingly, if I InitCustomAbilityAddressChargesHook() for one of the spells and then EnableCustomUnitAbilityCharges() for another spell, it works and gives no error, but the spell with InitCustomAbilityAddressChargesHook() has to be learnt for this to work. I heard that is your code @DracoL1ch

JASS:
library MemoryHackTestAbilityChargesHook
    globals
        integer pDrawAbilityCharges         = 0
        integer pCommonAIJumpOut            = 0
        integer pGameUIAbilityChargesBox    = 0
        integer pGameUIAbilityChargesCount  = 0
        integer pHTLoadInteger              = 0
        integer pHTLoadBoolean              = 0
        integer pUnitUpdateCommandPanel     = 0
   
        hashtable ChargesIndicatorData      = InitHashtable( )
        integer ChargesIndicatorDataHandle  = GetHandleId( ChargesIndicatorData )
        integer pCustomChargesDisplayer     = 0
    endglobals

    function InitCustomChargesData takes nothing returns nothing
        set pfast_call_1  = AllocateExecutableMemory( 64000 )
        set pfast_call_2  = pfast_call_2 + 1000
        set pCustomChargesDisplayer = pfast_call_1 + 55500

        call WriteRealMemory( pfast_call_1, 0x0 )
        call WriteRealMemory( pfast_call_2, 0x0 )

        call WriteRealMemory( pCustomChargesDisplayer +   0x0, 0x0824448B )
        call WriteRealMemory( pCustomChargesDisplayer +   0x4, 0x7C8B5756 )
        call WriteRealMemory( pCustomChargesDisplayer +   0x8, 0x57500C24 )
        call WriteRealMemory( pCustomChargesDisplayer +   0xC, 0x8DE8F18B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x10, 0x85000372 )

        call WriteRealMemory( pCustomChargesDisplayer +  0xF, pDrawAbilityCharges - ( pCustomChargesDisplayer + 0xF ) - 0x4 )

        call WriteRealMemory( pCustomChargesDisplayer +  0x14, 0x397C75FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x18, 0x777F407E )
        call WriteRealMemory( pCustomChargesDisplayer +  0x1C, 0x51605E5F )
        call WriteRealMemory( pCustomChargesDisplayer +  0x20, 0x4E8B9090 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x24, 0xCC40B830 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x28, 0xD0FF6F2D )

        call WriteRealMemory( pCustomChargesDisplayer +  0x26, pCommonAIJumpOut )

        call WriteRealMemory( pCustomChargesDisplayer +  0x2C, 0x6974C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x30, 0x8B905159 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x34, 0x3476FFD8 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x38, 0x99996850 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x3C, 0x10B89999 )

        call WriteRealMemory( pCustomChargesDisplayer +  0x3A, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer +  0x40, 0xFF6F3CAB )
        call WriteRealMemory( pCustomChargesDisplayer +  0x3F, pHTLoadBoolean )

        call WriteRealMemory( pCustomChargesDisplayer +  0x44, 0x0CC483D0 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x48, 0x4C74C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x4C, 0x90905990 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x50, 0x828B168B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x54, 0x00000308 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x58, 0x53347E8B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x5C, 0xD0FFCE8B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x60, 0x533476FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x64, 0x99999968 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x68, 0xB8D88B99 )
       
        call WriteRealMemory( pCustomChargesDisplayer +  0x65, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer +  0x6C, pHTLoadInteger )

        call WriteRealMemory( pCustomChargesDisplayer +  0x70, 0xC483D0FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x74, 0x51C88B0C )
        call WriteRealMemory( pCustomChargesDisplayer +  0x78, 0xCF8BD38B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x7C, 0x332E10B8 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x80, 0x6AD0FF6F )
       
        call WriteRealMemory( pCustomChargesDisplayer +  0x7D, pGameUIAbilityChargesBox )

        call WriteRealMemory( pCustomChargesDisplayer +  0x84, 0x8BD38B01 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x88, 0x2E40B8CF )
        call WriteRealMemory( pCustomChargesDisplayer +  0x8C, 0xD0FF6F33 )
       
        call WriteRealMemory( pCustomChargesDisplayer +  0x8A, pGameUIAbilityChargesCount )

        call WriteRealMemory( pCustomChargesDisplayer +  0x90, 0x5F07EB5B )
        call WriteRealMemory( pCustomChargesDisplayer +  0x94, 0x0008C25E )
        call WriteRealMemory( pCustomChargesDisplayer +  0x98, 0xC2615990 )
        call WriteRealMemory( pCustomChargesDisplayer +  0x9C, 0x90900008 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xA0, 0x0824448B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xA4, 0x7C8B5756 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xA8, 0x57500C24 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xAC, 0x8390F18B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xB0, 0x859008C4 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xB4, 0x397C75FF )
        call WriteRealMemory( pCustomChargesDisplayer +  0xB8, 0x777F407E )
        call WriteRealMemory( pCustomChargesDisplayer +  0xBC, 0x51605E5F )
        call WriteRealMemory( pCustomChargesDisplayer +  0xC0, 0x4E8B9090 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xC4, 0xCC40B830 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xC8, 0xD0FF6F2D )
       
        call WriteRealMemory( pCustomChargesDisplayer +  0xC6, pCommonAIJumpOut )

        call WriteRealMemory( pCustomChargesDisplayer +  0xCC, 0x6974C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xD0, 0x8B905159 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xD4, 0x3476FFD8 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xD8, 0x99996850 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xDC, 0x10B89999 )

        call WriteRealMemory( pCustomChargesDisplayer +  0xDA, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer +  0xE0, 0xFF6F3CAB )

        call WriteRealMemory( pCustomChargesDisplayer +  0xDF, pHTLoadBoolean )

        call WriteRealMemory( pCustomChargesDisplayer +  0xE4, 0x0CC483D0 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xE8, 0x4C74C085 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xEC, 0x90905990 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xF0, 0x828B168B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xF4, 0x00000308 )
        call WriteRealMemory( pCustomChargesDisplayer +  0xF8, 0x53347E8B )
        call WriteRealMemory( pCustomChargesDisplayer +  0xFC, 0xD0FFCE8B )
        call WriteRealMemory( pCustomChargesDisplayer + 0x100, 0x533476FF )
        call WriteRealMemory( pCustomChargesDisplayer + 0x104, 0x99999968 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x108, 0xB8D88B99 )

        call WriteRealMemory( pCustomChargesDisplayer + 0x105, ChargesIndicatorDataHandle )

        call WriteRealMemory( pCustomChargesDisplayer + 0x10C, pHTLoadInteger )

        call WriteRealMemory( pCustomChargesDisplayer + 0x110, 0xC483D0FF )
        call WriteRealMemory( pCustomChargesDisplayer + 0x114, 0x51C88B0C )
        call WriteRealMemory( pCustomChargesDisplayer + 0x118, 0xCF8BD38B )
        call WriteRealMemory( pCustomChargesDisplayer + 0x11C, 0x332E10B8 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x120, 0x6AD0FF6F )

        call WriteRealMemory( pCustomChargesDisplayer + 0x11D, pGameUIAbilityChargesBox )

        call WriteRealMemory( pCustomChargesDisplayer + 0x124, 0x8BD38B01 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x128, 0x2E40B8CF )
        call WriteRealMemory( pCustomChargesDisplayer + 0x12C, 0xD0FF6F33 )

        call WriteRealMemory( pCustomChargesDisplayer + 0x12A, pGameUIAbilityChargesCount )

        call WriteRealMemory( pCustomChargesDisplayer + 0x130, 0x5F07EB5B )
        call WriteRealMemory( pCustomChargesDisplayer + 0x134, 0x0008C25E )
        call WriteRealMemory( pCustomChargesDisplayer + 0x138, 0xC2615990 )
        call WriteRealMemory( pCustomChargesDisplayer + 0x13C, 0x90900008 )
    endfunction

    function InitCustomAbilityAddressChargesHook takes integer pAbil returns nothing
        local integer pData         = 0
        local integer pAddr         = 0
        local integer oldprotection = 0

        if pAbil > 0 then
            set pData = ReadRealMemory( pAbil ) + 0x1C4
            set pAddr = ReadRealMemory( pData )

            if pAddr > 0 then
                if pAddr == pDrawAbilityCharges or pAddr == pGameDLL + 0x20AF0 then
                    set oldprotection = ChangeOffsetProtection( pData, 0x4, 0x40 )

                    if pAddr == pDrawAbilityCharges then
                        call WriteRealMemory( pData, pCustomChargesDisplayer )
                    elseif pAddr == pGameDLL + 0x20AF0 then
                        call WriteRealMemory( pData, pCustomChargesDisplayer + 0xA0 )
                    endif

                    call ChangeOffsetProtection( pData, 0x4, oldprotection )
                else
                    call DisplayTextToPlayer( GetLocalPlayer( ), 0, 0, "Invalid Address: " + I2S( pAddr ) )
                endif
            endif
        endif
    endfunction

    function EnableCustomUnitAbilityCharges takes unit u, integer aid returns nothing
        call SaveBoolean( ChargesIndicatorData, GetHandleId( u ), aid, true )
    endfunction

    function DisableCustomUnitAbilityCharges takes unit u, integer aid returns nothing
        call SaveBoolean( ChargesIndicatorData, GetHandleId( u ), aid, false )
    endfunction

    function GetCustomUnitAbilityCharges takes unit u, integer aid returns integer
        return LoadInteger( ChargesIndicatorData, GetHandleId( u ), aid )
    endfunction

    function SetCustomUnitAbilityCharges takes unit u, integer aid, integer charges returns nothing
        if not HaveSavedBoolean( ChargesIndicatorData, GetHandleId( u ), aid ) then
            call InitCustomAbilityAddressChargesHook( GetUnitAbilityData( u, aid, 1 ) )
            call SaveBoolean( ChargesIndicatorData, GetHandleId( u ), aid, true )
        endif
        call UpdateGameUI()
        call SaveInteger( ChargesIndicatorData, GetHandleId( u ), aid, charges )
    endfunction

    function Init_MemHackCustomAbilityChargesHook takes nothing returns nothing
        if PatchVersion != "" then
            if PatchVersion == "1.26a" then
                set pDrawAbilityCharges         = pGameDLL + 0x0378A0
                set pCommonAIJumpOut            = pGameDLL + 0x2DCC40
                set pGameUIAbilityChargesBox    = pGameDLL + 0x332E10
                set pGameUIAbilityChargesCount  = pGameDLL + 0x332E40
                set pHTLoadInteger              = pGameDLL + 0x3CAA90
                set pHTLoadBoolean              = pGameDLL + 0x3CAB10
        elseif PatchVersion == "1.27a" then
                set pDrawAbilityCharges         = pGameDLL + 0x413FE0 // !(*(int (**)(void))(*a1 + 788))() && (!a3 || a4 == v4[27]) )
                set pCommonAIJumpOut            = pGameDLL + 0x88F250 // GetBuilding -> JUMPOUT
                set pGameUIAbilityChargesBox    = pGameDLL + 0x359C00 // v9, v7 + 852027, v11, a2, v9);
                set pGameUIAbilityChargesCount  = pGameDLL + 0x359C30 // under ^
                set pHTLoadInteger              = pGameDLL + 0x1F0710 // LoadInteger
                set pHTLoadBoolean              = pGameDLL + 0x1F04D0 // LoadBoolean
        elseif PatchVersion == "1.27b" then
                set pDrawAbilityCharges         = pGameDLL + 0x431720
                set pCommonAIJumpOut            = pGameDLL + 0x9BA350
                set pGameUIAbilityChargesBox    = pGameDLL + 0x3773A0
                set pGameUIAbilityChargesCount  = pGameDLL + 0x3773D0
                set pHTLoadInteger              = pGameDLL + 0x20E150
                set pHTLoadBoolean              = pGameDLL + 0x20DF10
        elseif PatchVersion == "1.28f" then
                set pDrawAbilityCharges         = pGameDLL + 0x465830
                set pCommonAIJumpOut            = pGameDLL + 0x96F2E0
                set pGameUIAbilityChargesBox    = pGameDLL + 0x3AB4B0
                set pGameUIAbilityChargesCount  = pGameDLL + 0x3AB4E0
                set pHTLoadInteger              = pGameDLL + 0x240940
                set pHTLoadBoolean              = pGameDLL + 0x240700
            endif
           
            call InitCustomChargesData( )
            call ReallocateCallMemory( pfast_call_1 )
        endif
    endfunction
endlibrary

//===========================================================================
function InitTrig_MemHackCustomAbilityChargesHook takes nothing returns nothing
    //set gg_trg_MemHackCustomAbilityChargesHook = CreateTrigger(  )
endfunction
where did you get this from?
 
Top