View previous topic :: View next topic |
Author |
Message |
alphanote2 How do I cheat? Reputation: 0
Joined: 23 Sep 2014 Posts: 6
|
Posted: Tue Sep 23, 2014 7:03 pm Post subject: Really need help with strings! |
|
|
I need a FUNCTION that scans for TEXT1 and replaces all the found addresses to TEXT2... SO
a function like this;
Code: | FindAndReplaceString("TEXT TO FIND","TEXT TO REPLACE") |
|
|
Back to top |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Sep 24, 2014 3:06 am Post subject: |
|
|
http://forum.cheatengine.org/viewtopic.php?p=5552058#5552058
Not sure why you don't use it.. or why you opened a new account..
In case you don't understand how it works heres explanation
That function (in the url above) does the following:
converts each letter and letter of the search string to base 16 value ( builds up an array of byte) and of the replace string to base 10 value, it inserts all bytes into array(table).
it connects all search table with a space between entry and entry (does not touch the replace table) and thus creates an array of byte.
It scans for the aob, and for each each result found it writes the replace table.
How to call it?
replaceString(string_in,string_out,ignore_length);
string_in - the string you want to find (input type string)
string_out - the string you want to replace with (input type string)
ignore_length - ignore length of the 2 strings given (like if you try write 4 character word into 3 character word, that can really mess up your game, since it it will override other stuff that comes after that string..) (input type boolean).
Example
replaceString("Hi","He")
Function will return true if found, we didn't have to insert the true as third parameter as the length between the 2 strings is equal.
But if we do this
replaceString("Hi","Bye")
The function will print "Not recommended to override shorter string with a longer string", since again it can override stuff that it shouldn't.
To ignore that, just call it in this way
replaceString("Hi","Bye",true)
This will ignore the length check and override the string.
Btw:
Replace replaceString with FindAndReplaceString if function name matters that much for you.. lol.
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Wed Sep 24, 2014 4:21 am Post subject: |
|
|
Perhaps he wants it in the same format as http://forum.cheatengine.org/viewtopic.php?p=5551510#5551510 but then for strings
He hasn't mentioned if it uses widestrings or not
_________________
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 |
|
|
alphanote2 How do I cheat? Reputation: 0
Joined: 23 Sep 2014 Posts: 6
|
Posted: Wed Sep 24, 2014 7:16 am Post subject: Yes |
|
|
That format!!
I want to change a large string to a smaller string.
Searching for HOURS (at school ;3)
My old account couldn't post anymore.
I gave up and made this post.
Please Dark Byte, you're the only one that I've known to make those functions! I really need your help!
|
|
Back to top |
|
|
|