View previous topic :: View next topic |
Author |
Message |
redleouf Advanced Cheater
Reputation: 0
Joined: 13 Feb 2013 Posts: 76
|
Posted: Fri Feb 15, 2013 2:42 pm Post subject: [Auto-Assembler] Auto refill my ammo |
|
|
Hello !
I am just starting with auto-assembler and I am getting stuck on a problem
I am doing a cheat table for the new game "Aliens Colonial Marines", and I am currently working on ammo script. (we are talking about the general ammo here, not the "in magazine" ammo)
The script make that the ammo wont decrease anymore while reloading, and that part work fine. But what I want to add in it, is that when the script start (ticking the box) the ammo goes "999" (so I will be able to have ammo and reload even if I have 0 before starting the script). I just can't figure how to do that, I have succeded to put the ammo to 999 when I refresh the ammo counter (reloading or picking up ammo). But getting 999 without having to refresh the ammo counter seems just impossible
Can anyone help me out here please ? ^^
Here is my current script :
Quote: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
nop
nop
originalcode:
mov esp,ebp
pop ebp
exit:
jmp returnhere
"ACM.exe"+BCBB8:
jmp newmem
returnhere:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"ACM.exe"+BCBB8:
mov [ecx],eax
mov esp,ebp
pop ebp
//Alt: db 90 90 8B E5 5D |
|
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 15, 2013 2:59 pm Post subject: |
|
|
You have a couple of options. The easiest would be to just create a cheat that makes your ammo 999. Set the same hotkey for it as you do the script. |
|
Back to top |
|
 |
redleouf Advanced Cheater
Reputation: 0
Joined: 13 Feb 2013 Posts: 76
|
Posted: Fri Feb 15, 2013 4:05 pm Post subject: |
|
|
Yeah, I thought of that, but that dont fix my problem
I still dont know how to do a script that will refill my ammo without having to refresh the counter
Thank you for your answer anyway ^^ |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 15, 2013 4:47 pm Post subject: |
|
|
Maybe I am misunderstanding you. You want your script to disable any adding/subtracting of your ammo...and you also want your ammo to read 999? Magazine ammo, not extra clip ammo, correct?
Or...
You have everything working correctly, but in order for your ammo to actually read 999, you have to get more ammo/reload? If so, does firing your weapon toggle the ammo to 999?
Maybe if I understand you better, I can help. |
|
Back to top |
|
 |
redleouf Advanced Cheater
Reputation: 0
Joined: 13 Feb 2013 Posts: 76
|
Posted: Fri Feb 15, 2013 5:21 pm Post subject: |
|
|
Ahw, yeah sorry, english is not my native language...
Quote: | You have everything working correctly, but in order for your ammo to actually read 999, you have to get more ammo/reload? |
Exactly that !
I am talking about the ammo that you got in reserve, like when you have to reload. (e.g 32/250 here it will be the 250, not the 32 from the mag in the weapon)
Quote: | If so, does firing your weapon toggle the ammo to 999? |
Nope, I must reload or pick up ammo  |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 15, 2013 5:46 pm Post subject: |
|
|
Which version are you running?
I am curious...why are you concerned with the clip ammo? Why not set the magazine ammo to never change and you won't even have to reload or ever rely on clip ammo? |
|
Back to top |
|
 |
