View previous topic :: View next topic |
Author |
Message |
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Sat Oct 19, 2019 2:04 pm Post subject: Hitler, could you please help me?? |
|
|
I've been recently trying to make scripts for AC Rogue which is giving me a hard time doing it. I've been able to find two things only-health and clip ammo of pistols.
I can freeze the value with or without script(no problem) but both pistols have individual values of one bullet each and a single opcode modifying them.
So my problem starts here if I freeze the ammo value by any method then the character will not use both the pistols and will only fire from one which kinda glitches the animation so what I wanna do is that the character should shoot both the pistols i.e both bullets value go to 0 then somehow set them to 1 automatically which is kinda like the auto reload but i have tried doing this in ways i know to no success.
Here's the script code which just freezes the value
Code: |
[ENABLE]
aobscanmodule(ammo,ACC.exe,89 70 10 48 8B 74 24 40)
alloc(newmem,$1000,"ACC.exe"+1724E87)
label(code)
label(return)
label(reload)
newmem:
cmp [rax+10],1
jne reload
jmp code
code:
mov [rax+10],1
mov rsi,[rsp+40]
jmp return
reload:
mov esi,1
mov [rax+10],esi
mov rsi,[rsp+40]
jmp return
ammo:
jmp newmem
nop
nop
nop
return:
registersymbol(ammo)
[DISABLE]
ammo:
db 89 70 10 48 8B 74 24 40
unregistersymbol(ammo)
dealloc(newmem)
|
While trying, I distinguished between the two pistols-on rax+44 one pistol has a 0 and the other has value of 1 (if it helps!!)
Tell me if you need more information! I just wanna learn so any help would be very much appreciated!!!
|
|
Back to top |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3110
|
Posted: Sat Oct 19, 2019 4:48 pm Post subject: |
|
|
I suppose there's a check somewhere that checks/looks for the next loaded weapon when the first one is fired.
Because the first one does not seem fired (since you froze the ammo), the second one, which is supposed to be next at this point, is in fact, will still be considered as the second.
Makes sense?
You could either look at this check/search or, you could start a thread which acts like a timer that resets the address from 0 to 1 after a few seconds (actual delay would depend on the fire rate, of course).
|
|
Back to top |
|
|
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Sun Oct 20, 2019 1:49 am Post subject: |
|
|
Yes it does make sense but that was the very first script I made,
then I did a compare with the info I collected i.e on rax+44 one have value of 1 and the other has 0, so what I did is
Code: |
newmem:
cmp [rax+44],0 //first pistol has value 0 on this offset
je code
jmp noreload
code:
cmp [rax+10],0 //check if it has been shot
je noreload //if it has been shot then jump to my custom code
mov [rax+10],esi
//other opcode
jmp return
noreload:
cmp [rax+44],1 //if the pistol is not the first one then
jne code //jump to code
mov [rax+10],1 //otherwise move 1 into it
//some other opcode
jmp return
|
According to me this "should" work but as you pointed out the logic, which seems correct cause I think the 2nd pistol switches to be 1st when the 1st one has been shot.
So If this is the case then I think 'create thread' would be a good option with injection copies script like see if they both are 0 then move 1 into them.
If yes then, Can I use createthread in the same script because I tried which doesnt give any error but also I cant enable the script then.
|
|
Back to top |
|
|
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Mon Oct 21, 2019 5:24 am Post subject: |
|
|
Atleast tell me if I can use createthread in that same script or createthread need to be in standalone script??
_________________
TH3 UND3N14BL3 |
|
Back to top |
|
|
Blood Dragon Kush How do I cheat? Reputation: 0
Joined: 25 Oct 2019 Posts: 2
|
Posted: Fri Oct 25, 2019 1:39 pm Post subject: |
|
|
I am not a staff here I was just asking because I am too lost
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8517 Location: 127.0.0.1
|
Posted: Fri Oct 25, 2019 5:06 pm Post subject: |
|
|
Blood Dragon Kush wrote: | I am not a staff here I was just asking because I am too lost |
You were not being asked specifically, you can ignore the topic. See here for more info as to why your name is in the title:
https://forum.cheatengine.org/viewtopic.php?t=473706
_________________
- Retired. |
|
Back to top |
|
|
DanyDollaro Master Cheater Reputation: 3
Joined: 01 Aug 2019 Posts: 334
|
Posted: Tue Nov 05, 2019 5:22 pm Post subject: |
|
|
I don't know if I understood the situation exactly, but try something like this:
Code: | [ENABLE]
aobscanmodule(ammo,ACC.exe,89 70 10 48 8B 74 24 40)
alloc(newmem,$1000,"ACC.exe"+1724E87)
alloc(Counter, 1)
label(code_1)
label(code_0)
label(return)
newmem:
push rcx
mov rcx, [Counter]
cmp rcx, 1
pop rcx
je code_1
code_0:
inc [Counter]
mov [rax+10],1
mov rsi,[rsp+40]
jmp return
code_1:
dec [Counter]
mov [rax+10],0
mov rsi,[rsp+40]
jmp return
ammo:
jmp newmem
nop
nop
nop
return:
registersymbol(ammo)
[DISABLE]
ammo:
db 89 70 10 48 8B 74 24 40
unregistersymbol(ammo)
dealloc(newmem)
dealloc(Counter) |
|
|
Back to top |
|
|
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Sat Nov 09, 2019 10:57 am Post subject: |
|
|
DanyDollaro wrote: | I don't know if I understood the situation exactly, but try something like this: |
Firstly sorry for late reply! and many thanks for your time and effort into my problem:)
I tried your code and it makes every pistol shoot twice before reload.
Like before it shoots one then the other and now it shoots a round then another from the same pistol and then draws the second pistol and after shooting 2 rounds it reloads.
So it does work but not the way I want it to and atm I dunno how to make it work.What I did understand is that we can tamper the count it shoots before it switches to another but how to make it repeat its default function minus reloading??
_________________
TH3 UND3N14BL3 |
|
Back to top |
|
|
DanyDollaro Master Cheater Reputation: 3
Joined: 01 Aug 2019 Posts: 334
|
Posted: Sat Nov 09, 2019 12:39 pm Post subject: |
|
|
Shoot twice?? then I think the problem is in the way the function is called or some other assembly instruction you haven't posted
|
|
Back to top |
|
|
SEKTION Cheater Reputation: 0
Joined: 05 Nov 2017 Posts: 39 Location: Behind the keyboard
|
Posted: Sat Nov 09, 2019 1:07 pm Post subject: |
|
|
Okay I will try with some other instructions.
Thankss!!!
_________________
TH3 UND3N14BL3 |
|
Back to top |
|
|
cyanur How do I cheat? Reputation: 0
Joined: 14 Sep 2016 Posts: 9
|
Posted: Mon Dec 09, 2019 12:48 pm Post subject: |
|
|
for me, "unlimited ammo", simply prevent the writing of the new value. "Find out what write to this address"
|
|
Back to top |
|
|
|