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 


[HELP] How to change this CE code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
leungrv
How do I cheat?
Reputation: 0

Joined: 16 Jul 2012
Posts: 2

PostPosted: Mon Jul 16, 2012 5:00 pm    Post subject: [HELP] How to change this CE code Reply with quote

How to change this CE code into a code that C++ can read?
Thanks!
This game is called Alliance of Valiant Arms.

Code:
timer = createTimer(nil,true)
timer_setInterval(timer, 1000)

function DeathValley()
     if (readInteger('[["ava.exe"+01C0F6F4]+274]+7EC') == 0) then
          writeInteger('[["ava.exe"+01C0F6F4]+274]+7EC', 4)
     end
     if (readInteger('[[[[["ava.exe"+01C65D50]+7ac]+43c]+8c]+14]+3fc') ~= 0) then
          writeInteger('[[[[["ava.exe"+01C65D50]+7ac]+43c]+8c]+14]+3fc', 1)
     end
end

timer_onTimer(timer, DeathValley)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Mon Jul 16, 2012 7:00 pm    Post subject: Reply with quote

I think that code is clear enough to understand what it does

Just read and write 2 different pointers every second and write a 4 to the first one when it is 0 and write a 1 to the other one when it isn't 0

Integer is a 4 byte value type

_________________
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
leungrv
How do I cheat?
Reputation: 0

Joined: 16 Jul 2012
Posts: 2

PostPosted: Mon Jul 16, 2012 7:10 pm    Post subject: Reply with quote

I am a mega noob can you please give me a link on how to do that? Thank you very much.
Back to top
View user's profile Send private message
n0 m3rcY
Cheater
Reputation: 0

Joined: 18 Jun 2012
Posts: 42

PostPosted: Mon Jul 16, 2012 7:11 pm    Post subject: Reply with quote

Yep, easiest way would be to do this in a win32 app and just call SetTimer and handle the WM_TIMER message, you don't need to bother with timer IDs as long as it's your hwnd and you only have one timer.

I'm assuming you already know how to read pointers in c++.

edit: read your post. All you have to do is get the base address, add the offset, then ReadProcessMemory on that address with a size of 4 bytes. Then add your offset to the result and call ReadProcessMemory with the address being your offset.

If you don't know c++, why don't you just use CE's trainer maker? It seems like you already know how to use lua a little, and you won't get anywhere fast in c++ to have a trainer out in the forseeable future if you're a "mega noob".
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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