Quote:
Originally Posted by DeadDrunk
bleep,
Do you lock any of the variables? ie the stock/etc? I edit the memory addresses myself and have noticed that at random times the memory address changes. I'm pretty sure your doing it by pointer, but as a programmer, changing the memory location will screw up bad sometimes. In fact thats a sign of a memory leak, since you lose all reference to the next/previous memory positions. Hell I've had my game crash because my stockhouse all of a sudden went crazy and I had like millions of items in it. It took a while to crash with the 8 gigs of ram, but it finally told me to... well i'll let you imagine. So if you changed another value and it's still trying to change the previous value, i could see bad stuff.
Anyways, was just a quick question/idea about locking values/changing memory addresses.
|
I used two pointers, one for the actual value and the other for the display. I jmp'd to an empty area(as far as I'm aware) and through the following routine wrote to both areas;
Code:
Infinite Stock
0060BCA6 jmp 008decdf
MOV EAX,DWORD PTR DS:[0A9C070] //pntr to real value
push eax
push ecx
push edx
push ebx
mov eax,[esi+18]
mov ecx,1f4
add eax,4
mov [eax+8*edi],ecx
MOV EAX,DWORD PTR DS:[0AD636C] //pntr to display
mov ebx,[eax+28]
mov ebx,[ebx+8]
add ebx,1c
mov edx,0
mov ecx,1f4
mov [ebx],ecx
add ebx,4
inc edx
cmp edx,19
jb 008dec2f
pop ebx
pop edx
pop ecx
pop eax
jmp 0060BCAB
Poke 008decdf A1 70 C0 A9 00 50 51 52 53 8B 46 18 B9 F4 01 00 00 83 C0 04 89 0C F8 A1 6C 63 AD 00 8B 58 28 8B 5B 08 83 C3 1C BA 00 00 00 00 B9 F4 01 00 00 89 0B 83 C3 04 42 83 FA 19 72 F5 5B 5A 59 58 E9 89 CF D2 FF
Poke 0060BCA6 E9 34 30 2D 00
I'd explain it in more detail but I accidently deleted the text which had the traces. The sub routine is messy but I'm a newb to the PC asm scene.
I have noticed that the game crashed without the infinite stock cheat on and a few times when no cheats were active.. I think the original version may just be buggy.