Results 1 to 6 of 6
  1. #1
    IfOnlyYouKnew's Avatar
    Join Date
    Feb 2021
    Gender
    male
    Location
    Just me, my PC and my idiocy
    Posts
    470
    Reputation
    197
    Thanks
    3,421
    My Mood
    Angelic

    Post Semi-Beginners Guide to Writing an AQW Client [2022]

    Hello. If you are not aware I've been on MPGH a little over a year. In this time I've fixed Grimoire/Cetera/Revenant to at least a minimal working extent. This guide does not teach you how those Clients are written as the methods they use are less versatile than the ones in this tutorial.

    Step One:

    First off its easiest to start with an AQW loader file
    found at: [DONTURL]https://content.aq.com/game/gamefiles/Loader2.swf[/URL]
    I had to link it this way as MPGH does not permit direct download links
    and Browsers without flash support will auto-parse the link as a download-link.

    Step Two:

    Once you have this file you will need to decompile it.
    I recommend SWF Decompiler by SoThink
    found at: https://www.sothink.com/product/flashdecompiler/
    The program will not output the code unless paid for, but I'll be pasting the code for it here.
    You will not need the decompiler but to go through Game code after this, meaning you won't need to buy it,
    I have a purchased copy but didn't for awhile.
    Find the SWF Loader2 you downloaded in the left hand panel and click it.
    On the right hand side check the box next to the swffilename.swf which should in turn check all the boxes the swf has.
    Then above that choose Export FLA/FLEX and export as FLA.

    Step Three: This is probably the most difficult step and I cannot recommend how to get it safely or legally.
    You need Adobe Animate 2021, Yes 2021. This will compile the SWF file needed to make the Client and is your main IDE. Some "Portable" copies won't allow access to the internet and won't work, so make sure you get a good copy.

    Step Four: Find the folder in which you extracted the SWF file to, open the Loader_Spider_fla folder.
    You should see a file named MainTimeline.as
    Open this file with your choice of Text Editor I use Notepad++ you can also use Animate 2021 if you have it.
    Inside will look like the below snippet, the difference only lies in a few lines. If you don't have the paid copy of Sothink then it may just be empty in which case paste the below code replacing anything inside.
    Code:
    package Loader_Spider_fla
    {
        import flash.display.*;
        import flash.events.*;
        import flash.net.*;
        import flash.system.*;
    
        dynamic public class MainTimeline extends MovieClip
        {
            public var mcLoading:MovieClip;
            public var sFile:Object;
            public var sTitle:Object;
            public var sBG:String;
            public var sURL:String = "https://game.aq.com/game/";
            public var isWeb:Boolean;
            public var doSignup:Boolean;
            public var isEU:Boolean;
            public var loginURL:String;
            public var versionURL:String;
            public var loader:URLLoader;
            public var loaderVars:Object;
            public var titleDomain:ApplicationDomain;
    
            public function MainTimeline()
            {
                addFrameScript(0, this.frame1);
                return;
            }// end function
    
            public function onDataComplete(event:Event) : void
            {
                trace("onDataComplete:" + event.target.data);
                var _loc_2:* = JSON.parse(event.target.data);
                this.sFile = _loc_2.sFile + "?ver=" + Math.random();
                this.sTitle = _loc_2.sTitle;
                this.sBG = _loc_2.sBG;
                this.isEU = _loc_2.isEU == "true";
                trace("FlugelHorn = " + this.isEU);
                this.loaderVars = _loc_2;
                this.loadTitle();
                return;
            }// end function
    
            public function loadTitle() : void
            {
                var _loc_1:* = new Loader();
                _loc_1.contentLoaderInfo.addEventListener(Even*****MPLETE, this.onTitleComplete);
                _loc_1.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onTitleError);
                _loc_1.load(new URLRequest(this.sURL + "gamefiles/title/" + this.sBG), new LoaderContext(false, this.titleDomain));
                return;
            }// end function
    
            public function onTitleComplete(event:Event) : void
            {
                trace("Title Loaded");
                this.loadGame();
                return;
            }// end function
    
            public function onTitleError(event:IOErrorEvent) : void
            {
                Loader(event.target.loader).removeEventListener(IOErrorEvent.IO_ERROR, this.onTitleError);
                trace("Title Loading Error: " + event);
                this.loadGame();
                return;
            }// end function
    
            public function loadGame() : void
            {
                var _loc_1:* = new Loader();
                _loc_1.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, this.onProgress);
                _loc_1.contentLoaderInfo.addEventListener(Even*****MPLETE, this.onComplete);
                _loc_1.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onError);
                _loc_1.load(new URLRequest(this.sURL + "gamefiles/" + this.sFile));
                this.mcLoading.strLoad.text = "Loading 0%";
                return;
            }// end function
    
            public function onProgress(event:ProgressEvent) : void
            {
                var _loc_2:* = event.currentTarget.bytesLoaded / event.currentTarget.bytesTotal * 100;
                this.mcLoading.strLoad.text = "Loading " + _loc_2 + "%";
                return;
            }// end function
    
            public function onComplete(event:Event) : void
            {
                var _loc_2:* = stage;
                _loc_2.removeChildAt(0);
                var _loc_3:* = _loc_2.addChild(MovieClip(Loader(event.target.loader).content));
                _loc_3.params.sTitle = this.sTitle;
                _loc_3.params.vars = this.loaderVars;
                _loc_3.params.isWeb = this.isWeb;
                _loc_3.params.sURL = this.sURL;
                _loc_3.params.sBG = this.sBG;
                _loc_3.params.isEU = this.isEU;
                _loc_3.params.doSignup = this.doSignup;
                _loc_3.params.loginURL = this.loginURL;
                _loc_3.params.test = false;
                trace("Game ISWEB? " + _loc_3.params.isWeb);
                trace("Game.isEU = " + _loc_3.params.isEU);
                _loc_3.titleDomain = this.titleDomain;
                return;
            }// end function
    
            public function onError(event:IOErrorEvent) : void
            {
                trace("Preloader IOError: " + event);
                Loader(event.target.loader).removeEventListener(IOErrorEvent.IO_ERROR, this.onError);
                return;
            }// end function
    
            function frame1()
            {
                Security.allowDomain("*");
    			Security.loadPolicyFile("https://game.aq.com/crossdomain.xml");
    			Security.allowInsecureDomain("*");
    			Security.loadPolicyFile("https://aq.com/crossdomain.xml");
    			Security.allowInsecureDomain("*");
    			Security.loadPolicyFile("https://content.aq.com/crossdomain.xml");
    			Security.allowInsecureDomain("*");
    			Security.loadPolicyFile("https://aq.battleon.com/crossdomain.xml");
    			Security.allowInsecureDomain("*");
    			stop();
                this.sURL = "https://game.aq.com/game/";
                this.isWeb = false;
                this.doSignup = false;
                this.isEU = false;
                this.loginURL = this.sURL + "api/login/now";
                try
                {
                    this.isWeb = root.loaderInfo.parameters.isweb == "true";
                    this.doSignup = root.loaderInfo.parameters.dosignup == "true";
                    trace("isWeb? " + this.isWeb + " doSignup=" + this.doSignup);
                }
                catch (e:Error)
                {
                    trace("standalone");
                    isWeb = false;
                    doSignup = false;
                }
                this.versionURL = this.sURL + "api/data/gameversion?ver=" + Math.random();
                trace("versionURL: " + this.versionURL);
                this.loader = new URLLoader();
                this.loader.addEventListener(Even*****MPLETE, this.onDataComplete);
                this.loader.load(new URLRequest(this.versionURL));
                this.titleDomain = new ApplicationDomain();
                return;
            }// end function
    
        }
    }
    Save the file.

    Step Five: Open the Loader.fla file located in the Base folder of your extracted SWF with Animate.
    Once open press the play button in the top right, if you did everything right...the loader should open and load you to the title screen.
    Close it.

    Step Six: In the animate project create an Object by choosing the shape button in the toolbar on the left.
    Ensure that at the bottom of the toolbar now that you have selected the shape you have enabled the Object Drawing so it comes out as one piece.

    Select your object on screen, right-click, choose Convert to Symbol and name something or just leave it as Symbol1.

    Now with the Symbol you just made selected head to the righthand properties panel under Object. Change the top setting to say Movie Clip instead of Graphic. Underneath that name your Movie Clip - such as cheatMenu

    Step Seven: Open the MainTimeline.as and find where the variable are being declared for the class. For example: public var isEU:Boolean;
    you need to add your Menu as an object here. So add this line or similar if you named your object cheatMenu just do the same.
    Code:
     public var cheatMenu:Object;
    Head further into the code until you find: "onComplete(event:Event)"
    Inside of the method below "var _loc_3:* = _loc_2.addChild(MovieClip(Loader(event.target.load er).content));"
    add:
    Code:
    _loc_3.addChild(cheatMenu);
    Save the file.

    Step Eight: In Animate press the play button in the upper right.
    If all's done right, when the game loads this time your Symbol/Menu should stay on screen.
    This means you're ready to start making a cheat menu.

    Step nine: Adding other object and scripts are similar but you can't add more to the _loc_3 so create your new Symbols inside of your menu file. and name them to call them. You will not need to add them as objects like the first one but instead call cheatMenu.NameOfSymbol when trying to access them.

    Step ten: Download a copy of the game from the same link as the loader just replace "Loader2.swf" with "Game3070.swf"
    Use Sothink decompiler to read the game code. The two most useful scriptfiles for starters are Game.as and World.as. Best of luck as I am done typing. Hope this helps someone sorry I am not the best at explaining if you have any questions comment below.
    Contributor: March 14'th, Minionforce: March 15'th, Minion Plus: May 30'th, 2023, Former Staff: #

    Coding Hobbyist | - Current Activity | BattleOn | RotMG |


    Want to make my life better? <3 BTC: 3JoQRjwK28DVGTzL4mYkpjHRBeoFwNFVe7

  2. The Following User Says Thank You to IfOnlyYouKnew For This Useful Post:

    rvteodoro8 (08-05-2022)

  3. #2
    rvteodoro8's Avatar
    Join Date
    Aug 2022
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    My Mood
    Innocent
    I tried to review everything but I got an error in step 5 when I press the play button.


    EDIT: I got it working in a private server! Thanks! Im willing to learn more how to make a bot here
    Attached Thumbnails Attached Thumbnails
    image_2022-08-05_231857882.png  

    Last edited by rvteodoro8; 08-05-2022 at 10:06 AM.

  4. The Following User Says Thank You to rvteodoro8 For This Useful Post:

    Gemonide (05-25-2023)

  5. #3
    SkyNezzz's Avatar
    Join Date
    Mar 2013
    Gender
    female
    Posts
    8
    Reputation
    10
    Thanks
    0
    to create a private server? can you help me with that mate

  6. #4
    SunnyGuy's Avatar
    Join Date
    Feb 2023
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    Thank you. That's what I was looking for. I'm just starting my acquaintance with AQW so I'm looking for information.

  7. #5
    CoffeeMorena's Avatar
    Join Date
    Feb 2023
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    1

    One smol issue

    Everytime I press the debug/play button in Animate, it says this error:

    Code:
    Attempting to launch and connect to Player using URL E:\Loader2\~Loader2.swf
    [SWF] E:\Loader2\~Loader2.swf - 19916 bytes after decompression
    *** Security Sandbox Violation ***
    Connection to https://game.aq.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    *** Security Sandbox Violation ***
    Connection to https://aq.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    *** Security Sandbox Violation ***
    Connection to https://content.aq.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    *** Security Sandbox Violation ***
    Connection to https://aq.battleon.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    isWeb? false doSignup=false
    versionURL: https://game.aq.com/game/api/data/gameversion?ver=0.703343412373215
    *** Security Sandbox Violation ***
    Connection to https://game.aq.com/game/api/data/gameversion?ver=0.703343412373215 halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    SecurityError: Error #2028: Local-with-filesystem SWF file file:///E|/Loader2/%7ELoader2.swf cannot access Internet URL https://game.aq.com/game/api/data/gameversion?ver=0.703343412373215.
    	at flash.net::URLStream/load()
    	at flash.net::URLLoader/load()
    	at Loader_Spider_fla::MainTimeline/frame1()[E:\Loader2\Loader_Spider_fla\MainTimeline.as:148]
    Cannot display source code at this location.
    the Loader2.swf somehow keeps getting blocked for being untrusted. When I open the .swf file in its folder, it opens up and has the cheatMenu I added but only stays in the loading screen. Is that fine?

    Last edit: Got it working, just had to Clear Publish Cache and Test Movie.
    Last edited by CoffeeMorena; 02-04-2023 at 07:38 AM.

  8. #6
    Tonny2515's Avatar
    Join Date
    Feb 2023
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by CoffeeMorena View Post
    Everytime I press the debug/play button in Animate, it says this error:

    Code:
    Attempting to launch and connect to Player using URL E:\Loader2\~Loader2.swf
    [SWF] E:\Loader2\~Loader2.swf - 19916 bytes after decompression
    *** Security Sandbox Violation ***
    Connection to https://game.aq.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    *** Security Sandbox Violation ***
    Connection to https://aq.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    *** Security Sandbox Violation ***
    Connection to https://content.aq.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    *** Security Sandbox Violation ***
    Connection to https://aq.battleon.com/crossdomain.xml halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    isWeb? false doSignup=false
    versionURL: https://game.aq.com/game/api/data/gameversion?ver=0.703343412373215
    *** Security Sandbox Violation ***
    Connection to https://game.aq.com/game/api/data/gameversion?ver=0.703343412373215 halted - not permitted from file:///E|/Loader2/%7ELoader2.swf
    -- Untrusted local SWFs may not contact the Internet.
    SecurityError: Error #2028: Local-with-filesystem SWF file file:///E|/Loader2/%7ELoader2.swf cannot access Internet URL https://game.aq.com/game/api/data/gameversion?ver=0.703343412373215.
    	at flash.net::URLStream/load()
    	at flash.net::URLLoader/load()
    	at Loader_Spider_fla::MainTimeline/frame1()[E:\Loader2\Loader_Spider_fla\MainTimeline.as:148]
    Cannot display source code at this location.
    the Loader2.swf somehow keeps getting blocked for being untrusted. When I open the .swf file in its folder, it opens up and has the cheatMenu I added but only stays in the loading screen. Is that fine?

    Last edit: Got it working, just had to Clear Publish Cache and Test Movie.
    Great guide, especially for beginners with no experience. Everything is very detailed and clearly described. I was looking for this information as I am currently finishing my internship at a software development firm and I need to prepare a report. But since I do not have special writing skills and a sufficient level of professionalism, I do not even know where to start. It's harder than I thought. The only thing that can be done is to ask help with internship report qualified professionals who are experienced in writing such complex content. I have not used such services before, but I think that everything will work out. And I will receive a report of sufficient quality that will allow me to get the desired job in the future.
    Last edited by Tonny2515; 02-11-2023 at 07:21 AM.

Similar Threads

  1. [Tutorial] {Complete} Beginners Guide To Hacking
    By MagixAries in forum MapleStory Tutorial & Guides
    Replies: 31
    Last Post: 01-08-2016, 10:14 PM
  2. A Texture Guide For Beginners.
    By handford in forum Combat Arms EU Mods & Rez Modding Help
    Replies: 9
    Last Post: 01-04-2011, 05:15 AM
  3. PHP Beginners Guide #1
    By yearupie in forum PHP Programming
    Replies: 3
    Last Post: 03-11-2010, 04:36 AM
  4. PEPSI's gun guide beginners-pro
    By pepsi233 in forum Combat Arms Discussions
    Replies: 2
    Last Post: 11-28-2009, 07:05 AM
  5. The Ultimate Guide(For Beginners): Reversing
    By rwkeith in forum Assembly
    Replies: 2
    Last Post: 07-27-2009, 11:02 AM