Page 1 of 6 123 ... LastLast
Results 1 to 15 of 86
  1. #1
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,333
    Reputation
    523
    Thanks
    5,239

    How To Make An Adventure Quest Worlds (AQW) Private Server Trainer

    Hi everyone,

    Update: The example code given for Augoeides has been patched and is no longer working. The rest of the tutorial is still applicable to other servers, though.

    Update 2: it appears many private servers are using glitchy/erroneous code, or are implementing security features, that sometimes makes creating the loader code much more of a challenge. Some private servers are still worth trying but sadly it is a case of "don't get your hopes up". Still feel free to contact me if you need any help.


    So this has been requested so many times in the past, and I've helped people with it individually - but never made a public tutorial about it.
    It's a very simple process if you have any coding experience, but please respect learners/beginners who have no idea where to start.
    If you only care about making an AQWORLDS trainer, click here.

    Introduction

    In any Flash trainer we externally load the game's SWF. We do this with the "Loader Code".
    Let's look at the loader code:
     

    Code:
    import flash.events.Event;
     
    //Comments by Oliboli8769
     
    Security.allowDomain("*");
    //URLs as Strings used for easiness
    var sURL1 = "https://aqworldscdn.aq.com/game/";
    var sURL2 = "https://cdn.aqworlds.com/game/";
    var sFile; //used to store game version string
    var versionLoader: URLLoader;
    var Game: Object;
    var swfContext: LoaderContext;
    var swfLoader: Loader;
    var swfRequest: URLRequest;
     
    GetVersion(); //starts game load
     
    function GetVersion() {
            //checks for most recent game version from ASP file
            versionLoader = new URLLoader();
            versionLoader.addEventListener(Even*****MPLETE, onVersionComplete); //adds event listener for when the ASP is loaded
            versionLoader.load(new URLRequest(sURL1 + "gameversion.asp")); //same as https://aqworldscdn.aq.com/game/gameversion.asp
    }
    function onVersionComplete(param1: Event) {
            //ASP file has now been fully loaded
            var vars: URLVariables;
            vars = new URLVariables(param1.target.data); //reads variables held on loaded ASP
            if (vars.status == "success") //checks the 'status' var on ASP
            {
                    //after confirmation
                    sFile = vars.sFile; //reads game version linkage and saves as the variable sFile
                    LoadGame(); //now the version is found, we can load the game
            }
    }
    function LoadGame() {
            swfContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
            swfLoader = new Loader();
            swfRequest = new URLRequest(sURL2 + "gamefiles/" + sFile); //using sFile from before as updated game linkage
            swfLoader.contentLoaderInfo.addEventListener(Even*****MPLETE, onGameComplete); //adds event listener for the game load
            swfLoader.contentLoaderInfo.addEventListener(flash.events.ProgressEvent.PROGRESS, onGameProgress); //adds event listener for how much the game has loaded
            swfLoader.load(swfRequest, swfContext);
            stage.quality = StageQuality.LOW; //sets stage quality to low, possibly reducing lag (optional)
    }
    function onGameComplete(loadEvent: Event) {
            stage.addChildAt(loadEvent.currentTarge*****ntent, 0); //adds the loaded game content to the stage
            loadEvent.currentTarge*****ntent.y = 0.0;
            loadEvent.currentTarge*****ntent.x = 0.0;
            Game = Object(loadEvent.currentTarge*****ntent); //stores loaded content onto the Object Game
            Game.params.sURL2 = sURL2;
            Game.params.sTitle = "Trainer Tutorial By OB";
    }
    function onGameProgress(arg1: flash.events.ProgressEvent): void {
            //this can be used for progress bars/loaders before trainers
            var percentage: *= arg1.bytesLoaded / arg1.bytesTotal;
            trace(percentage * 100); //traces how much the game has loaded as a percentage
            return;
    }
    function SendPacket(packet: String) {
            var args: Array = new Array;
            var tempArg: String = "";
            var var1: String = "";
            var done1: Boolean = false;
            var var2: String = "";
            var done2: Boolean = false;
            var done3: Boolean = false;
            var done4: Boolean = false;
     
            var i: Number = 1;
     
            while (i < packet.length) {
                    if (packet.charAt(i) != "%") {
                            if (done1 && !done2) {
                                    var1 += packet.charAt(i);
                            } else if (done1 && done2 && !done3) {
                                    var2 += packet.charAt(i);
                            } else if (done1 && done2 && done3 && done4) {
                                    tempArg += packet.charAt(i);
                            }
                    } else {
                            if (!done1) {
                                    done1 = true;
                            } else if (done1 && !done2) {
                                    done2 = true;
                            } else if (done1 && done2 && !done3) {
                                    done3 = true;
                            } else if (done1 && done2 && done3 && !done4) {
                                    done4 = true;
                            } else if (done1 && done2 && done3 && done4) {
                                    args.push(tempArg);
                                    tempArg = "";
                            }
                    }
     
                    i++;
            }
     
            var room: String = Game.world.curRoom;
     
            switch (var2) {
                    case "afk":
                            room = "1";
                            break;
                    case "hi":
                            room = "1";
                            break;
                    case "gar":
                            room = "1";
                            break;
                    case "cmd":
                            room = "1";
                            break;
            }
     
            trace("Zone Master: " + var1);
            trace("Packet Type: " + var2);
            trace("Arguements: " + args);
            Game.sfc.sendXtMessage(var1, var2, args, "str", room);
    }
    stop();


    As you can see, just scanning over the code, there are a few main steps:
    1. Requesting for the latest game version - GetVersion()
    2. Receiving and reading the latest game version - onVersionComplete()
    3. Using the game version, requesting to load the game - LoadGame()
    4. Receiving the loaded game - onGameComplete();


    For now, we can ignore the functions onGameProgress(), which is just a fancy but unnecessary function for tracking how much of the game has loaded.
    We can also ignore the function SendPacket(), which is used for hacking the game later on.

    Anyway, cutting to what you really want to know. The load for a private server is the exact same process as above, with possibly a few hiccups.
    All we need to do fundamentally, is change the links that the 'loader code' actually loads.
    This concerns the variables sURL1 and sURL2 in the code, and a few other parts where there is clearly a URL being loaded.

    Looking at the code for AQWorlds, we end up with this:
    Version Link: https://game.aqworlds.com/game/gameversion.asp
    *Game Link: https://aqworldscdn.aq.com/game/game...e_20160429.swf
    *Note that the string of numbers at the end will change, because it is what has been loaded from the version link - the game's version.

    Finding these links, for private servers

    1. Open Google Chrome (or another browser with the same functionality)
    2. Go to the private server you want to create a bot for, to where you would normally log-in.
    3. At the top of your screen, go to View>Developer>Developer Tools.
    4. If you struggle with the step above, alternatively, you can right click anywhere on the page and click "Inspect".
    5. Once you have the Developer window open, make sure you have the "Network" tab selected.
    6. Go back to the window of the game, and refresh the page, still keeping the Developer window open.
    7. You should start to see sources for the page load appear under the Network tab that you've selected.
    8. Amongst all of these links, look for links similar to the ones used for AQWorlds above (a link ending in gameversion.asp, and an SWF link ending in a string of numbers - a date)
    9. Save these on a notepad somewhere


    Using The Links
    Okay so as an example, I'm going to be using the private server Augoeides/HiddenProject.
    After following the steps above, I have these two links:

    Version Link: https://www.augoeides.org/gameversion.asp
    Game Link: https://www.augoeides.org/gamefiles/....16-HP.Rr9.swf

    Now, it's way too confusing to explain this process. So here's the loader code for HiddenProject, along with annotations to explain what I've done.

     

    Code:
    import flash.events.Event;
    
    //Comments by Oliboli8769 - ADAPTED FOR HIDDENPROJECT, CHANGES IN CAPITALS
    //Version Link: https://www.augoeides.org/gameversion.asp
    //Game Link: https://www.augoeides.org/gamefiles/Client-04.24.16-HP.Rr9.swf
    
    Security.allowDomain("*");
    //URLs as Strings used for easiness
    var sURL1 = "https://www.augoeides.org/"; //CHANGED THIS LINK FOR VERSION
    var sURL2 = "https://www.augoeides.org/"; //HAPPENS TO BE THE SAME AS sURL1, THESE VARIABLES AREN'T NECESSARY, BUT MAKE IT CLEANER
    var sFile; //used to store game version string
    var versionLoader: URLLoader;
    var Game: Object;
    var swfContext: LoaderContext;
    var swfLoader: Loader;
    var swfRequest: URLRequest;
    
    GetVersion(); //starts game load
    
    function GetVersion() {
        //checks for most recent game version from ASP file
        versionLoader = new URLLoader();
        versionLoader.addEventListener(Even*****MPLETE, onVersionComplete); //adds event listener for when the ASP is loaded
        versionLoader.load(new URLRequest(sURL1 + "gameversion.asp")); //USING SURL1 FOR GAME VERSION, SAME AS https://www.augoeides.org/gameversion.asp
    }
    function onVersionComplete(param1: Event) {
        //ASP file has now been fully loaded
        var vars: URLVariables;
        vars = new URLVariables(param1.target.data); //reads variables held on loaded ASP
        //if (vars.status == "success") //STATUS CHECK REMOVED FOR HIDDENPROJECT, NOT APPLICABLE
        sFile = vars.sFile; //reads game version linkage and saves as the variable sFile
        LoadGame(); //now the version is found, we can load the game
    }
    function LoadGame() {
        swfContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
        swfLoader = new Loader();
        swfRequest = new URLRequest(sURL2 + "gamefiles/" + sFile); //USES sFILE VERSION LOADED FROM VERSION LINK
        swfLoader.contentLoaderInfo.addEventListener(Even*****MPLETE, onGameComplete); //adds event listener for the game load
        swfLoader.contentLoaderInfo.addEventListener(flash.events.ProgressEvent.PROGRESS, onGameProgress); //adds event listener for how much the game has loaded
        swfLoader.load(swfRequest, swfContext);
        stage.quality = StageQuality.LOW; //sets stage quality to low, possibly reducing lag (optional)
    }
    function onGameComplete(loadEvent: Event) {
        stage.addChildAt(loadEvent.currentTarge*****ntent, 0); //adds the loaded game content to the stage
        loadEvent.currentTarge*****ntent.y = 0.0;
        loadEvent.currentTarge*****ntent.x = 0.0;
        Game = Object(loadEvent.currentTarge*****ntent); //stores loaded content onto the Object Game
        //Game.params.sURL2 = sURL2;
        Game.params.sTitle = "HiddenProject Is Loaded";
        Game.params.strCode = "lol"; //EXTRA LINE ADDED TO BYPASS THEIR 'PATCH', NOT NEEDED ON OTHER SERVERS
    }
    function onGameProgress(arg1: flash.events.ProgressEvent): void {
        //this can be used for progress bars/loaders before trainers
        var percentage: *= arg1.bytesLoaded / arg1.bytesTotal;
        trace(percentage * 100); //traces how much the game has loaded as a percentage
        return;
    }
    function SendPacket(packet: String) {
            var args: Array = new Array;
            var tempArg: String = "";
            var var1: String = "";
            var done1: Boolean = false;
            var var2: String = "";
            var done2: Boolean = false;
            var done3: Boolean = false;
            var done4: Boolean = false;
     
            var i: Number = 1;
     
            while (i < packet.length) {
                    if (packet.charAt(i) != "%") {
                            if (done1 && !done2) {
                                    var1 += packet.charAt(i);
                            } else if (done1 && done2 && !done3) {
                                    var2 += packet.charAt(i);
                            } else if (done1 && done2 && done3 && done4) {
                                    tempArg += packet.charAt(i);
                            }
                    } else {
                            if (!done1) {
                                    done1 = true;
                            } else if (done1 && !done2) {
                                    done2 = true;
                            } else if (done1 && done2 && !done3) {
                                    done3 = true;
                            } else if (done1 && done2 && done3 && !done4) {
                                    done4 = true;
                            } else if (done1 && done2 && done3 && done4) {
                                    args.push(tempArg);
                                    tempArg = "";
                            }
                    }
     
                    i++;
            }
     
            var room: String = Game.world.curRoom;
     
            switch (var2) {
                    case "afk":
                            room = "1";
                            break;
                    case "hi":
                            room = "1";
                            break;
                    case "gar":
                            room = "1";
                            break;
                    case "cmd":
                            room = "1";
                            break;
            }
     
            trace("Zone Master: " + var1);
            trace("Packet Type: " + var2);
            trace("Arguements: " + args);
            Game.world****otClass.sfc.sendXtMessage(var1, var2, args, "str", room);
    }
    stop();


    Okay so I hope the annotations on the code are enough to help you understand. This is an extremely hard tutorial to make, and in hindsight, I probably should have made a video - but oh well.

    Please note that the extra line (Game.params.strCode = "lol") is only necessary for Augoeides/HiddenProject and not any other private server.

    What to do from here?
    Follow the tutorial linked below. Because you're hacking a private server, 99% of the time the code for AQWorlds is identical. Don't worry, that tutorial is much nicer.
    Full AQWorlds Trainer Tutorial: https://www.mpgh.net/forum/showthread.php?t=891807

    Phew, thank god that's over.
    Oliboli8769

    @emoric28 thanks for the suggestion. Keep them coming!!

  2. The Following 4 Users Say Thank You to Oliboli8769 For This Useful Post:

    DocPrimo (05-29-2020),emoric28 (05-19-2016),Hunter (05-19-2016),Lexox (06-07-2017)

  3. #2
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Depths Of My Mind.
    Posts
    17,468
    Reputation
    3771
    Thanks
    6,159
    My Mood
    Cheerful
    Thanks for your hard work once again, honestly.

    /Stuck.
    Last edited by Hunter; 05-22-2016 at 10:51 AM.

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

    Oliboli8769 (05-19-2016)

  5. #3
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,333
    Reputation
    523
    Thanks
    5,239
    Quote Originally Posted by Hunter View Post
    Thanks for your hard work once again, honestly.
    Whatever keeps people happy
    Think this is the fastest I've ever worked, suggested only an hour ago

  6. #4
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    Depths Of My Mind.
    Posts
    17,468
    Reputation
    3771
    Thanks
    6,159
    My Mood
    Cheerful
    Quote Originally Posted by Oliboli8769 View Post
    Whatever keeps people happy
    Think this is the fastest I've ever worked, suggested only an hour ago
    You must work at the speed of light then!

  7. The Following User Says Thank You to Hunter For This Useful Post:

    Oliboli8769 (05-19-2016)

  8. #5
    emoric28's Avatar
    Join Date
    May 2012
    Gender
    male
    Location
    ^
    Posts
    170
    Reputation
    29
    Thanks
    1,252
    Thank you very much! I can finally kill some time with this

  9. The Following User Says Thank You to emoric28 For This Useful Post:

    Oliboli8769 (05-19-2016)

  10. #6
    meme's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Location
    42.434720, -83.985
    Posts
    8,047
    Reputation
    1403
    Thanks
    2,410
    My Mood
    Lurking
    Great tutorial, I might spend spend some time on private servers since I'm permanently IP banned from the main game.
    Quote Originally Posted by Hennessy View Post
    meme is shittiest general mod ever.
     
    dd/mm/yy
    Member | 28/1/16 - ∞
    Premium | 20/3/16 - ∞
    BattleOn Minion | 24/12/17 - 21/7/21
    Minion+ | 4/4/19 - 11/12/20
    Other MMMORPG Minion | 10/11/19 - 21/7/21
    Publicist | 7/2/20 - Unknown
    Minecraft Minion | 10/12/20 - 21/7/21
    General Minion | 10/12/20 - 21/7/21

    Moderator | 11/12/20 - 21/7/21
    Princess | 5/1/21 - 30/6/21
    Global Moderator | 21/7/21 - ∞
    Pharaoh | 30/1/22 - ∞
    Trusted Member | 16/3/23 - ∞

  11. The Following User Says Thank You to meme For This Useful Post:

    Oliboli8769 (05-21-2016)

  12. #7
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,333
    Reputation
    523
    Thanks
    5,239
    Quote Originally Posted by meme View Post
    Great tutorial, I might spend spend some time on private servers since I'm permanently IP banned from the main game.
    Join the club

  13. The Following User Says Thank You to Oliboli8769 For This Useful Post:

    DocPrimo (05-29-2020)

  14. #8
    mostafa124's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    The game doesnt load when i put in the code any help?

  15. #9
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,333
    Reputation
    523
    Thanks
    5,239
    Quote Originally Posted by mostafa124 View Post
    The game doesnt load when i put in the code any help?
    Which code? Do any errors appear?

  16. #10
    mostafa124's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    Well it says that a semicolon and rightbrace is missing
    here is a SS: prntscr.com/b7wc1l

  17. #11
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,333
    Reputation
    523
    Thanks
    5,239
    Quote Originally Posted by mostafa124 View Post
    Well it says that a semicolon and rightbrace is missing
    here is a SS: prntscr.com/b7wc1l
    MPGH has censored some of the code.
    It says in the code:
    Code:
    Game.world****otClass.sfc.sendXtMessage(var1, var2, args, "str", room);
    The stars are because of MPGH's censor, mistaking it for advertising etc.

    To fix this, just change this line to
    Code:
    Game.sfc.sendXtMessage(var1, var2, args, "str", room);
    Enjoy

  18. The Following User Says Thank You to Oliboli8769 For This Useful Post:

    Hunter (05-25-2016)

  19. #12
    mostafa124's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    Thx

    Is there a code i can put in the "Hacks" layer that allows me to have more quests? Example: 31, 32, 33?
    I could do it on Hyperderp and its can be pretty handy sometimes.

  20. #13
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,333
    Reputation
    523
    Thanks
    5,239
    Quote Originally Posted by mostafa124 View Post
    Thx

    Is there a code i can put in the "Hacks" layer that allows me to have more quests? Example: 31, 32, 33?
    I could do it on Hyperderp and its can be pretty handy sometimes.
    What do you mean by "more quests"?
    Please follow the full tutorial here, the quest load function will do what I think you're asking for: https://www.mpgh.net/forum/showthread.php?t=891807

  21. #14
    PhoenixPrime's Avatar
    Join Date
    Dec 2014
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    42
    My Mood
    Sad
    How do i convert it to an .exe file? I have no experience in these stuffs sorry....

  22. #15
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,333
    Reputation
    523
    Thanks
    5,239
    Quote Originally Posted by PhoenixPrime View Post
    How do i convert it to an .exe file? I have no experience in these stuffs sorry....
    There's lots of applications that do it. Try SWFKit, Flajector, FFDec etc.
    I use FFDec because I find it quick.

    - - - Updated - - -
    @Hunter please could you add a note to the top of this thread? The Augoeides loader is outdated because of the patch, so just a note something like:

    "The example code given for Augoeides has been patched and is no longer working. The rest of the tutorial is still applicable to other servers, though."

Page 1 of 6 123 ... LastLast

Similar Threads

  1. [Info] Adventure Quest Worlds (AQW) Shop ID's [Request Them Here]
    By Hunter in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 201
    Last Post: 12-11-2017, 04:35 PM
  2. [Info] Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers Rules & Guidelines
    By Hunter in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 4
    Last Post: 11-28-2016, 05:05 PM
  3. Adventure Quest Worlds - AQW - what to do with money?
    By aviv0404 in forum Adventure Quest Worlds (AQW) Discussions
    Replies: 4
    Last Post: 12-13-2014, 07:41 PM