Really simple AFK-"bot" in C++ menu

User Tag List

Results 1 to 2 of 2
  1. #1
    aGor2k's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Really simple AFK-"bot" in C++

    Hello!

    Thought I should make a simple "guide" on how to make a really simple AFK-bot in C++!

    The idea is to send a keypress every now and then, and this is really easy.
    We'll make a loop that presses "w" every 2 mins.

    Code:
    #include <iostream>
    #include <windows.h>
    #include <time.h>
    
    // sleep() function
    void sleep(unsigned int mseconds)
    {
        clock_t goal = mseconds + clock();
        while (goal > clock());
    }
    
    int main()
    {
        std::cout << "AFK-Bot!\n";
        std::cout << "Press any key to start!" << std::endl;
        cin.get();
        std::cout << "Starting in 30 seconds." << std::endl;
        sleep(30000)
        for(;;) {
            std::cout << "Sending key: \"W\"" << std::endl;
            keybd_event(VkKeyScan('W'), 0, 0, 0);
            sleep(120000);
        }
    	return 0;
    }
    Explaination on keybd_event()
    Explaination on VkKeyScan()

    Now, you can experiment with some things.
    For example try to make the program press the AV-trinket that ports you to the base 2 mins after you've started the bot.

    The big downside to this bot, is that it isn't 100% automated.
    You have to sign up for the battleground yourself, and exit and enter the bot again after you've done with that battleground.

    Hope this helpes someone

    Really simple AFK-&quot;bot&quot; in C++
  2. #2
    aGor2k's Avatar Member
    Reputation
    3
    Join Date
    Jul 2007
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would also recommend checking out the source for this one if you want something more advanced. It's not made by me, but it's a lot better :P

Similar Threads

  1. Simple Anti Afk addon/ bot / macro
    By ccndr in forum WoW Bots Questions & Requests
    Replies: 1
    Last Post: 04-16-2012, 11:23 AM
  2. [Mac] Simple AFK BG Bot.
    By tripleblade3 in forum World of Warcraft Bots and Programs
    Replies: 13
    Last Post: 05-25-2008, 11:00 AM
  3. Xafk, simple AFK/BG bot!
    By XinuX in forum World of Warcraft Bots and Programs
    Replies: 13
    Last Post: 08-08-2007, 07:17 PM
  4. [AFK] Simple afk bot.
    By Hakonj in forum World of Warcraft Bots and Programs
    Replies: 8
    Last Post: 05-30-2007, 10:01 AM
  5. Used AFK-BG Bot and got Banned?
    By hobodude666 in forum World of Warcraft General
    Replies: 3
    Last Post: 03-28-2007, 11:10 PM
All times are GMT -5. The time now is 11:15 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search