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 


any help appreciated

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

Joined: 19 Mar 2015
Posts: 9

PostPosted: Fri Apr 17, 2015 12:41 pm    Post subject: any help appreciated Reply with quote

Joined: 19 Mar 2015
Posts: 6

PostPosted: Thu Apr 16, 2015 3:40 pm Post subject: Reply with quote
HI GUYS CAN YOU HELP ME WITH SWAPPING 4 CODES PLEASE I NEED SCRIPT TO SWAP THE PIC TO THE SAID CODES ANY HELP APPRECIATED IM NEWBIE TRYING TO LEARN SO I CAN PRACTICE ON MY OWN I JUST NEED HELP TO SHOW HOW AND ANY HELP REALLY APPRECIATED THANKS



HELP.png
 Description:
 Filesize:  514.96 KB
 Viewed:  5092 Time(s)

HELP.png



_________________
hear no evil see no evil speak no evil
Back to top
View user's profile Send private message
effewe2
How do I cheat?
Reputation: 0

Joined: 20 Apr 2015
Posts: 4

PostPosted: Mon Apr 20, 2015 6:19 pm    Post subject: Reply with quote

Okay, first you are in the lua scripting section, so I assume you are trying to script a trainer to automatically swap values correct?

Second: what kind of game are you trying to hack? flash based (AS3) or exe?
Back to top
View user's profile Send private message
johndoe1966
How do I cheat?
Reputation: 0

Joined: 19 Mar 2015
Posts: 9

PostPosted: Tue Apr 21, 2015 12:03 pm    Post subject: Reply with quote

hi thanks for reply yes its flash and that code is repair i need to swap all 4 parts i can do it manually but would like a trainer if its possible
_________________
hear no evil see no evil speak no evil
Back to top
View user's profile Send private message
effewe2
How do I cheat?
Reputation: 0

Joined: 20 Apr 2015
Posts: 4

PostPosted: Tue Apr 21, 2015 5:39 pm    Post subject: Reply with quote

Kinda looks like you are going about it in a difficult way.

Typically you would find your AoB's from decompiling the swf with a program like JPEXS or sothink swf decompiler. (I prefer JPEXS)

From there you can find the function you are trying to hack and pull the AoB's from it to be able to get an exact match of what you are looking for.

Then you can just swap the bytes.

Here is an AoB swap function I use in my trainers that I got from a different thread here on the cheat engine forums:

Code:

function DEC_HEX(IN)
    local B,K,OUT,I,D=16,"0123456789ABCDEF","",0
   if IN<1 then
      OUT=0
      return OUT
   end
    while IN>0 do
        I=I+1
        IN,D=math.floor(IN/B),math.mod(IN,B)+1
        OUT=string.sub(K,D,D)..OUT
    end
    return OUT
end

function Aobswap(search, change)
   aobs = AOBScan(search)
   if(aobs ~= nil) then
      j = stringlist_getCount(aobs)
      --print("Found:",j);
      for i = 1, j do
         --print(stringlist_getString(aobs,i-1));
            --66 ?? ?? d1 a1 68 ?? ?? d0 d0
         address=stringlist_getString(aobs,i-1)
                for i = 1, string.len(change), 3 do
               z = string.sub(change, i, i+2)
                    x, y = string.find(z, "%?+")
                    if (x == nil) then
                  script=[[
                  ]]..address.."+"..(DEC_HEX((i-1)/3))..[[:
                  db ]]..z..[[
                  ]]
                  autoAssemble(script)
                  --print(z)
                        --print(address.."+"..(DEC_HEX((i-1)/3)))
                    end
                end
      end
      object_destroy(aobs);
      aobs=nil
   end
end


Simply place that at the start of your lua script in your trainer, then on your button click functions you call the functions and pass the value to scan for followed by the value to change all results to.
example below is a money hack that hacks 4 different AOBs and changes all results of each scan to "2d 4e 02 02 02 02 02":
Code:

function CEButtonMoneyClick(sender)
openProcess("FlashPlayerPlugin")
Aobswap("D0 ?? ?? ?? 66 12 1c","2d 4e 02 02 02 02 02")
Aobswap("D1 ?? ?? ?? 66 12 1c","2d 4e 02 02 02 02 02")
Aobswap("D2 ?? ?? ?? 66 12 1c","2d 4e 02 02 02 02 02")
Aobswap("D3 ?? ?? ?? 66 12 1c","2d 4e 02 02 02 02 02")
showMessage("Cheat Enabled! Refresh after use.")
end


As you can see, the first part in quotes is what to scan for. all results that come back from that scan will be changed to the aobs in the second set of quotes.

For that particular hack there were 4 different values I had to scan for, so I called the Aobswap function 4 times passing a different scan value each time.


Not sure if that is exactly what you are looking for as it looks like you are mixing both AoB scans and ASM. I'm okay at AoB hacking, but ASM gets a bit beyond my skill set.
Back to top
View user's profile Send private message
johndoe1966
How do I cheat?
Reputation: 0

Joined: 19 Mar 2015
Posts: 9

PostPosted: Wed Apr 22, 2015 1:29 pm    Post subject: Reply with quote

thanks very much for your help i really appreciate your time and effort helping me out as most people do not bother or got no time for learners like myself but we all started from the learning stage
_________________
hear no evil see no evil speak no evil
Back to top
View user's profile Send private message
Fluffer_Nutter
Advanced Cheater
Reputation: 0

Joined: 26 Feb 2015
Posts: 67

PostPosted: Sat Apr 25, 2015 9:26 am    Post subject: Reply with quote

This is for a Online Multi-player game. Dont think that is allowed on the forum?
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