redleouf Advanced Cheater
Reputation: 0
Joined: 13 Feb 2013 Posts: 76
|
Posted: Fri Feb 15, 2013 6:45 pm Post subject: |
|
|
Running the 1.0.55.708706 according to the .exe
Well, I am planning to make a trainer (mostly to train my self and learn ^^) and there will be a "No-Reload" option (that is already made btw)
But the reason I want to add 999 ammo like that, is for refill the weapon that dont have any ammo from start. So no need to pick up ammo to start getting infinite one. It could be annoying to search for ammo just to be able to use the infinite ammo option, especially if it is rare ammo.
For exemple : I have 0/0 ammo on my shotgun, and I want to use the "Infinite Ammo" option of my trainer. The problem is, I can't, because in order to get infinite ammo from the trainer, I need at least one bullet who is already in my ammo bag (like that 0/1) But if I have 0 ammo in my ammo bag at start, I am f*cked and the ammo script won't work.
That's why I want to add automatic 999 ammo in the ammo bag right when the script start (without having to refresh the ammo counter by reloading or picking up other ammo)  |
|
Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 891
|
Posted: Fri Feb 15, 2013 8:25 pm Post subject: Re: [Auto-Assembler] Auto refill my ammo |
|
|
redleouf wrote: | Hello !
and that part work fine. But what I want to add in it, is that when the script start (ticking the box) the ammo goes "999" (so I will be able to have ammo and reload even if I have 0 before starting the script). |
I don't have the game, so I can't give you detailed examples. However, there are a few things you can try. For instance, does the game allow you to equip and "dry fire" a gun that's empty? You know, make a clicking sound or whatever? If it does, and assuming your existing cheat triggers on a gun being fired (I don't believe you said), then it may be as easy as loading eax w/ #999 instead of nopping it out.
You may also want to visually inspect the memory in the area of the ammo addresses you've already found. If they are four-byte decimals, then setup your data viewer in the memory window for that data type and look around. Games often store that stuff in contiguous regions. You may be able to set everything to 999 before you even have the weapons.
Otherwise, you probably wanna' trace what accesses one of the ammo types you have found upon switching weapons. Once you find the bit of code that sets up the ammo for a newly equipped weapon, you can set it to always set the ammo to 999. It's pretty straightforward if you already know how to find the ammo in memory. |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Fri Feb 15, 2013 11:52 pm Post subject: |
|
|
redleouf,
It does not matter if you have ammo or not. The reason hacking the magazine ammo is better, is because you will never have to reload your weapon. Even if you find a shotgun, the ammo will already be in it if you set it that way. You can choose to have 999 rounds in your reserve clips, or you can choose to have them already in your gun. Each weapon has a maximum amount of rounds that it can hold in the magazine and in the reserve clips...there's really no reason to set it to 999 (FYI).
The script that you are using prohibits the game from making any changes to the clip ammo (regardless of weapon, probably). You have to create a separate code to set and freeze the clip ammo value for each weapon in the game. This game uses two different addresses for clip ammo (for each gun) - one for the visual representation, and one for the actual ammo. You need to change them both and freeze them in order to get the best results. Changing them both and freezing them will allow you to see the results immediately.
Since your script is working correctly, now you have to find the values for the visual and actual representation of the clip ammo - for each gun. Set the same hotkey for the script that you do for changing and freezing the clip ammo. This will solve your problem.
I still say that you are best to focus on the magazine ammo. Once you create a proper cheat for the magazine ammo, the clip ammo will become moot. Besides, who wants to wait for their gun to reload if they don't have to? |
|
Back to top |
|
 |
