Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,197
    Reputation
    455
    Thanks
    3,821

    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.

    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 = "http://aqworldscdn.aq.com/game/";
    var sURL2 = "http://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(Event.COMPLETE, onVersionComplete); //adds event listener for when the ASP is loaded
            versionLoader.load(new URLRequest(sURL1 + "gameversion.asp")); //same as http://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(Event.COMPLETE, 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.currentTarget.content, 0); //adds the loaded game content to the stage
            loadEvent.currentTarget.content.y = 0.0;
            loadEvent.currentTarget.content.x = 0.0;
            Game = Object(loadEvent.currentTarget.content); //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: http://game.aqworlds.com/game/gameversion.asp
    *Game Link: http://aqworldscdn.aq.com/game/gamef...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: http://www.augoeides.org/gameversion.asp
    Game Link: http://www.augoeides.org/gamefiles/C....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: http://www.augoeides.org/gameversion.asp
    //Game Link: http://www.augoeides.org/gamefiles/Client-04.24.16-HP.Rr9.swf
    
    Security.allowDomain("*");
    //URLs as Strings used for easiness
    var sURL1 = "http://www.augoeides.org/"; //CHANGED THIS LINK FOR VERSION
    var sURL2 = "http://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(Event.COMPLETE, onVersionComplete); //adds event listener for when the ASP is loaded
        versionLoader.load(new URLRequest(sURL1 + "gameversion.asp")); //USING SURL1 FOR GAME VERSION, SAME AS http://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(Event.COMPLETE, 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.currentTarget.content, 0); //adds the loaded game content to the stage
        loadEvent.currentTarget.content.y = 0.0;
        loadEvent.currentTarget.content.x = 0.0;
        Game = Object(loadEvent.currentTarget.content); //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: http://www.mpgh.net/forum/showthread.php?t=891807

    Phew, thank god that's over.
    Oliboli8769

    @emoric28 thanks for the suggestion. Keep them coming!!
    Last edited by Hunter; 06-22-2016 at 08:41 AM. Reason: Requested.

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

    emoric28 (05-19-2016),[MPGH]Hunter (05-19-2016)

  3. #2
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    16,262
    Reputation
    3435
    Thanks
    5,439
    My Mood
    Happy
    Thanks for your hard work once again, honestly.

    /Stuck.
    Last edited by Hunter; 05-22-2016 at 11:51 AM.
    If you need help with anything, feel free to PM/VM me about it.


     
    hunterr.94

    Please make sure to always ask me for a confirmation PM/VM before proceeding with any deal that supposedly involves me.

     



    MPGH History:
    Premium Seller - 11/17/16
    News Force - Global News - 11/16/16
    Global Moderator - 10/02/16
    Call of Duty Minion - 07/17/16 - 10/02/16
    Moderator - 06/21/16 - 10/02/16
    News Force Editor - 06/16/16 - 07/17/16
    News Force Interviewer - 04/11/16 - 07/17/16
    BattleOn Minion - 03/05/16 - 10/02/16
    News Force - Section of the Week - 01/31/16 - 02/02/16
    League of Legends Minion - 12/11/15 - 10/02/16
    News Force Editor - 11/27/15 - 02/02/16
    Steam Minion - 11/24/15 - 10/02/16
    News Force - User News - 11/22/15 - 02/02/16
    Pharaoh - 11/07/15 - 12/13/15
    Alliance of Valiant Arms (AVA) Minion - 10/21/15 - 10/02/16
    Event Management Publicist - 09/14/15
    News Force Interviewer - 08/02/15 - 02/02/16
    Donator - 08/01/14
    Member - 12/03/13

  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,197
    Reputation
    455
    Thanks
    3,821
    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
    Last edited by Hunter; 05-22-2016 at 11:52 AM.

  6. #4
    Hunter's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    16,262
    Reputation
    3435
    Thanks
    5,439
    My Mood
    Happy
    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!
    If you need help with anything, feel free to PM/VM me about it.


     
    hunterr.94

    Please make sure to always ask me for a confirmation PM/VM before proceeding with any deal that supposedly involves me.

     



    MPGH History:
    Premium Seller - 11/17/16
    News Force - Global News - 11/16/16
    Global Moderator - 10/02/16
    Call of Duty Minion - 07/17/16 - 10/02/16
    Moderator - 06/21/16 - 10/02/16
    News Force Editor - 06/16/16 - 07/17/16
    News Force Interviewer - 04/11/16 - 07/17/16
    BattleOn Minion - 03/05/16 - 10/02/16
    News Force - Section of the Week - 01/31/16 - 02/02/16
    League of Legends Minion - 12/11/15 - 10/02/16
    News Force Editor - 11/27/15 - 02/02/16
    Steam Minion - 11/24/15 - 10/02/16
    News Force - User News - 11/22/15 - 02/02/16
    Pharaoh - 11/07/15 - 12/13/15
    Alliance of Valiant Arms (AVA) Minion - 10/21/15 - 10/02/16
    Event Management Publicist - 09/14/15
    News Force Interviewer - 08/02/15 - 02/02/16
    Donator - 08/01/14
    Member - 12/03/13

  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
    52
    Reputation
    10
    Thanks
    74
    My Mood
    Busy
    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
    meme town
    Posts
    943
    Reputation
    81
    Thanks
    231
    Great tutorial, I might spend spend some time on private servers since I'm permanently IP banned from the main game.

  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,197
    Reputation
    455
    Thanks
    3,821
    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. #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?

  14. #9
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,197
    Reputation
    455
    Thanks
    3,821
    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?

  15. #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

  16. #11
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,197
    Reputation
    455
    Thanks
    3,821
    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

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

    [MPGH]Hunter (05-25-2016)

  18. #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.

  19. #13
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,197
    Reputation
    455
    Thanks
    3,821
    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: http://www.mpgh.net/forum/showthread.php?t=891807

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

  21. #15
    Oliboli8769's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    Boliworlds
    Posts
    2,197
    Reputation
    455
    Thanks
    3,821
    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 2 12 LastLast

Similar Threads

  1. [Info] Adventure Quest Worlds (AQW) Bot Requests
    By Hunter in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 108
    Last Post: 7 Hours Ago, 01:46 AM
  2. [Info] Adventure Quest Worlds (AQW) Shop ID's [Request Them Here]
    By Hunter in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 76
    Last Post: 1 Day Ago, 10:49 PM
  3. [Info] Adventure Quest Worlds (AQW) Shop ID's [Release Them Here]
    By Hunter in forum Adventure Quest Worlds (AQW) Hacks / Cheats / Trainers
    Replies: 39
    Last Post: 1 Day Ago, 06:02 PM
  4. [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: 1 Week Ago, 06:05 PM
  5. 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, 08:41 PM