To achieve this, you have to follow these steps:
In D2Win.dll
Code: Select all
6F8AA83A 6A 10 PUSH 10 <-- nop
6F8AA83C 6A 10 PUSH 10 <-- nop
6F8AA83E 6A 60 PUSH 60 <--- nop
6F8AA840 E8 3B420000 CALL #10034 <-- leave as it is
Code: Select all
6F8AA83A E9 97EA0000 JMP 6F8B92D6 <-- jump to ur custom code
6F8AA83F 90 NOP <-- don't touch
6F8AA840 E8 3B420000 CALL #10034 <-- standard leftover, don't touch
Then go to a custom space in your dll and fill it with the following lines (if your D2Win is untouched - I mean, if you never added custom stuffs in empty space, feel free to use my addresses):
Code: Select all
________________ Custom Code in free space____________________________
Address Hex dump Command Comments
6F8B92D6 83F9 50 CMP ECX,50 ; check if life > 80%
6F8B92D9 7F 0C JG SHORT 6F8B92E7 ->> jump to green
6F8B92DB 83F9 28 CMP ECX,28 ; check if life > 40%
6F8B92DE 7F 12 JG SHORT 6F8B92F2 ->> jump to yellow tint
6F8B92E0 83F9 01 CMP ECX,1 ; check if life > 1%
6F8B92E3 EB 18 JMP SHORT 6F8B92FD ->> jump to red tint
6F8B92E5 90 NOP
6F8B92E6 90 NOP
6F8B92E7 6A 10 PUSH 10 *
6F8B92E9 6A 60 PUSH 60 * Green tint
6F8B92EB 6A 10 PUSH 10 *
6F8B92ED E9 4E15FFFF JMP 6F8AA840 -> return to the standard code
6F8B92F2 6A 10 PUSH 10 *
6F8B92F4 6A 60 PUSH 60 * Yellow tint
6F8B92F6 6A 60 PUSH 60 *
6F8B92F8 E9 4315FFFF JMP 6F8AA840 -> return to the standard code
6F8B92FD 6A 10 PUSH 10 *
6F8B92FF 6A 10 PUSH 10 * Red tint
6F8B9301 6A 60 PUSH 60 *
6F8B9303 E9 3815FFFF JMP 6F8AA840 -> return to the standard code
6F8B9308 90 NOP
This video shows this modification at work
P.S: the health bar in the video shows a slightly different code (which I adjusted before posting). Also, keep in mind that this edit does NOT alter your health bar transparency. Mine is altered since I changed another part of code =)
Enjoy!