redleouf Advanced Cheater
Reputation: 0
Joined: 13 Feb 2013 Posts: 76
|
Posted: Sat Feb 16, 2013 9:55 am Post subject: |
|
|
Quote: | does the game allow you to equip and "dry fire" a gun that's empty? You know, make a clicking sound or whatever? If it does, and assuming your existing cheat triggers on a gun being fired (I don't believe you said), then it may be as easy as loading eax w/ #999 instead of nopping it out. |
I can equip the weapon but I can't dry fire, it only switch to an other weapon who have ammo.
Quote: | Otherwise, you probably wanna' trace what accesses one of the ammo types you have found upon switching weapons. Once you find the bit of code that sets up the ammo for a newly equipped weapon, you can set it to always set the ammo to 999. It's pretty straightforward if you already know how to find the ammo in memory. |
Tried that, it is working, but only for the visual representation, the real ammo are stored in different address for each weapons.
Quote: | Since your script is working correctly, now you have to find the values for the visual and actual representation of the clip ammo - for each gun. Set the same hotkey for the script that you do for changing and freezing the clip ammo. This will solve your problem. |
That's what I was trying to avoid
And I prefer make two different option for "No Reload" and "Infinite Ammo", some peoples don't really enjoy No Reload ^^
I've found someone else (l0wb1t), who made a script for unlimited ammo and it is working fine for all weapons. I am going to ask him about it.
Thank you a lot to both of you for taking the time to help me, I am still going to check that thread in case you have any other idea/solution  |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sat Feb 16, 2013 1:21 pm Post subject: |
|
|
Look, you can make a script for both, clip ammo and magazine ammo - I did not say that you couldn't. However, in order to get the ammo to show 999 on your screen, instantaneously, you are going to have to create a separate cheat (FOR EACH WEAPON) that will do that. You can still do that with a script, but you really don't have to. There is no reason to do that part with a script because it takes longer. |
|
Back to top |
|
 |
Smanettone83 Expert Cheater
Reputation: 3
Joined: 21 Feb 2011 Posts: 146 Location: Italia
|
Posted: Sat Feb 16, 2013 1:55 pm Post subject: |
|
|
GNIREENIGNE wrote: | Look, you can make a script for both, clip ammo and magazine ammo - I did not say that you couldn't. However, in order to get the ammo to show 999 on your screen, instantaneously, you are going to have to create a separate cheat (FOR EACH WEAPON) that will do that. You can still do that with a script, but you really don't have to. There is no reason to do that part with a script because it takes longer. |
it's very simple. when you use the debugger to read what code access to the ammo address, you have to use the routine codes.... generally it's the first codes.... when you use autoassemble script you need only to add you code below the originalcode else the game crash. so you can recharge your ammo also if it's on 0 =) _________________
|
|
Back to top |
|
 |
l0wb1t Grandmaster Cheater
Reputation: 27
Joined: 29 Sep 2010 Posts: 617 Location: Germany - C:\windows\system32
|
Posted: Sat Feb 16, 2013 1:57 pm Post subject: |
|
|
Im sure u using a wrong code. And also did it on a wrong way.
The Ammo is handled by 2 Offsets.
2DC & 2B4
And you used a non instantly calling Opcode.(find out what writes to this adress)
You have to use "Find out what access to this adress" on the ammo adress.
go to this Adress:
"ACM.exe"+95B799 right click on it and then you will see you ammo Values PopUp in the Window.
Code: | [ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem:
mov dword ptr [esi+000002DC],#9999
mov dword ptr [esi+000002B4],#9999
originalcode:
mov eax,[esi+000002DC]
exit:
jmp returnhere
"ACM.exe"+95B799:
jmp newmem
nop
returnhere:
[DISABLE]
dealloc(newmem)
"ACM.exe"+95B799:
mov eax,[esi+000002DC]
|
This gives you Instantly 9999 Ammo. _________________
|
|
Back to top |
|
 |
redleouf Advanced Cheater
Reputation: 0
Joined: 13 Feb 2013 Posts: 76
|
Posted: Sat Feb 16, 2013 3:48 pm Post subject: |
|
|
Quote: | And you used a non instantly calling Opcode.(find out what writes to this adress)
You have to use "Find out what access to this adress" on the ammo adress |
Wow, my mistake was there from the begining
I feel dumb, but at least I've learned something
It is working fine now, thanks a lot to all of you for your time and help !
I Hope to see you around  |
|
Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sat Feb 16, 2013 3:49 pm Post subject: |
|
|
Smanettone83 wrote: | it's very simple. when you use the debugger to read what code access to the ammo address, you have to use the routine codes.... generally it's the first codes.... when you use autoassemble script you need only to add you code below the originalcode else the game crash. so you can recharge your ammo also if it's on 0 =) | I don't see the purpose of this post. I like your avatar, by the way. |
|
Back to top |
|
 |
|