 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Twistedfate Expert Cheater
Reputation: 1
Joined: 11 Mar 2016 Posts: 231
|
Posted: Wed Jul 27, 2016 12:17 pm Post subject: For smart people only Hard case (help request) |
|
|
I am newbie at ASM :
can you help me
I have 2 players with 2 co ordinates and 2 names
My name and enemy name
I want to move enemy co ordinates to my co ordinates
___________________
I need help at 2 cases :
**how do I mov enemy co-ordinates to mine using Name and co-ordinates ( both are at one structure )
**the 2nd case
If i want to tell the game ..... If my enemy next to me (at 6 steps range then mov his co ordinates to mine )
Some one build example code for me
lets consider player 1 name = miner and there are alot of enemys around you
|
|
| Back to top |
|
 |
cooleko Grandmaster Cheater
Reputation: 11
Joined: 04 May 2016 Posts: 717
|
Posted: Wed Jul 27, 2016 11:12 pm Post subject: |
|
|
I'm not sure if I'm considered smart enough to help you, but I would have an AOB script (use AOB template on instruction) set two or three memory values (alloc(bX,8), alloc(bY,8), alloc(bZ,8)) in the enable, when the player is detected (find something in the structure that distinguishes), save the players coordinates. When the enemy is detected, if player coords arent 0, then set the enemies coords to the player coords (maybe add some small offset to X or Y so they stand next to or in front of you). If you are fancy, you could just save the players base address and use pointers for the X,Y,Z instead of saving the actual values.
| Code: | ...
alloc(bPlayer,8)
...
code:
cmp [register+offset], PlayerIdentifier
JNE EnemyTest
mov [bPlayer], register
ORIGINAL INSTRUCTION
return
EnemyTest
cmp [bPlayer],0
jne MoveEnemy
ORIGINAL INSTRUCTION
return
MoveEnemy:
push eax
mov eax, [bPlayer+xOffset]
mov [register+xOffset], eax
mov eax, [bPlayer+yOffset]
mov [register+yOffset], eax
pop eax
ORIGINAL INSTRUCTION
return |
To offset the enemy a few steps to a direction just add an "add eax,5" before setting the Enemy X or Y
|
|
| Back to top |
|
 |
Twistedfate Expert Cheater
Reputation: 1
Joined: 11 Mar 2016 Posts: 231
|
Posted: Thu Jul 28, 2016 9:15 am Post subject: |
|
|
| Quote: | I'm not sure if I'm considered smart enough to help you, but I would have an AOB script (use AOB template on instruction) set two or three memory values (alloc(bX, , alloc(bY, , alloc(bZ, ) in the enable, when the player is detected (find something in the structure that distinguishes), save the players coordinates. When the enemy is detected, if player coords arent 0, then set the enemies coords to the player coords (maybe add some small offset to X or Y so they stand next to or in front of you). If you are fancy, you could just save the players base address and use pointers for the X,Y,Z instead of saving the actual values.
|
thank you I think I have got the idea I will post a message for help ^^
|
|
| 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
|
|