[1.09b] Classic Gambling Offsets

This forum is for discussions on how to edit what can not be edited through the txt files, needless to say this isn't about battle net hacking.

Moderators: Nefarius, Havvoric

Post Reply
FearedBliss
Posts: 75
Joined: Sat Oct 16, 2010 4:29 pm

[1.09b] Classic Gambling Offsets

Post by FearedBliss » Fri Oct 05, 2018 6:10 pm

The following change allows you to change the hardcoded 1.09b Impossible Gambling Rates for Uniques, Sets, Rares, Etc to the exact values that existed in 1.05b (or Pre Lod).

Code: Select all

1.09b Offsets: 8839D, 883AD, 883B4, 883C4

OLD CODE:

6FCB839D | BA A0 86 01 00           | MOV EDX,186A0                                                  |
6FCB83A2 | 8B F0                    | MOV ESI,EAX                                                    |
6FCB83A4 | 8B 4C 24 24              | MOV ECX,DWORD PTR SS:[ESP+24]                                  |
6FCB83A8 | E8 53 C4 03 00           | CALL <d2game.Ordinal10918>                                     |
6FCB83AD | 3D 60 67 01 00           | CMP EAX,16760                                                  |
6FCB83B2 | 7C 1F                    | JL d2game.6FCB83D3                                             |
6FCB83B4 | 3D 95 86 01 00           | CMP EAX,18695                                                  |
6FCB83B9 | 7D 07                    | JGE d2game.6FCB83C2                                            |
6FCB83BB | BB 06 00 00 00           | MOV EBX,6                                                      | ebx:Ordinal10003+74B0
6FCB83C0 | EB 11                    | JMP d2game.6FCB83D3                                            |
6FCB83C2 | 33 DB                    | XOR EBX,EBX                                                    | ebx:Ordinal10003+74B0
6FCB83C4 | 3D 9F 86 01 00           | CMP EAX,1869F                                                  |

NEW CODE:

6FCB839D | BA 10 27 00 00           | MOV EDX,2710                                                   |
6FCB83A2 | 8B F0                    | MOV ESI,EAX                                                    |
6FCB83A4 | 8B 4C 24 24              | MOV ECX,DWORD PTR SS:[ESP+24]                                  |
6FCB83A8 | E8 53 C4 03 00           | CALL <d2game.Ordinal10918>                                     |
6FCB83AD | 3D 34 21 00 00           | CMP EAX,2134                                                   |
6FCB83B2 | 7C 1F                    | JL d2game.6FCB83D3                                             |
6FCB83B4 | 3D F0 23 00 00           | CMP EAX,23F0                                                   |
6FCB83B9 | 7D 07                    | JGE d2game.6FCB83C2                                            |
6FCB83BB | BB 06 00 00 00           | MOV EBX,6                                                      | ebx:Ordinal10003+74B0
6FCB83C0 | EB 11                    | JMP d2game.6FCB83D3                                            |
6FCB83C2 | 33 DB                    | XOR EBX,EBX                                                    | ebx:Ordinal10003+74B0
6FCB83C4 | 3D E4 25 00 00           | CMP EAX,25E4                                                   |

WHAT TO DO:

Change the 1.09b gambling rates to how it was back in Classic (pre 1.07).

EXTRA:

Original 1.05b Code:

6FD232BE | EB 02                    | JMP d2game.6FD232C2                                            |
6FD232C0 | 33 C0                    | XOR EAX,EAX                                                    |
6FD232C2 | 8B 4E 04                 | MOV ECX,DWORD PTR DS:[ESI+4]                                   |
6FD232C5 | BA 10 27 00 00           | MOV EDX,2710                                                   | edx:Ordinal10000+10040
6FD232CA | BE 04 00 00 00           | MOV ESI,4                                                      |
6FD232CF | 8B 3C 81                 | MOV EDI,DWORD PTR DS:[ECX+EAX*4]                               |
6FD232D2 | 8B 4C 24 24              | MOV ECX,DWORD PTR SS:[ESP+24]                                  |
6FD232D6 | E8 27 84 02 00           | CALL <d2game.Ordinal10819>                                     |
6FD232DB | 3D 34 21 00 00           | CMP EAX,2134                                                   |
6FD232E0 | 7E 0E                    | JLE d2game.6FD232F0                                            |
6FD232E2 | 3D F0 23 00 00           | CMP EAX,23F0                                                   |
6FD232E7 | 7D 0E                    | JGE d2game.6FD232F7                                            |
6FD232E9 | BE 06 00 00 00           | MOV ESI,6                                                      |
6FD232EE | EB 21                    | JMP d2game.6FD23311                                            |
6FD232F0 | 3D F0 23 00 00           | CMP EAX,23F0                                                   |
6FD232F5 | 7C 0E                    | JL d2game.6FD23305                                             |
6FD232F7 | 3D E4 25 00 00           | CMP EAX,25E4                                                   |
6FD232FC | 7D 0E                    | JGE d2game.6FD2330C                                            |
6FD232FE | BE 05 00 00 00           | MOV ESI,5                                                      |
6FD23303 | EB 0C                    | JMP d2game.6FD23311                                            |
6FD23305 | 3D E4 25 00 00           | CMP EAX,25E4                                                   |
6FD2330A | 7C 05                    | JL d2game.6FD23311                                             |
186A0 (100,000) -> 2710 (10,000)
16760 (92,000) -> 2134 (8,500)
18695 (‭99,989‬) -> 23F0 (9,200)
1869F (‭99,999‬) -> 25E4 (9,700)

Post Reply

Return to “Code Editing”