View previous topic :: View next topic |
Author |
Message |
Unicorngoulash Newbie cheater
Reputation: 0
Joined: 19 Apr 2018 Posts: 19 Location: Netherlands
|
Posted: Fri Jan 25, 2019 5:11 am Post subject: Help creating a timer that activates code after 1500ms |
|
|
I am trying to find a way to add a timer that lets a value reach #513 and then sets it to #1 after 15000ms
Can it be done in auto assembly, and if so could someone please provide me with an example that I could try. Thank you!
Description: |
|
Filesize: |
112.23 KB |
Viewed: |
3575 Time(s) |

|
|
|
Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Fri Jan 25, 2019 7:00 am Post subject: |
|
|
Code: | pushad
push 05DC
call kernel32.Sleep
popad |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
 |
Unicorngoulash Newbie cheater
Reputation: 0
Joined: 19 Apr 2018 Posts: 19 Location: Netherlands
|
Posted: Fri Jan 25, 2019 7:31 am Post subject: |
|
|
Thank you for replying.
Where exactly should I add the line of code?
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)
newmem:
push eax
mov eax,dword ptr [ePSXe.exe+B69EA4]
cmp dword ptr [ePSXe.exe+B69EA4],#513
cmovz eax,[newvalue2]
mov dword ptr [ePSXe.exe+B69EA4],eax
pop eax
jmp return
code:
// ...
newvalue2:
dd #1
return:
originalcode:
mov [eax+ePSXe.exe+A82020],dl
exit:
jmp returnhere
"ePSXe.exe"+65260:
jmp newmem
nop
returnhere:[/list]
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4702
|
Posted: Fri Jan 25, 2019 10:05 am Post subject: |
|
|
If you're using a code injection, you shouldn't call sleep. It'll probably have other undesirable effects.
Code: | define(address,"ePSXe.exe"+65260)
define(bytes,88 90)
[ENABLE]
assert(address,bytes)
alloc(newmem,2048)
label(returnhere)
label(exit)
label(checkTime)
label(setTime)
newmem:
push eax
push ecx
push edx
cmp byte ptr[hitVal],0
jne short checkTime
cmp [val],#513
je short setTime
exit:
pop edx
pop ecx
pop eax
mov [eax+ePSXe.exe+A82020],dl
ret
checkTime:
call GetTickCount
sub eax,[oldt]
cmp eax,#14999
jbe short exit
mov byte ptr[hitVal],0
mov [val],1
jmp short exit
setTime:
mov byte ptr[hitVal],1
call GetTickCount
mov [oldt],eax
jmp short exit
newmem+400:
oldt:
dd 0
hitVal:
db 0
address:
jmp newmem
nop
returnhere:
[DISABLE]
address:
mov [eax+ePSXe.exe+A82020],dl
dealloc(newmem) |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
Unicorngoulash Newbie cheater
Reputation: 0
Joined: 19 Apr 2018 Posts: 19 Location: Netherlands
|
Posted: Fri Jan 25, 2019 11:30 am Post subject: |
|
|
Thank you for replying.
I tried your script but there seems to be errors in some lines.
Or I'm doing something wrong, I just copied and pasted it.
checkTime:
call GetTickCount
sub eax,[oldt]
cmp eax,#14999
jbe short exit
mov byte ptr[hitVal],0
mov [val],1 <----- Auto Assembly does not seem to know this.
jmp short exit
|
|
Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Fri Jan 25, 2019 1:53 pm Post subject: |
|
|
Code: | cmp eax,#1499 // not #14999
// ...
newmem+400:
val:
dd 0 |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4702
|
Posted: Fri Jan 25, 2019 7:27 pm Post subject: |
|
|
val is just whatever address you're monitoring.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
Unicorngoulash Newbie cheater
Reputation: 0
Joined: 19 Apr 2018 Posts: 19 Location: Netherlands
|
Posted: Sat Jan 26, 2019 1:06 am Post subject: |
|
|
I am still having a lot of trouble trying those things without running into problems and my game crashing.
Could someone be so kind to take my existing script and edit it in a way that would work. I'm a noob.
I've been using this particular script and modifying it for a lot of different games thanks to "Old cheat engine user"
It's bassicaly a double jump code for Tomba 2.
|
|
Back to top |
|
 |
salumor Advanced Cheater
Reputation: 0
Joined: 14 Jan 2019 Posts: 87
|
Posted: Sat Jan 26, 2019 8:27 am Post subject: |
|
|
Maybe because you mess with flags, but never restore them (if there is jump afterwards that makes use of flags set somewhere before).
Adding "pushf" before your first cmp and "popf" somewhere after last jump, where it will be always executed(!!) - in this case right at start of exit, might stop crashing. (if you did set val correctly so it's [ePSXe.exe+B69EA4] )
|
|
Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Sat Jan 26, 2019 11:42 am Post subject: |
|
|
Unicorngoulash wrote: | I am still having a lot of trouble trying those things without running into problems and my game crashing.
Could someone be so kind to take my existing script and edit it in a way that would work. I'm a noob.
I've been using this particular script and modifying it for a lot of different games thanks to "Old cheat engine user"
It's bassicaly a double jump code for Tomba 2. |
here is the complete script it should work without issues:
ParkourPenguin wrote: | If you're using a code injection, you shouldn't call sleep. It'll probably have other undesirable effects.
Code: | define(address,"ePSXe.exe"+65260)
//define(bytes,88 90)
[ENABLE]
//assert(address,bytes)
alloc(newmem,2048)
label(returnhere)
label(exit)
label(checkTime)
label(setTime)
newmem:
push eax
push ecx
push edx
cmp byte ptr[hitVal],0
jne short checkTime
cmp [ePSXe.exe+B69EA4],#513
je short setTime
exit:
pop edx
pop ecx
pop eax
mov [eax+ePSXe.exe+A82020],dl
jmp returnhere
checkTime:
call GetTickCount
sub eax,[oldt]
cmp eax,#1499
jbe short exit
mov byte ptr[hitVal],0
mov [ePSXe.exe+B69EA4],1
jmp short exit
setTime:
mov byte ptr[hitVal],1
call GetTickCount
mov [oldt],eax
jmp short exit
newmem+400:
oldt:
dd 0
hitVal:
db 0
address:
jmp newmem
nop
returnhere:
[DISABLE]
address:
mov [eax+ePSXe.exe+A82020],dl
dealloc(newmem) |
|
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
 |
|