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?

 
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: Sat Jan 18, 2014 8:28 am    Post subject: how to make this? Reply with quote

how can we make a edit box that can be used that in 1st edit box we write the text and in 2nd edit box we write the text that we want to change the 1st edit text to 2nd edit box text in lua??

Smile
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Sat Jan 18, 2014 9:41 am    Post subject: Reply with quote

Code:
Trainer.EditBox1.Caption = Trainer.EditBox2.Caption;

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Sat Jan 18, 2014 10:05 am    Post subject: Reply with quote

hmmm so will it change that string in game too?
i meant for games Razz
like aob replacer can we make string replacer
anyone???
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Sun Jan 19, 2014 3:32 pm    Post subject: Reply with quote

Here you go.
Code:
function StringReplacer(String1, String2) -- Returns true/false and count if found.
   local AoB_Table = {};
   for i=1,String1:len() do AoB_Table[i] = string.format('%X',String1:byte(i)); end
   local AoB = table.concat(AoB_Table);
   
   local Results = AOBScan(AoB);
   local Count -- If we want to return amount of strings that we're replaced
   if Results then
      Count = stringlist_getCount(Results);
      for i = 0, Count-1 do
         local Address = stringlist_getString(Results,i);
         writeString('0x'..Address,String2);
      end
      object_destroy(Results);
      return true, Count;
   end
   return false;
end


Usage
Code:
a,b = StringReplacer('Hey', 'Bye')
print(tostring(a)) -- returns true or false
print(b) -- returns how much strings replaced.


If you don't care about the amount of strings that were replaced, you can just do instead
Code:
 a = StringReplacer('Hey', 'Bye')


Let me know if you need anything else.

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

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

bro ty but can u make an example .ct because i am confused and do u have facebook account i want to add u Smile
Back to top
View user's profile Send private message
DaSpamer
Grandmaster Cheater Supreme
Reputation: 52

Joined: 13 Sep 2011
Posts: 1578

PostPosted: Mon Jan 20, 2014 12:58 pm    Post subject: Reply with quote

I supplied an example, how to execute and such.
And sorry, I don't add strangers in facebook.

_________________
HEY Hitler
Do you get lazy when making trainers?
Well no more!
My CETrainer will generate it for you in seconds, so you won't get lazy! Very Happy

http://forum.cheatengine.org/viewtopic.php?t=564919
Back to top
View user's profile Send private message
gamers01
Cheater
Reputation: 0

Joined: 27 Sep 2013
Posts: 45

PostPosted: Tue Jan 21, 2014 12:06 pm    Post subject: Reply with quote

yeah but i am confused how to do it like i make to edit boxes and 1 button then how i give that function to the button? Sad plz create a .ct file
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