[1.13c] Infinite arrows / bolts / throwing weapons / tomes / keys

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
mrnorris
Posts: 10
Joined: Wed Jul 05, 2017 2:11 pm

[1.13c] Infinite arrows / bolts / throwing weapons / tomes / keys

Post by mrnorris » Sat Aug 04, 2018 5:49 am

The following code edit makes arrows, bolts and throwing weapons not decrease in quantity when used.

Code: Select all

D2Game.A16BE

6FCC16BE  |. 4D             DEC EBP                      ;NOP this line
6FCC16BF  |. 79 0A          JNS SHORT D2Game.6FCC16CB
6FCC16C1  |. C74424 04 0100>MOV DWORD PTR SS:[ESP+4],1
6FCC16C9  |. 33ED           XOR EBP,EBP
6FCC16CB  |> 53             PUSH EBX
6FCC16CC  |. 57             PUSH EDI
6FCC16CD  |. 6A 00          PUSH 0
6FCC16CF  |. 55             PUSH EBP
6FCC16D0  |. 6A 46          PUSH 46
6FCC16D2  |. 56             PUSH ESI
6FCC16D3  |. E8 9A8DF6FF    CALL <JMP.&D2Common.#10887>

change to

6FCC16BE     90             NOP
6FCC16BF  |. 79 0A          JNS SHORT D2Game.6FCC16CB
6FCC16C1  |. C74424 04 0100>MOV DWORD PTR SS:[ESP+4],1
6FCC16C9  |. 33ED           XOR EBP,EBP
6FCC16CB  |> 53             PUSH EBX
6FCC16CC  |. 57             PUSH EDI
6FCC16CD  |. 6A 00          PUSH 0
6FCC16CF  |. 55             PUSH EBP
6FCC16D0  |. 6A 46          PUSH 46
6FCC16D2  |. 56             PUSH ESI
6FCC16D3  |. E8 9A8DF6FF    CALL <JMP.&D2Common.#10887>
There's also a small chance when melee attacking with a throwing weapon that its quantity is reduced. If you want to stop that, also apply this:

Code: Select all

D2Game.13033

6FC33028  |. 83FD 01        CMP EBP,1
6FC3302B  |. 6A 00          PUSH 0
6FC3302D  |. 0F8E 81000000  JLE D2Game.6FC330B4
6FC33033  |. 4D             DEC EBP                       ; NOP this line
6FC33034  |. 55             PUSH EBP
6FC33035  |. 6A 46          PUSH 46
6FC33037  |. 56             PUSH ESI
6FC33038  |. E8 3574FFFF    CALL <JMP.&D2Common.#10887>

change to:

6FC3302B  |. 6A 00          PUSH 0
6FC3302D  |. 0F8E 81000000  JLE D2Game.6FC330B4
6FC33033     90             NOP
6FC33034  |. 55             PUSH EBP
6FC33035  |. 6A 46          PUSH 46
6FC33037  |. 56             PUSH ESI
6FC33038  |. E8 3574FFFF    CALL <JMP.&D2Common.#10887>
The following code edit makes tomes and keys not decrease in quantity when used.

Code: Select all

D2Game.DA280 (tome of identify)

6FCFA280  |. 6A FF          PUSH -1     ; change to PUSH 0

D2Game.D9D22 (tome of town portal)

6FCF9D22  |. 6A FF          PUSH -1     ; change to PUSH 0

D2Game.D41D4 (keys)

6FCF41D4  |. 6A FF          PUSH -1     ; change to PUSH 0
If you made all those quantities infinite you may want to remove the quantity display of items in the description:

Code: Select all

D2Client.8D8DD

