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 


Write bytes using LUA when jmping to new mem using assembler

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Ralicht
Newbie cheater
Reputation: 0

Joined: 08 Feb 2015
Posts: 20
Location: United States

PostPosted: Sat Jan 30, 2016 12:37 am    Post subject: Write bytes using LUA when jmping to new mem using assembler Reply with quote

I'm really new to Lua, so please forgive me if this has been asked before. I am trying to write a script that writes a random value out of an array each time an assembly opcode is called. It's easy enough to stick it on a timer, but I would like for it only to write at that specific time. Is this possible?
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sat Jan 30, 2016 12:40 am    Post subject: Reply with quote

Easiest thing to do is set a breakpoint.
Code:
debug_setBreakpoint(0x12345678, function()
  print(ECX)
  debug_continueFromBreakpoint(co_run)
  return 1
end)
Back to top
View user's profile Send private message
Ralicht
Newbie cheater
Reputation: 0

Joined: 08 Feb 2015
Posts: 20
Location: United States

PostPosted: Sat Jan 30, 2016 1:12 am    Post subject: Reply with quote

Zanzer wrote:
Easiest thing to do is set a breakpoint.
Code:
debug_setBreakpoint(0x12345678, function()
  print(ECX)
  debug_continueFromBreakpoint(co_run)
  return 1
end)


That was easier than expected. Sorry, I didn't understand that the breakpoint could be used like this.
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