Assembly Button?

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
User avatar
Kalas
Expert Cheater
Expert Cheater
Posts: 551
Joined: Fri Mar 03, 2017 9:49 am
Reputation: 134

Assembly Button?

Post by Kalas »

I have this code:

Code: Select all

local tag = sender.Tag; 
   if (tag == 0) then 
      sender.Tag = 1; 
      autoAssemble([[//enable script]]) 
   else 
      sender.Tag = 0 
      autoAssemble([[//disable script]]) 
   end
I wonder how do I make it as button in Cheat Engine Trainer Generator?

What I did was placing a button, go to event and click on OnEnter, so for example in the code I posted I suppose to put my enable code in this part?:

([[//enable script]])

and my disable in the other one?

This is my Script I want to add as a button:

Code: Select all

{ Game   : TheForest.exe
  Version: 
  Date   : 2017-07-07
  Author : Kalas

  This script does blah blah blah
}

[ENABLE]

aobscan(PlayerStatsAOB,00 83 C4 10 D9 87 18 01 00 00)
alloc(newmem,$100,PlayerStatsAOB)

label(code)
label(return)

newmem:

code:
  fld dword ptr [edi+00000118]
  mov [edi+0000010C],(float)37 // BodyTemp
  mov [edi+00000110],(float)70 // HeartRate
  mov [edi+00000118],(float)100 // Stamina
  mov [edi+0000011C],(float)100 // Health
  mov [edi+00000124],(float)100 // Energy
  mov [edi+00000134],(float)100 // BatteryCharge
  mov [edi+00000150],(float)1 // Fullness
  mov [edi+00000154],(float)0 // Thirst
  mov [edi+00000231],0 // IsBloody
  mov [edi+00000232],0 // IsRed
  mov [edi+00000233],0 // IsCold
  jmp return

PlayerStatsAOB+04:
  jmp newmem
  nop
return:
registersymbol(PlayerStatsAOB)

[DISABLE]

PlayerStatsAOB+04:
  db D9 87 18 01 00 00

unregistersymbol(PlayerStatsAOB)
dealloc(newmem)

Post Reply

Who is online

Users browsing this forum: No registered users