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 


...

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

Joined: 17 Feb 2016
Posts: 40

PostPosted: Wed Feb 17, 2016 10:22 am    Post subject: ... Reply with quote

hello
i have a problem
bytes = "xx xx xx xx xx xx"
results = AOBScan(bytes,"*W*X-C")
address=getAddress(stringlist_getString(results,0))
debug_setBreakpoint(address)
debug_removeBreakpoint(address)
writeDouble(mapaddress,500)

function debugger_onBreakpoint()
mapaddress = ECX + 0x20
return 1
end

the problem is when i use this only first value in the "find out what addresses this inctruction accesses" change to 500 ... i want all the addresses putting to (mapaddress) so when i change mapaddress all the other addresses in "find out what addresses this inctruction access" change to 500
sorry for my bad english
thank you


Last edited by HyberCode on Wed Feb 17, 2016 2:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Feb 17, 2016 10:44 am    Post subject: Reply with quote

It's a wonder the first one even gets changed (as the breakpoint gets deleted too quickly)

Anyhow, try something like this:
Code:

mapaddresses={}

bytes = "xx xx xx xx xx xx"
results = AOBScan(bytes,"*W*X-C")
address=getAddress(stringlist_getString(results,0))
debug_setBreakpoint(address)


function debugger_onBreakpoint()
  local a=ECX + 0x20
  if mapaddresses[a]==nil then --check if it has been changed
  --not yet, write the value
    writeDouble(a,500)
    mapaddresses[a]=true --and add it to the list
  else
    debug_removeBreakpoint(address)  --already in the list, so all entries have been changed. (assuming it's only called once for each address each time)
  end

  return 1
end

_________________
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
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Wed Feb 17, 2016 12:34 pm    Post subject: Reply with quote

thank you for replying
i full understand what u wrote ... but Unfortunately it didn't work
this is picture of what happen with ur new code
imgur. com/Jjl5vXs


i will explain it more now
imgur. com/PNEuqTG
like what in the image .. i get more than one address ... and always with my old code the first value become the mapaddress
what i want to do ... that all those address change with one click

ps : those address always changing ... that's why i can't get the pointer and the offsets of it
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Feb 17, 2016 12:52 pm    Post subject: Reply with quote

Just fix the code. You're calling a nil value somewhere which probably stops the return. The line number is provided in the error message
_________________
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
HyberCode
Cheater
Reputation: 0

Joined: 17 Feb 2016
Posts: 40

PostPosted: Wed Feb 17, 2016 1:39 pm    Post subject: Reply with quote

thank you very much dark byte ... i fixed it
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