 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Winsane Newbie cheater
Reputation: 0
Joined: 12 Mar 2016 Posts: 12
|
Posted: Sat Mar 12, 2016 6:01 pm Post subject: Loop with delay in auto assemble script? |
|
|
Hello! I'm trying to make a "vacuum hack" for a flash plugin sidescroll mmo game.
I have a script that moves the mobs into the top left corner of the map, and it's working pretty well. The problem is that the mobs get sort of stuck when the script is enabled all the time, but if you just toggle it on and off it works really well.
I'm trying to figure out how to make a loop that changes the values back and forth with a delay, but I can't seem to figure it out.
This is the script:
| Code: |
[ENABLE]
aobscan(VAC2,8C DD 5D 80 F3 0F 7E 4D 80) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
movq xmm0,[ebp-80]
jmp return
VAC2+04:
jmp code
return:
registersymbol(VAC2)
[DISABLE]
VAC2+04:
db F3 0F 7E 4D 80
unregistersymbol(VAC2)
dealloc(newmem)
|
So in pseudo code, this is what I want to do:
| Code: |
code:
movq xmm0,[ebp-80] // xmm0 is the part that makes the mobs go into the corner
sleep(500)
jmp loop
loop:
movq xmm1,[ebp-80] // xmm1 is the "normal" state
sleep(500)
jmp code
|
But when I make a loop like that, the game freezes (It's a flash plugin game), and I also can't find how to set a delay.
Any help would be very much appreciated!
|
|
| Back to top |
|
 |
panraven Grandmaster Cheater
Reputation: 62
Joined: 01 Oct 2008 Posts: 959
|
Posted: Sat Mar 12, 2016 6:25 pm Post subject: |
|
|
Not tested, not sure it work~
| Code: | ENABLE]
aobscan(VAC2,8C DD 5D 80 F3 0F 7E 4D 80) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
label(original)
label(counter)
// assume
// 1.the cave entered every frame or alike
// 2.no previous flag need to preserve
newmem:
push eax
mov eax,[counter]
dec eax
test eax,eax
jg @f
mov eax,#30
@@:
mov [counter],eax
cmp eax,#15
pop eax
jle original
code:
movq xmm0,[ebp-80]
jmp return
original:
db f3 0f 7e 4d 80
jmp return
counter:
dd 0
VAC2+04:
jmp newmem
return:
registersymbol(VAC2)
[DISABLE]
VAC2+04:
db F3 0F 7E 4D 80
unregistersymbol(VAC2)
dealloc(newmem) |
_________________
- Retarded. |
|
| Back to top |
|
 |
Winsane Newbie cheater
Reputation: 0
Joined: 12 Mar 2016 Posts: 12
|
Posted: Sat Mar 12, 2016 9:37 pm Post subject: |
|
|
| panraven wrote: | Not tested, not sure it work~
|
Works very well! Thanks a lot!
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|