Results 1 to 7 of 7
  1. #1
    Dibesjr's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    126
    Reputation
    1
    Thanks
    1,606
    My Mood
    Happy

    Making Mouse go down work within games

    Currently i have a macro that is (almost) released Here and i'm adding a new function to help control recoil, everytime it calls the function mouse() which pushes down then releases the Lbutton. Then it will move the mouse down however many pixels you set in the form box i provide. It worked great until i went in-game and the macro worked but it did not move the gun down at all. Here is the code i'm using so far

    Code:
        Private Sub MoveCursor()
            ' Set the Current cursor, move the cursor's Position, 
    
            Me.Cursor = New Cursor(Cursor.Current.Handle)
            Cursor.Position = New Point(Cursor.Position.X - TextBox4.Text, Cursor.Position.Y - TextBox5.Text)
        End Sub
    Overall i want it to move the gun down the set amount of pixels defined in the box. Any ideas?

    **NOTE** I have never coded in VB before but i have experience in C# so i should be able to figure stuff out :3

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,670
    My Mood
    Breezy
    Cursor.Position won't work in game, you need to use a Windows API such as mouse_event or SendInput.

    Code:
    Declare Function mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dX As Int32, ByVal dY As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32) As Boolean
        Private Const MOUSEEVENTF_MOVE As Integer = &H1
        Private Sub MoveCursor()
            ' Set the Current cursor, move the cursor's Position, 
            mouse_event(MOUSEEVENTF_MOVE, -(Integer.Parse(TextBox4.Text)), -(Integer.Parse(TextBox5.Text)), 0, 0)
        End Sub
    Hopefully that works, I haven't tested it. Also, use a NumericUpDown control instead of a text box. If someone types a letter into the box the whole thing will crash.
    Last edited by master131; 10-30-2011 at 03:46 PM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  3. The Following User Says Thank You to master131 For This Useful Post:

    Dibesjr (10-30-2011)

  4. #3
    Dibesjr's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    126
    Reputation
    1
    Thanks
    1,606
    My Mood
    Happy
    Quote Originally Posted by master131 View Post
    Cursor.Position won't work in game, you need to use a Windows API such as mouse_event or SendInput.

    Code:
    Declare Function mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dX As Int32, ByVal dY As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32) As Boolean
        Private Const MOUSEEVENTF_MOVE As Integer = &H1
        Private Sub MoveCursor()
            ' Set the Current cursor, move the cursor's Position, 
            mouse_event(MOUSEEVENTF_MOVE, -(Integer.Parse(TextBox4.Text)), -(Integer.Parse(TextBox5.Text)), 0, 0)
        End Sub
    Hopefully that works, I haven't tested it. Also, use a NumericUpDown control instead of a text box. If someone types a letter into the box the whole thing will crash.
    Ohhh your amazing i'll test this out ASAP and tel lyou if it works but that makes complete sense :3

    I have it set up however i get this error and, sicne i do not know VB very well i have no idea how to handle it

    Code:
    Error	15	
    'Declare Ansi Sub mouse_event Lib "user32" Alias "mouse_event" (dwFlags As Integer, dx As Integer, dy As Integer, cButtons As Integer, dwExtraInfo As Integer)' and 'Declare Ansi Function mouse_event Lib "user32.dll" Alias "mouse_event" (dwFlags As Integer, dX As Integer, dY As Integer, cButtons As Integer, dwExtraInfo As Integer) As Boolean' cannot overload each other because they differ only by return types.	C:\Users\Jon\Desktop\AVA fast gun\Form1.vb	9	24	AVA fast gun
    Nvm i think i figured it out, i had it already defined xD

    IT WORKS D. You sir are awesome. Thanks and +rep for the great help
    Last edited by Dibesjr; 10-30-2011 at 03:48 PM.

  5. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,670
    My Mood
    Breezy
    EDIT - I just edited my post, it works. :3

    Delete the one I posted (Declare Function mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dX As Int32, ByVal dY As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32) As Boolean) you can just use the one you already had.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  6. #5
    Dibesjr's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    126
    Reputation
    1
    Thanks
    1,606
    My Mood
    Happy
    Quote Originally Posted by master131 View Post
    EDIT - I just edited my post, it works. :3

    Delete the one I posted (Declare Function mouse_event Lib "user32.dll" Alias "mouse_event" (ByVal dwFlags As Int32, ByVal dX As Int32, ByVal dY As Int32, ByVal cButtons As Int32, ByVal dwExtraInfo As Int32) As Boolean) you can just use the one you already had.
    Are you able to approve my attachments in my release in the AVA section? I would really appreciate it as its been idle for almost 2 days without such as a glimpse from someone who can approve it (that i know of)

  7. #6
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,670
    My Mood
    Breezy
    Nope, got no power there.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  8. #7
    Dibesjr's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    126
    Reputation
    1
    Thanks
    1,606
    My Mood
    Happy
    Quote Originally Posted by master131 View Post
    Nope, got no power there.
    Rawrr, thanks anyway. Can you nudge someone who does have power to approve it i have all the required criteria to pass it ^.^

Similar Threads

  1. How to make an0's hack work (no bypass)
    By Dustyn in forum Combat Arms Hacks & Cheats
    Replies: 27
    Last Post: 06-16-2009, 07:46 PM
  2. I found out a trick to make a patched hack work 4/27/09
    By DRzRevolution in forum Combat Arms Hacks & Cheats
    Replies: 9
    Last Post: 05-05-2009, 07:16 PM
  3. How to make the Willow Wacker Works
    By HippyJord in forum Runescape Hacks / Bots
    Replies: 1
    Last Post: 02-20-2009, 09:12 AM
  4. how do i make a hack that work?
    By dieterke0147 in forum WarRock - International Hacks
    Replies: 0
    Last Post: 07-26-2008, 10:03 AM
  5. cant get the winchester to work in game
    By mojo007 in forum Visual Basic Programming
    Replies: 0
    Last Post: 04-10-2008, 02:33 PM