Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    funkake's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    My Mood
    Amused

    RapidFire Script In C++

    I am able to make them
    Code:
    #include <iostream>
    #include <Windows.h>
    #include <time.h>
    
    using namespace std;
    int main()
    {
    	while(true)
    	{
    		if(GetAsyncKeyState(VK_LBUTTON)&0x8000)
    		{
    			mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 10, 0, 0);
    			Sleep(60);
    			mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
    			Sleep(20);
    			
    		}
    	}
    }
    Is there any way I can get a separate left click function only affected by the mouse, because it seems these two cancel each other out >> mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); and if(GetAsyncKeyState(VK_LBUTTON)&0x8000); >>

    Btw, I cant use the mouse driver to change the leftclickbutton to something else and i need the script to output left clicks.. :P

    i know this can be easily made with AHK and other macro programs, but i want to include this into a larger project..

    I am sorry for possible typos, Norwegian speaking man here :P

    Thanks in advance

  2. #2
    GhostMode1's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Behind You
    Posts
    284
    Reputation
    23
    Thanks
    610
    My Mood
    Yeehaw

    Chang the code for lb=mm

    dude change the mouse left to middle not left or right it will fail the code in building try "
    Code:
    c#=(vk_mmBUTTON) if LB=True then change RB= False{MM}
    "

    ---------- Post added at 09:40 PM ---------- Previous post was at 09:39 PM ----------

    basecally change the lb and rb to the mm

  3. #3
    funkake's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    Quote Originally Posted by GhostMode1 View Post
    dude change the mouse left to middle not left or right it will fail the code in building try "
    Code:
    c#=(vk_mmBUTTON) if LB=True then change RB= False{MM}
    "

    ---------- Post added at 09:40 PM ---------- Previous post was at 09:39 PM ----------

    basecally change the lb and rb to the mm
    I am a bit confused, could you elaborate a bit?

  4. #4
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    127
    Try other windows api functions such as PostMessage and send it to the target application for mouse events.
    Way she fuckin goes boys

  5. #5
    [P]tc's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    60
    Reputation
    10
    Thanks
    1
    Use vb for this



  6. #6
    funkake's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    Quote Originally Posted by [P]tc View Post
    Use vb for this
    Can't, because I <3 C++

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

    Hell_Demon (05-14-2012)

  8. #7
    Null::Void's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Posts
    47
    Reputation
    6
    Thanks
    7
    My Mood
    Relaxed
    1) thats about the stupidest thing i have ever heard "Use VB for this"
    2) What exactly are you trying to accomplish (Your code is valid)
    3) Why do you want to trigger your event with a mouseclick when the mouse_event is the same button

  9. #8
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,321
    My Mood
    Cheeky
    Use a low level mouse hook to detect when the mouse button is pressed/released
    Ah we-a blaze the fyah, make it bun dem!

  10. #9
    funkake's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    Quote Originally Posted by Hell_Demon View Post
    Use a low level mouse hook to detect when the mouse button is pressed/released
    Yeah that sounds good, But that would be written in C i guess.. I'll look into it, thanks

  11. #10
    Variant's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    7
    Quote Originally Posted by funkake View Post
    I am a bit confused, could you elaborate a bit?
    What he means is that if the "left-button" triggers the bot and the bot then simulates "left-button" clicks the bot will after been activated once keep triggering itself in a infinite loop.

  12. #11
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,321
    My Mood
    Cheeky
    LowLevelMouseProc callback function

    test flags for LLMHF_INJECTED to see if it was injected or not

    If you get stuck on it let me know and I'll code up an example for you
    Ah we-a blaze the fyah, make it bun dem!

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

    funkake (05-16-2012)

  14. #12
    funkake's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    My Mood
    Amused

    Unhappy

    Quote Originally Posted by Hell_Demon View Post
    LowLevelMouseProc callback function

    test flags for LLMHF_INJECTED to see if it was injected or not

    If you get stuck on it let me know and I'll code up an example for you
    Well, I have to admit I am stuck

    I guess i need to make a Mousehook.dll

    with this

    Code:
    LRESULT CALLBACK LowLevelMouseProc(
      __in  int nCode,
      __in  WPARAM wParam,
      __in  LPARAM lParam
    );
    but I haven't used these API functions before, so I am rubbing my head against the wall here






    And diablo 3 came out Yey

  15. #13
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,321
    My Mood
    Cheeky
    Code:
     HHOOK hMouseHook;
    
    somewhere in your initialization code:
    hMouseHook = SetWindowsHookEx( WH_MOUSE_LL, &MouseProc, 0, GetCurrentThreadId());
    
    
    LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lParam) 
    {  
        if (nCode < 0)  // do not process the message 
            return CallNextHookEx(hMouseHook, nCode, wParam, lParam); 
        
        MSLLHOOKSTRUCT fuckingPenguins = (MSLLHOOKSTRUCT)lParam;
        if(!(fuckingPenguins.flags & LLMHF_INJECTED)) // not injected
        {
            if(wParam ==  WM_LBUTTONDOWN)
            {
                bRapidFire = true;
            }
            else if(wParam ==  WM_LBUTTONUP)
            {
                bRapidFire = false;
            }
        }
        
        return CallNextHookEx(hMouseHook, nCode, wParam, lParam); 
    }

    written in the browser so no idea if it works
    Ah we-a blaze the fyah, make it bun dem!

  16. The Following 3 Users Say Thank You to Hell_Demon For This Useful Post:

    funkake (05-16-2012),Hassan (05-21-2012),magicb0y (05-24-2012)

  17. #14
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,136
    My Mood
    Dead
    @funkake: So, is it solved ?

  18. #15
    funkake's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    My Mood
    Amused
    It is, you can lock the thread.

Page 1 of 2 12 LastLast

Similar Threads

  1. [Release] MW2 Rapidfire script (AHK)
    By Cato38 in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 2
    Last Post: 01-20-2013, 06:08 AM
  2. [Outdated] CoD4: Rapidfire script
    By Ipwnyou!! in forum Call of Duty 4 - Modern Warfare (MW) Hacks
    Replies: 40
    Last Post: 01-18-2013, 12:07 PM
  3. [Source Code] Rapidfire script - Fastest!!!!!!!
    By rahza786 in forum Call of Duty 8 - Modern Warfare 3 (MW3) Hacks & Cheats
    Replies: 27
    Last Post: 12-10-2011, 05:34 AM
  4. [Request] Alien Swarm rapidfire script for Dual Pistols
    By Tigermisu in forum Hack Requests
    Replies: 4
    Last Post: 08-16-2010, 09:24 AM
  5. Habbohotel Scripts
    By h0ang in forum General Game Hacking
    Replies: 8
    Last Post: 05-18-2007, 05:19 AM