Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


For smart people only Hard case (help request)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Wed Jul 27, 2016 12:17 pm    Post subject: For smart people only Hard case (help request) Reply with quote

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
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Wed Jul 27, 2016 11:12 pm    Post subject: Reply with 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,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
View user's profile Send private message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Thu Jul 28, 2016 9:15 am    Post subject: Reply with quote

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,Cool, alloc(bY,Cool, alloc(bZ,Cool) 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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites