'; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo '
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 


If I add another symbol the CMP is suddently wrong

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
MaZy
Newbie cheater
Reputation: 0

Joined: 19 Jun 2008
Posts: 10

PostPosted: Mon Oct 24, 2022 4:41 pm    Post subject: If I add another symbol the CMP is suddently wrong Reply with quote

Hello

I have a working AOB script.

Now I wanted to add damageMultiplier

Its just
Code:

damageMultiplier:
  dd (int)1


but without working with it it already breaks my script.

For instance this part worked always
Code:

worldEnemyBehaviour:
  cmp [ignoreWorldEnemies], 1
  je code
  mov [rcx+0000032C],00000000
  jmp return


now this je code fails. Instead to be true (zf = 1) it is false (pf = 1)

Full script
Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
aobscanmodule(Damage_1,AT-Win64-Shipping.exe,F3 0F 11 89 2C 03 00 00 C3) // should be unique
alloc(newmem,$2000,Damage_1)

label(code)
label(return)

newmem:
  // xmm7 = damage done with negative values
  // xmm8 max hp of enemy
  // xmm1 = hp
  comiss xmm7, [number] // triggered by non battle enemies?
  jnb worldEnemyBehaviour
  jmp inBattleEnemyBehaviour

worldEnemyBehaviour:
  cmp [ignoreWorldEnemies], 1
  je code
  mov [rcx+0000032C],00000000
  jmp return

inBattleEnemyBehaviour:
  comiss xmm7, [number]
  jnb code // if damage is above 0 then we are not in a battle
  cmp [ignoreInBattleEnemies], 1
  je code
  //movss xmm1, xmm1 * [damageMultiplier] // THIS I WANT TO ADD IF IT WORKS
  movss [rcx+0000032C], xmm1
  jmp return

code:
  movss [rcx+0000032C],xmm1
  jmp return

number:
  dd (float)0

ignoreWorldEnemies:
  db 1

ignoreInBattleEnemies:
  db 0

damageMultiplier:
  dd (int)1

Damage_1:
  jmp newmem
  nop 3
return:

registersymbol(Damage_1)
registersymbol(ignoreWorldEnemies)
registersymbol(ignoreInBattleEnemies)
registersymbol(damageMultiplier)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
Damage_1:
  db F3 0F 11 89 2C 03 00 00

unregistersymbol(Damage_1)
unregistersymbol(ignoreWorldEnemies)
unregistersymbol(ignoreInBattleEnemies)
unregistersymbol(damageMultiplier)
dealloc(newmem)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25833
Location: The netherlands

PostPosted: Mon Oct 24, 2022 4:51 pm    Post subject: Reply with quote

Code:

cmp [ignoreInBattleEnemies], 1

checks if the 4 bytes at ignoreInBattleEnemies are 01 00 00 00 , but unless damageMultiplier ever changes to 0, it doesn't look like that will ever be the case

try instead
Code:

cmp byte  [ignoreInBattleEnemies], 1

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4719

PostPosted: Mon Oct 24, 2022 6:58 pm    Post subject: Reply with quote

MaZy wrote:
Code:
ignoreWorldEnemies:
  db 1

ignoreInBattleEnemies:
  db 0
or change db to dd
_________________
I don't know where I'm going, but I'll figure it out when I get there.
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
'][0]['L_POST_REPLY_TOPIC'] : '') , '" align="middle" /> '; $_switch_quick_reply_count = (isset($this->_tpldata['switch_quick_reply'])) ? sizeof($this->_tpldata['switch_quick_reply']) : 0;for ($_switch_quick_reply_i = 0; $_switch_quick_reply_i < $_switch_quick_reply_count; $_switch_quick_reply_i++){ echo '   ' , ((isset($this->_tpldata['.'][0]['L_POST_SQR_TOPIC'])) ? $this->_tpldata['.'][0]['L_POST_SQR_TOPIC'] : '') , ' '; } // END switch_quick_reply echo '
   ' , ((isset($this->_tpldata['.'][0]['L_INDEX'])) ? $this->_tpldata['.'][0]['L_INDEX'] : '') , ' '; $_switch_parent_link_count = (isset($this->_tpldata['switch_parent_link'])) ? sizeof($this->_tpldata['switch_parent_link']) : 0;for ($_switch_parent_link_i = 0; $_switch_parent_link_i < $_switch_parent_link_count; $_switch_parent_link_i++){ echo ' -> ' , ((isset($this->_tpldata['.'][0]['PARENT_NAME'])) ? $this->_tpldata['.'][0]['PARENT_NAME'] : '') , ' '; } // END switch_parent_link echo ' -> ' , ((isset($this->_tpldata['.'][0]['FORUM_NAME'])) ? $this->_tpldata['.'][0]['FORUM_NAME'] : '') , '' , ((isset($this->_tpldata['.'][0]['S_TIMEZONE'])) ? $this->_tpldata['.'][0]['S_TIMEZONE'] : '') , '
' , ((isset($this->_tpldata['.'][0]['PAGINATION'])) ? $this->_tpldata['.'][0]['PAGINATION'] : '') , ' '; echo '
' , ((isset($this->_tpldata['.'][0]['PAGE_NUMBER'])) ? $this->_tpldata['.'][0]['PAGE_NUMBER'] : '') , '
'; echo ' '; $_switch_quick_reply_count = (isset($this->_tpldata['switch_quick_reply'])) ? sizeof($this->_tpldata['switch_quick_reply']) : 0;for ($_switch_quick_reply_i = 0; $_switch_quick_reply_i < $_switch_quick_reply_count; $_switch_quick_reply_i++){ echo ' ' , ((isset($this->_tpldata['.'][0]['QRBODY'])) ? $this->_tpldata['.'][0]['QRBODY'] : '') , ' '; } // END switch_quick_reply echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo ' '; echo '
' , ((isset($this->_tpldata['.'][0]['S_WATCH_TOPIC'])) ? $this->_tpldata['.'][0]['S_WATCH_TOPIC'] : '') , '
'; echo '  
'; echo ' ' , ((isset($this->_tpldata['.'][0]['S_TOPIC_ADMIN'])) ? $this->_tpldata['.'][0]['S_TOPIC_ADMIN'] : '') , '
' , ((isset($this->_tpldata['.'][0]['JUMPBOX'])) ? $this->_tpldata['.'][0]['JUMPBOX'] : '') , '' , ((isset($this->_tpldata['.'][0]['S_AUTH_LIST'])) ? $this->_tpldata['.'][0]['S_AUTH_LIST'] : '') , '
'; echo ' '; ?>


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites