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 


How to make This?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Fri Jan 31, 2014 9:32 am    Post subject: How to make This? Reply with quote

4 byte replacer?
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Fri Jan 31, 2014 10:20 am    Post subject: Reply with quote

Could you be more specific?
_________________
Back to top
View user's profile Send private message
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Fri Jan 31, 2014 11:16 am    Post subject: Reply with quote

i mean there is two edit box so how can we make 4 byte replacer?
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jan 31, 2014 11:20 am    Post subject: Reply with quote

Still, too little informations.
_________________
Back to top
View user's profile Send private message MSN Messenger
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Fri Jan 31, 2014 11:26 am    Post subject: Reply with quote

Razz i mean that i create two edit box in a form and a button then i want to give the button a function that will change a 4 byte value of a game or any other thing we connect for example aob replacer like this i want 4 byte replacer
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jan 31, 2014 11:45 am    Post subject: Reply with quote

Well, that will not work. There are high chances that there will be too many addresses having the same 4-byte value.

For example you want to change value 65 to 105.
Script will find 10 (more or less) to 500000 addresses (or more) which have value 65, which one you want to change?

_________________
Back to top
View user's profile Send private message MSN Messenger
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Fri Jan 31, 2014 11:48 am    Post subject: Reply with quote

just tell me the script i will use it for changing high values only
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Fri Jan 31, 2014 12:22 pm    Post subject: Reply with quote

http://forum.cheatengine.org/viewtopic.php?p=5510987

Find a big signature, then simply replace four bytes instead of the whole thing.

_________________
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Fri Jan 31, 2014 12:43 pm    Post subject: Reply with quote

"aob replacer", "aobswap"

Code:
function AOBSwap(aobIn,aobOut)
 aobOut = aobOut:gsub('[^%w]','')

 local address = 0

 local _aobOut=''
 for i=1,#aobOut,2 do
  _aobOut = _aobOut..aobOut:sub(i,i+1)..' '
 end

 local aobs = AOBScan(aobIn,'+W*X-C')
 if(aobs ~= nil) then
   for i = 0,aobs.Count-1 do
     address = aobs.String[i]
     autoAssemble(address..[[:
                  db ]].._aobOut)
   end
   aobs.destroy()
 end
end   


is insecure if we have too short byte array.

And _4ByteSwap function (it uses AOBSwap function)
Code:
function _4ByteSwap(findValue,replaceWith)
  local findValue   = string.format('%08X',findValue)
  local replaceWith = string.format('%08X',replaceWith)
  local tmp=findValue   

  tmp = tmp:sub(7,8)..tmp:sub(5,6)..tmp:sub(3,4)..tmp:sub(1,2)
  findValue = tmp; tmp=replaceWith

  tmp = tmp:sub(7,8)..tmp:sub(5,6)..tmp:sub(3,4)..tmp:sub(1,2)
  replaceWith=tmp

  AOBSwap(findValue,replaceWith)
end   


is insecure too.

Small 4byte values, high 4byte values, it doesn't matter.
Number between 0 and 4294967295 is not that unique.


I strongly suggest to use "groupscan" method.

_________________


Last edited by mgr.inz.Player on Sat Feb 01, 2014 11:57 am; edited 3 times in total
Back to top
View user's profile Send private message MSN Messenger
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Sat Feb 01, 2014 12:15 am    Post subject: Reply with quote

i really need 4 byte replacer can't u change ur script from aob to 4 byte ? plz
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Sat Feb 01, 2014 12:58 am    Post subject: Reply with quote

gamers01 wrote:
i really need 4 byte replacer can't u change ur script from aob to 4 byte ? plz
Well, 4 bytes is an AOB. It's just an array that's only 4 large.

But seriously you should learn what you're doing before you start changing around game code or memory values. Or at least give us more info.

_________________
Back to top
View user's profile Send private message
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Sat Feb 01, 2014 1:22 am    Post subject: Reply with quote

as u know that there is aob replacer so how to make a 4 byte replacer
atleast there should be a function that u write 4 byte value instead of aob so it will change to what value u want
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Sat Feb 01, 2014 4:04 am    Post subject: Reply with quote

Holy shit dude.

4 BYTES IS AN AOB.

AOB = Array of Bytes

As in a group of bytes.

Like 4F 93 11 C3.

See that?

Four bytes?

It's also an array of bytes.

Seriously, learn what you want to do, then tell us what you want to do.

_________________
Back to top
View user's profile Send private message
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Sat Feb 01, 2014 4:20 am    Post subject: Reply with quote

yeah i know but in 4 byte the values are different
for e.g :
200 <--- 4 byte (i want like this)
C8 <---- AOB
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Sat Feb 01, 2014 4:57 am    Post subject: Reply with quote

...

http://forum.cheatengine.org/viewtopic.php?t=548280&sid=e8a2600cf5c2e1ca5022e959630e58ab

That points out the LUA function used to convert decimal to hex.

_________________
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
Goto page 1, 2  Next
Page 1 of 2

 
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