6FB3D8DD  |. 8BCE           MOV ECX,ESI
6FB3D8DF  |. FF15 B8EAB76F  CALL DWORD PTR DS:[<&D2Lang.?strcpy@Unic>

change to:

6FB3D8DD  |. EB 06          JMP SHORT D2Client.6FB3D8E5
6FB3D8DF  |  90             NOP
6FB3D8E0  |  90             DB 90
6FB3D8E1  |. 90909090       DD 90909090

Code: Select all

D2Client.8D91E

6FB3D91E  |. FFD7           CALL EDI                          ; NOP this
6FB3D920  |. 8D5424 18      LEA EDX,DWORD PTR SS:[ESP+18]
6FB3D924  |. 8BCE           MOV ECX,ESI
6FB3D926  |. FFD7           CALL EDI                          ; NOP this
6FB3D928  |. 8BD3           MOV EDX,EBX
6FB3D92A  |. 8BCE           MOV ECX,ESI
6FB3D92C  |. FFD7           CALL EDI                          ; NOP this

Code: Select all

D2Client.9270D

6FB4270D  |. FFD3           CALL EBX                      ; NOP this
6FB4270F  |. 8BD7           MOV EDX,EDI
6FB42711  |. 8BCE           MOV ECX,ESI
6FB42713  |. FFD3           CALL EBX                      ; NOP this
6FB42715  |. B9 9E080000    MOV ECX,89E
6FB4271A  |. E8 CDAAF7FF    CALL <JMP.&D2Lang.#10003>
6FB4271F  |. 8BD0           MOV EDX,EAX
6FB42721  |. 8BCE           MOV ECX,ESI
6FB42723  |. FFD3           CALL EBX                      ; NOP this
6FB42725  |. 8BD7           MOV EDX,EDI
6FB42727  |. 8BCE           MOV ECX,ESI
6FB42729  |. FFD3           CALL EBX                      ; NOP this
To remove the quantity display in the right/left click throwing skill icon:

Code: Select all

D2Client.3E745

6FAEE745  |. 6A 00          PUSH 0
6FAEE747  |. 6A 46          PUSH 46
6FAEE749  |. 56             PUSH ESI
6FAEE74A  |. E8 77DAFCFF    CALL <JMP.&D2Common.#10973>

change to:

6FAEE745  |. 31C0           XOR EAX,EAX
6FAEE747  |. 90             NOP
6FAEE748  |. 90             NOP
6FAEE749  |. 90             NOP
6FAEE74A  |. 90             NOP
6FAEE74B  |. 90             NOP
6FAEE74C  |. 90             NOP
6FAEE74D  |. 90             NOP
6FAEE74E  |. 90             NOP
Last edited by mrnorris on Thu Aug 09, 2018 1:35 am, edited 7 times in total.

jessedazebra
Junior Member
Paladin
Posts: 144
Joined: Sun Nov 11, 2012 9:46 am
Zimbabwe

Re: [1.13c] Infinite arrows / bolts / throwing weapons

Post by jessedazebra » Sat Aug 04, 2018 6:34 am

Wow! That's a really good find. I've always wanted to make infinite arrows/bolts, thanks.

mrnorris
Posts: 10
Joined: Wed Jul 05, 2017 2:11 pm

Re: [1.13c] Infinite arrows / bolts / throwing weapons

Post by mrnorris » Sat Aug 04, 2018 7:50 am

Hey, no problem. Btw, I just edited the main post including a code edit to remove the quantity display. Hope nothing got messed up but it seems to work well.

jessedazebra
Junior Member
Paladin
Posts: 144
Joined: Sun Nov 11, 2012 9:46 am
Zimbabwe

Re: [1.13c] Infinite arrows / bolts / throwing weapons

Post by jessedazebra » Sat Aug 04, 2018 8:53 am

I was just thinking about removing the quantity string through itemstatcost.txt and then I realized it's hardcoded :D
So, thanks again for the code, seems like it works just fine!
Image

User avatar
csguak
Posts: 61
Joined: Fri Jul 06, 2012 7:15 am
Location: USA

Re: [1.13c] Infinite arrows / bolts / throwing weapons / tomes / keys

Post by csguak » Thu Sep 20, 2018 5:40 am

Hello, thank you for sharing this beautiful find. :D

However, I ran into one small problem.
When I assign the town portal skill, the skill counter keep decreasing when I use, even though the scroll number of the book in the inventory remains constant.
I am not sure what is going on??

mrnorris
Posts: 10
Joined: Wed Jul 05, 2017 2:11 pm

Re: [1.13c] Infinite arrows / bolts / throwing weapons / tomes / keys

Post by mrnorris » Fri Oct 05, 2018 5:35 am

Hi csguak and sorry about the delay.

I just tested the right-click skill icon display and it's indeed decreasing. I forgot to consider this.

I'll try to find a workaround if I have some time.

hellfreezer
Posts: 32
Joined: Thu Jan 31, 2019 6:57 am

Re: [1.13c] Infinite arrows / bolts / throwing weapons / tomes / keys

Post by hellfreezer » Sat Feb 23, 2019 11:19 pm

Hey guys, I know this is pretty old but I am hoping someone can help me. All of the code edits worked for me except for the keys and for the quantity to not go down when using a throwing weapon as melee, is something missing?

User avatar
kain_abel_666
Posts: 68
Joined: Fri Apr 03, 2020 12:13 pm
Location: Canada
Canada

Re: [1.13c] Infinite arrows / bolts / throwing weapons / tomes / keys

Post by kain_abel_666 » Sun Aug 09, 2020 12:39 am

Has anyone located these in 1.10f?
I've stayed quite a while and heard what you have to say. Now it is time for the real Kain to emerge.

User avatar
karlock
Posts: 42
Joined: Mon Mar 16, 2015 1:16 pm

Re: [1.13c] Infinite arrows / bolts / throwing weapons / tomes / keys

Post by karlock » Wed Dec 22, 2021 9:06 am

For 1.10 infinite arrows

Code: Select all

0x6FD11340 d2game.dll
unknown.png
unknown.png (11.5 KiB) Viewed 1225 times
NOP "4F"

Post Reply

Return to “Code Editing”