Twistedfate Expert Cheater
Reputation: 1
Joined: 11 Mar 2016 Posts: 231
|
Posted: Wed Jan 25, 2017 7:28 am Post subject: help me with x and Y ... Long question , complicated |
|
|
Iam trying to make auto walking script to specific Cords on x and Y axis .
look at the code
[esi+0000026C] =x axis
[esi+00000270]=y axis
| Code: |
newmem:
cmp [esi+0000026C],#1
je newmem1
cmp [esi+00000270],#2
je newmem1
//next step
cmp [esi+0000026C],#3
je newmem2
cmp [esi+00000270],#5
je newmem2
//next step
cmp [esi+0000026C],#1 // the problem is here
je newmem3 //....etc //
//first step
mov [esi+0000026C],#1
mov [esi+00000270],#2
push [esi+0000026c]
jmp return
newmem1:
mov [esi+0000026c],#3 //x axis
mov [esi+00000270],#5 //y axis
push [esi+0000026c]
jmp return
newmem2:
mov [esi+0000026c],#8 //x axis
mov [esi+00000270],#10 //y axis
push [esi+0000026c]
jmp return |
The code work perfect but the problem is If I walked on x axis twice it will be like this (1,2),(1,5) >> the script will read first x only in the compare section (newmem:) so the script will loop and will not move to the next step and the same problem for y axis If I walked on the same axis twice will make return again and again....
how can I make cmp and mov instruction for the same axis when repeated twice ?
|
|