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 


Question - Putting Pointers into trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Rabidxotaku
How do I cheat?
Reputation: 0

Joined: 19 Jul 2015
Posts: 1

PostPosted: Sun Jul 19, 2015 7:23 pm    Post subject: Question - Putting Pointers into trainer Reply with quote

So essentially I have been using buttons to inject scripts into Terraria, not all are mine and in finished trainer I will of course credit where credit is due, but as of right now I have a question

This is the method I have been using and on further thought this is a toggle not a button :p

Code:
 function CEToggleBox2Change(sender)
 if (checkbox_getState(UDF1.CEToggleBox2) == 1) then
      autoAssemble([[
aobscan(RevertDamage,29 82 18 03 00 00 83 7D) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
  add [edx+00000318],eax
  jmp return
RevertDamage:
  jmp code
  nop
return:
registersymbol(RevertDamage)
    ]])
  else
     autoAssemble([[
RevertDamage:
  db 29 82 18 03 00 00
unregistersymbol(RevertDamage)
dealloc(newmem)
     ]])
  end
end
function CEToggleBox3Change(sender)
 if (checkbox_getState(UDF1.CEToggleBox3) == 1) then
      autoAssemble([[
aobscan(RevertMana,29 82 1C 03 00 00 E9) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
  add [edx+0000031C],eax
  jmp return
RevertMana:
  jmp code
  nop
return:
registersymbol(RevertMana)
    ]])
  else
     autoAssemble([[
RevertMana:
  db 29 82 1C 03 00 00
unregistersymbol(RevertMana)
dealloc(newmem)
     ]])
  end
end


Anyways!

I have this script there
Code:
[ENABLE]
//define(timer, Terraria.Main::Draw+22db)
define(timer, Terraria.Main::Draw+23e0)
assert(timer, ?? ?? ?? ?? d9 05 ?? ?? ?? ?? df f1)
label(timer_aob)
registersymbol(timer_aob)

timer:
timer_aob:

[DISABLE]


Which grabs the address for all global events and then uses that address and applies the offset to get the values and then the values (which are already put in under neath the parent script (up above), I am wondering how I could implement this in a trainer, maybe a button for an auto run functions for the value getters? I have other scripts that also act the same general way. I am just at a lose of what I should do.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting 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