Thread: [667/CS2] Decompiled Clientscripts

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1 [667/CS2] Decompiled Clientscripts 
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    378
    Rep Power
    550
    Since the clientscripts me and mgi125 released for 667 a few years are a bit ugly/incomplete/sometimes very hard to read and even have some minor bugs in the decompiled code, I am releasing a much better version of them.


    - Some scripts were not decompiled fully in the old version. This one is complete
    - Few minor bugs in old version fixed that caused some information to be missing about some opcodes
    - Control flow: old version still had the occasional GOTO, they are completely gone in this release
    - Type analysis: There were only a handful of types in the old version. There are many more now (although most of them are basically just integers, but many nice language features can be added thanks to this). Some analysis has been done to automatically infer proper types of scripts, instructions and local variables. This makes the scripts much easier to read.
    - Structs and stack dumps are gone, now properly supports multiple return values
    - Math expressions
    - No redundant parentheses
    - ...

    https://mega.nz/#!R7QTFSCK!WGO2mIOgc...arH0v8yAZ2U_68

    I've also even created a compiler for them. If you'd like a compiled version of your own/edited script, post it here and I will compile it for you. I don't have a language spec for you to follow though, but there are over 5000 examples that you can use as a reference
    The compiler can handle all these example scripts and will be released later at some point, but I'd like to compile some scripts of users here first to properly test it and change a few minor things about the language first before that happens.
    (Also don't ask me how to use your compiled script, I will solely compile it)

    Instruction list:
    https://pastebin.com/JGJJmtkU
    Reply With Quote  
     


  2. #2  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    That's really fucking beautiful.
    I'd love to see the decompiler/compiler you have.. But that ain't going to happen.
    Good job though.
    Attached image
    Reply With Quote  
     

  3. #3  
    Registered Member

    Join Date
    Feb 2014
    Posts
    429
    Thanks given
    5
    Thanks received
    3
    Rep Power
    173
    Great release! 10/10 will use
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Sep 2009
    Posts
    1,919
    Thanks given
    479
    Thanks received
    1,687
    Rep Power
    1262
    Thank you for the instruction list, VERY handy.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Sep 2014
    Posts
    300
    Thanks given
    122
    Thanks received
    91
    Rep Power
    158
    Thanks, great release!
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    378
    Rep Power
    550
    Quote Originally Posted by Kris View Post
    That's really fucking beautiful.
    I'd love to see the decompiler/compiler you have.. But that ain't going to happen.
    Good job though.
    The updated decompiler AND compiler will definitely be released, probably sooner than you think
    Reply With Quote  
     

  7. Thankful users:


  8. #7  
    Registered Member

    Join Date
    Dec 2012
    Posts
    2,999
    Thanks given
    894
    Thanks received
    921
    Rep Power
    2555
    do the instructions shift in every high revision release?
    Attached image
    Reply With Quote  
     

  9. #8  
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    378
    Rep Power
    550
    Quote Originally Posted by Kaleem View Post
    do the instructions shift in every high revision release?
    Yes, since about rev 693
    https://www.rune-server.ee/runescape...crambling.html

    So this is before the scrambling
    Reply With Quote  
     

  10. Thankful user:


  11. #9  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Quote Originally Posted by Vincent View Post
    The updated decompiler AND compiler will definitely be released, probably sooner than you think
    That's surprising. I'm curious to see how it looks; I recently got into the cache a little bit more but scripts are still way out of my league for now. I'm sure a lot of people would be able to benefit from it.
    Attached image
    Reply With Quote  
     

  12. #10  
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    378
    Rep Power
    550
    Quote Originally Posted by Kris View Post
    That's surprising. I'm curious to see how it looks; I recently got into the cache a little bit more but scripts are still way out of my league for now. I'm sure a lot of people would be able to benefit from it.
    Have you looked at the open source decompiler that was already released?
    You can pretty much learn everything there is to learn about CS2 from that.
    My (de)compiler is a continuation of an earlier version of that project we originally did for 667

    https://github.com/Someone52/CS2-Decompiler/

    Converting an AST back to instructions is actually a very simple process (the difficult/annoying part is parsing source code and getting that AST).
    Id say the decompiler is much more complex/interesting since you have to deal with control flow etc.
    Reply With Quote  
     

  13. Thankful users:


Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. CS2 Decompiler [865/NXT branch] opensource
    By mgi125 in forum Downloads
    Replies: 15
    Last Post: 12-17-2016, 04:23 PM
  2. 5378 decompiled client scripts from 667 cache
    By mgi125 in forum Downloads
    Replies: 23
    Last Post: 03-03-2016, 02:24 PM
  3. RS3 [812] 9960 decompiled cs2 scripts
    By mgi125 in forum Downloads
    Replies: 21
    Last Post: 10-08-2015, 04:14 AM
  4. ClientScript 2 Decompiler
    By Velocity in forum Show-off
    Replies: 3
    Last Post: 03-15-2014, 10:32 PM
  5. CS2 Decompiler
    By mgi125 in forum Projects
    Replies: 23
    Last Post: 01-15-2012, 06:52 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •