Results 1 to 4 of 4
  1. #1
    JustAnoobROTMG's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    1,916
    Reputation
    185
    Thanks
    18,230

    SWF Modification : Change the default Keymapping

    Why ? :
    * Because i often clear flash cache and i am tired to remap keys each time i had do it
    * Also because they changed the default nexus key which was fine for me.
    * Because i can

    Tools :
    * RABDCASM
    * Astrogrep
    * (Optional) A tool to have a better understanding of the code, FFDEC or As3Sorcerer


    Some words :
    * This client is a 16.0.
    * For the sake of the tutorial, we will only change the default nexus key
    * But you can change any game keys
    * This wont have any effect until you delete your flash cache or click on "reset to default" on the option panel you have modified a key.


    How to :

    First you have to open the Parameters.class.asasm file and find what method is runned when you click on the "reset to default" button
    Its easy, you will find many string related to game keys like "moveLeft", moveup, moveright, etc...

    You should find many sequence of codes looking like this :

    Code:
         findpropstrict      QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG")
         pushstring          "moveLeft"
         getlex              QName(PackageNamespace("com.company.util"), "_-9R")
         getproperty         QName(PackageNamespace("", "#0"), "A")
         callpropvoid        QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG"), 2
    
         findpropstrict      QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG")
         pushstring          "moveRight"
         getlex              QName(PackageNamespace("com.company.util"), "_-9R")
         getproperty         QName(PackageNamespace("", "#0"), "D")
         callpropvoid        QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG"), 2
    
         findpropstrict      QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG")
         pushstring          "moveUp"
         getlex              QName(PackageNamespace("com.company.util"), "_-9R")
         getproperty         QName(PackageNamespace("", "#0"), "W")
         callpropvoid        QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG"), 2
    moveUp is the name of the action. Its self-explanatory.
    W is the NAME OF THE KEY assigned to the action ..
    ("com.company.util"), "_-9R") is the file name where the KEYCODES are DEFINED
    > Com/company/util/_-9R.class.asasm

    Usually, the name of the key is simple : the number of the key (0..9), "BACKSPACE", "ENTER", the letter "A".."Z".
    Guess what? W is the letter W.

    If we look into Com/company/util/_-9R.class.asasm

    Code:
        findproperty        QName(PackageNamespace("", "#0"), "W")
        pushbyte            87
        initproperty        QName(PackageNamespace("", "#0"), "W")
    the "W" name has the value 87, which is the Flash keycode for the "W" keyboard key

    Flash ActionScript Key Codes

    According to this page, the Flash Keycode for "Insert" is 45..

    ->To use the Insert key, we need to find in _-9R.class.asasm the name initializated at 45.
    It is _-1Dz

    Code:
    findproperty        QName(PackageNamespace("", "#0"), "_-1Dz")
    pushbyte            45
    initproperty        QName(PackageNamespace("", "#0"), "_-1Dz")
    ->Then we must modify Parameters.class.asasm

    Code:
         findpropstrict      QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG")
         pushstring          "escapeToNexus"  ; This is the definition of the nexus key
         getlex              QName(PackageNamespace("com.company.util"), "_-9R")
         getproperty       QName(PackageNamespace("", "#0"), "_-1Cw") ; -_9R.1cw = 18, Flash keycode for Alt
         callpropvoid       QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG"), 2
    To
    Code:
         findpropstrict      QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG")
         pushstring          "escapeToNexus"  ; This is the definition of the nexus key
         getlex              QName(PackageNamespace("com.company.util"), "_-9R")
         getproperty       QName(PackageNamespace("", "#0"), "_-1Dz") ; The "Insert" name we 've just found
         callpropvoid       QName(PrivateNamespace("*", "com.company.assembleegameclient.parameters:Parameters#0"), "_-1gG"), 2
    Then recompile, and enjoy.

    -> THOU SHALL ONLY MODIFY "PARAMETERS.class.asasm" FILE
    Due to a recent DMCA takedown attempt we had to remove Faintmako brain. Please do not paid attention to what he say or do.


  2. #2
    Trollaux's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    2,074
    Reputation
    137
    Thanks
    792
    Thanks! This is awesome.
    d e a d b o y s
    Quote Originally Posted by Dave84311 View Post
    What do you call a troll with shitty jokes?
    Trollaux
    Quote Originally Posted by Kyeran View Post
    Foot job with lots of oil.
    Quote Originally Posted by Kyeran View Post
    If she's 12, I'm 12.

  3. #3
    CrazyJani's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    2,475
    Reputation
    170
    Thanks
    15,666
    I'd also like to make that "Allow rotation" is on by default, tutorial pls

  4. #4
    JoeKerr19293's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Cheeky
    Hm i like thuis

Similar Threads

  1. [Help Request] How to change the default gateway
    By UpperTame in forum Minecraft Help
    Replies: 3
    Last Post: 06-04-2013, 02:18 AM
  2. [Request] Tutorial how to change the swf client to default to low quality
    By gieREyXXdM in forum Realm of the Mad God Help & Requests
    Replies: 1
    Last Post: 10-04-2012, 05:07 AM
  3. [TUT] Change the default icon in Visual Studios :)
    By skiiiz in forum Visual Basic Programming
    Replies: 5
    Last Post: 08-17-2010, 03:26 AM
  4. change all the default weapons
    By Elocrypt. in forum Combat Arms Mods & Rez Modding
    Replies: 6
    Last Post: 03-02-2010, 06:22 AM
  5. hohow would i change the default rifle to a nx rifle
    By mongoose5697 backup in forum Combat Arms Mod Discussion
    Replies: 1
    Last Post: 12-06-2009, 10:53 PM