1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Tutorial]How to make scripts from opcode to bytes(For Trainers)

Discussion in 'Programming' started by Razz, Sep 17, 2010.

  1. Razz

    Razz Dedicated Supporter Dedicated Donor

    Hello,

    I know it's a fucking stupid title but i didnt know anything else to explain. I was having some troubles with putting scripts into my trainers because of jmp/je/jge/add/sub etc. I will explain how to convert it to db 0f 84 for example.

    First you need to get a script that uses no bytes for enabling & Disabling for example Unl Jump.

    Note! The addy's might change but the method still works.

    Code (Text):
    1.  
    2. [Enable]
    3. 009161AF:
    4. [b]jb 00916AA[/b]
    5.  
    6. [Disable]
    7. 009161AF:
    8. [b]je 00916AA[/b]
    9.  
    I made the parts that we are gonna change bold.

    Now the hardest part of this whole tutorial. Openup Moonlight engine(Can be downloaded at the bottom of this post). Attach to Maple but don't click play yet.

    Openup Mem Viewer and go to the addy of Unl Jump. Now you see something like this:

    Address: Bytes: Opcodes:
    009161AF 0f 84 f5 01 00 00 je 00916aa
    If you are a bit smart you will notice the opcode is the same as the disable bytes in our script. Hooray for you because you have to notice this instantly else you won't get far.

    Now we are gonna make our disable part of our script into bytes. How do we do that? First of all you need to compare the Enable and disable part of the script, you will notice only the way of jumping is changed.
    je(Jump if equal) -> jb(Jump to if below). You don't need to know why it is je or jb only it's a jump. So that means we only have to change 0f 84(JE) to 0f 82(JB).

    How do we do that in AA?
    Just replace
    Code (Text):
    1.  
    2. je 00916AA
    3.  
    with:
    Code (Text):
    1.  
    2. db 0f 84
    3.  
    and
    Code (Text):
    1.  
    2. jb 00916AA
    3.  
    with
    Code (Text):
    1.  
    2. db 0f 82
    3.  
    The result will be something like this.
    Code (Text):
    1.  
    2. [Enable]
    3. 009161AF:
    4. db 0f 82
    5.  
    6. [Disable]
    7. 009161AF:
    8. db 0f 84
    9.  
    Someone might detect some failing grammar but im dutch so offense pl0x.

    I hope you understand this and if you don't too bad for you.

    Recent MLE Download: http://chienfaster.blogspot.com/
     
    • Helped me! Helped me! x 1
  2. Ation

    Ation s. mod Moderator Donor

    Nice.

    You could add the completed script at the end of your tutorial to make it even more clear.
    Code (Text):
    1. [Enable]
    2. 009161AF:
    3. db 0f 82
    4.  
    5. [Disable]
    6. 009161AF:
    7. db 0f 84
     
  3. Razz

    Razz Dedicated Supporter Dedicated Donor

    Added thnx for suggestion Ation ;D
     
  4. Danny1994

    Danny1994 Likes to contribute Coder

    It's easy.
    just go to AA and write down :
    Press Inject/OK button (Can't remember correct name)
    In Mem view you'll see the changes.

    Naz would say : "Easy peasy"
     
  5. Razz

    Razz Dedicated Supporter Dedicated Donor

    Yeye. But for tha super duper noobs. I just found out few days ago myself(WOOHOO I ARE PRO not).
     
  6. spunge

    spunge Well-Known Member Retired

    It is a mnemonic not an opcode. What you are converting the mnemonic into is the opcode. This is a common mistake perpetrated by someone in the Maple community long ago. There is no difference between mnemonic and opcode form. Why you would convert it into something that is not human friendly is beyond me.
     
  7. Nickerian

    Nickerian Well-Known Member Coder Donor

    The main reason would be because you dont need to update it each patch :)
     
  8. Nazgul1444

    Nazgul1444 Dedicated Supporter Dedicated Donor

    nicenice, it's a nice totorial but unneeded....
     
  9. spunge

    spunge Well-Known Member Retired

    Easily remedied by using offsets and constants.
     
  10. Nebbis

    Nebbis Banned Banned

    I already knew this ;)

    Anyway, can we make a clean CE script by changing the bytes to opcode? Does the script still works with Cheat Engine then?
     

Share This Page