DebateFort - Where Warriors Come To Debate
RAGECRY - Funny, Amusing, Interesting, Trending & Viral Videos and Images
GameOrc - Free Flash Games Online
Results 1 to 4 of 4
  1. #1
    Dual-Keyboard Member
    MPGH Member
    PPCINJ's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    NRF
    Posts
    316
    Reputation
    10
    Thanks
    1,663
    My Mood
    Innocent

    and Source-Code on How-To Create an Macro

    As i promised I gonna make an tutorial how to make an basic Macro for AVA in C#. If you plan to release an macro on this base please mention me in the credits.

    The First are the requirements:
    1. Visual Studio 2012 (at least I use 2012)
    2. Brain.exe

    Skills required:
    1. Know how to make an gui in the Designer

    That are Basic Skills which everybody can learn in 2 hours. But if you don't understand some piece of code, ask google, only if your search wasn't successful you can ask me.

    Now the Steps:
    1. Create an New C# Windows Forms Application, Name doesn't matter.



    2. Wait until the Designer has loaded and you see an Fresh Window.



    3. Add Folowing items to the Form (you can find them in the Toolbox). Rename them in the Properties Window:
    1. 3 Buttons
    2. 1 Textbox
    3. 1 Timer




    4. Double Click the first button and add following code to the new appeared window in between the new void:

    Code:
    timer1.Interval = Convert.ToInt32(textBox1.Text);
    in the end it should like this:

    Code:
    private void button1_Click(object sender, EventArgs e)
            {
                timer1.Interval = Convert.ToInt32(textBox1.Text);
            }


    5. Now go back to the Designer and Doubleclick the second button and add this code inbetween the new void:

    Code:
    timer1.Start();
    in the End it should look like this:

    Code:
    private void button2_Click(object sender, EventArgs e)
            {
                timer1.Start();
            }


    6. Switch Back to the Designer and Doubleclick the third and last button and add this code inbetween the new created void:

    Code:
    timer1.Stop();
    In the End it should look like this:

    Code:
    private void button3_Click(object sender, EventArgs e)
            {
                timer1.Stop();
            }


    7. Switch Back to the Designer and Doubleclick the timer and add this to the new created void:

    Code:
    int x = GetAsyncKeyState(Keys.LButton);
                if ((x == 1) || (x == Int16.MinValue))
                {
                    Middown();
                    Midup();
                }
    In the End it should look like this:

    Code:
    private void timer1_Tick(object sender, EventArgs e)
            {
                int x = GetAsyncKeyState(Keys.LButton);
                if ((x == 1) || (x == Int16.MinValue))
                {
                    Middown();
                    Midup();
                }
            }


    This will throw us 3 Errors, because the Programm doesn't know what GetAsyncKeyState, Middown and Midup is.

    8. Add following code somewhere between the voids, not inside:

    Code:
    void Middown()
            {
                mouse_event((uint)mef.MIDDLEDOWN, 0, 0, 0, 0);
            }
            void Midup()
            {
                mouse_event((uint)mef.MIDDLEUP, 0, 0, 0, 0);
            }


    Now there are 5 Errors.

    9. Add following code somewhere between the voids, not inside:

    Code:
    enum mef : uint
            {
                LEFTDOWN = 0x00000002,
                LEFTUP = 0x00000004,
                MIDDLEDOWN = 0x00000020,
                MIDDLEUP = 0x00000040,
                MOVE = 0x00000001,
                ABSOLUTE = 0x00008000,
                RIGHTDOWN = 0x00000008,
                RIGHTUP = 0x00000010,
                WHEEL = 0x00000800,
                XDOWN = 0x00000080,
                XUP = 0x00000100
            }


    Only three Errors left.

    10. In the top of the code, there were are alot of using, add this line of code:

    Code:
    using System.Runtime.InteropServices;


    11. Add following code somewhere between the voids, not inside:

    Code:
    [DllImport("user32.dll")]
            static extern short GetAsyncKeyState(System.Windows.Forms.Keys vKey);
    
            [DllImport("user32.dll")]
            static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData,
              int dwExtraInfo);


    12. Push CTRL+F5, Wait until a small window shows up, close Visual Studio, Launch AVA and enjoy



    The Compiled .exe File You can find in "*Your name*/Documents/VS 2012/Projects/*Project Name*/*Project Name*/bin/Debug/*Project Name*.exe"


    I spent lot of time to create this simple tut how to create an simple macro (my macro is better in performance and reaction time). But the Difference is nearly not feel-able when you got a new/powerful computer. So I would like you apprenciate my work. If I see enough interest I will maybe make an tutorial for an extended macro like mine . I attached the Source for Reference.

    Virusscans for Attachment:
    https://www.virustotal.com/de/file/1...is/1370723295/
    Basic Macro.zip - Jottis Malwarescanner

    @Flengo , @BACKD00R please approve

    Kind Regards, PPCINJ
    <b>Downloadable Files</b> Downloadable Files
    Last edited by PPCINJ; 06-08-2013 at 02:41 PM.






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

    asdhhasdh (06-09-2013), c4eu (06-12-2013), FloatZel (06-08-2013), Hitachy77 (06-15-2013), shiubro99:D (07-04-2013)

  3. #2
    Flw
    Contributor
    Editor
    Donator
    ForeverRed's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    Brasil
    Posts
    2,712
    Reputation
    522
    Thanks
    13,983
    Quote Originally Posted by PPCINJ View Post
    @Flengo , @BACKD00R please approve

    Kind Regards, PPCINJ
    what Approve ?
    Nice work.
    • Member lvl 1 since December 13th, 2012
    • WarZ ISS Editor since December 5th, 2013
    • MPGH Donator since January 21th, 2014
    • Contributor since February 18th, 2014
    • Game Hacking Editor since February 24th, 2014
    • Member lvl 2 since May 4 th, 2014


  4. #3
    Threadstarter
    Dual-Keyboard Member
    MPGH Member
    PPCINJ's Avatar
    Join Date
    Jun 2012
    Gender
    male
    Location
    NRF
    Posts
    316
    Reputation
    10
    Thanks
    1,663
    My Mood
    Innocent
    Oops i forgot to attach the attachment. 5 minutes.






  5. The Following User Says Thank You to PPCINJ For This Useful Post:

    TheIroncannon (06-20-2013)

  6. #4
    Contributor
    Donator
    Global Moderator
    BACKD00R's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Brazil
    Posts
    9,244
    Reputation
    1201
    Thanks
    30,743
    My Mood
    Drunk
    Approved!!!!!



     

    Skype : BACKD00R-MPGH

     

    Contributor: October, 31th 2011
    CA BR Minion: January, 03th 2012
    CF AL Minion: April, 07th 2012
    CA Minion: April, 15th 2012
    CF Minion: July, 03th 2012
    PB Minion: January, 25th 2013
    AVA Minion : February, 02th 2013
    Arctic Combat minion: April, 03th 2013
    Warface Minion: April, 03th 2013

    Minion + : July 08th 2012
    Moderator : January 21th 2013
    Global Moderator : August 1st 2013







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

    c4eu (06-12-2013), PPCINJ (06-08-2013)

Similar Threads

  1. [Solved] how to use an injector and source code
    By Apple. in forum CrossFire Help
    Replies: 6
    Last Post: 04-17-2011, 06:16 PM
  2. [SOLVED]how to used the injector and Source Code ?????
    By adu.12 in forum Alliance of Valiant Arms (AVA) Help
    Replies: 15
    Last Post: 08-26-2010, 07:17 AM
  3. [RELEASE AND SOURCE CODE] HotKEY Checker
    By Dreamer in forum Visual Basic Programming
    Replies: 21
    Last Post: 07-09-2010, 03:02 AM
  4. I bring you tidings of joy, and source code.
    By EpicPacMan in forum Combat Arms Discussions
    Replies: 24
    Last Post: 09-30-2009, 02:01 AM
  5. Stamina Hack and source code ?
    By Teh Sasuke in forum C++/C Programming
    Replies: 0
    Last Post: 12-31-2007, 05:08 PM