[HELP] AFK Bot menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it's a WinForms project, when in designer view, Toolbox -> Components -> Timer

    Drag it to your form, set the properties for it. (Enabled = true, Interval = 10000) Then double click the timer (should be on the bottom of the IDE labeled Timer1) to create the Tick event handler.

    Otherwise:

    Timer timer1 = new Timer();
    timer1.Interval = 10000;
    timer1.Enabled = true;
    timer1.Tick += timer1_Tick(sender, e); // Should be able to just hit tab -> tab after typing +=

    C# code again, it's just quicker for me.

    [HELP] AFK Bot
  2. #17
    nightshack's Avatar Contributor
    Reputation
    107
    Join Date
    Jan 2007
    Posts
    248
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -------------nvm
    Last edited by nightshack; 08-07-2009 at 11:30 PM.


  3. #18
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Jesus christ you're retarded as hell. Here, fully working code.

    Code:
    Imports System
    Imports System.Diagnostics
    Imports System.Runtime.InteropServices
    Imports System.Windows.Forms
    
    Namespace RetardationInProgramming
        Public Partial Class Form1
            Inherits Form
            <DllImport("user32.dll")> _
            <Return: MarshalAs(UnmanagedType.Bool)> _
            Private Shared Function SetForegroundWindow(ByVal hWnd As IntPtr) As Boolean
            End Function
            
            <DllImport("user32.dll")> _
            Private Shared Function GetForegroundWindow() As IntPtr
            End Function
            Public Sub New()
                InitializeComponent()
            End Sub
            
            Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
                If button1.Text & "Start" Then
                    button1.Text = "Stop"
                Else
                    button1.Text = "Start"
                End If
            End Sub
            
            Private Sub timer1_Tick(ByVal sender As Object, ByVal e As EventArgs)
                ' We don't want this running when button1's text is Start
                If button1.Text & "Start" Then
                    ' Get the current foreground window handle.
                    Dim currForeground As IntPtr = GetForegroundWindow()
                    ' Store the process here. (You can also use a different process too
                    Dim wowProc As Process = Process.GetProcessesByName("Wow")(0)
                    ' Check if WoW is the current foreground window, if not,
                    ' bring it to the front.
                    If currForeground <> wowProc.MainWindowHandle Then
                        SetForegroundWindow(wowProc.MainWindowHandle)
                    End If
                    ' Send our keys.
                    SendKeys.SendWait("1")
                    ' Go back to the original window.
                    SetForegroundWindow(currForeground)
                    ' We're done here. :)
                End If
            End Sub
        End Class
    End Namespace
    Last edited by Apoc; 11-13-2008 at 09:25 PM.

  4. #19
    nightshack's Avatar Contributor
    Reputation
    107
    Join Date
    Jan 2007
    Posts
    248
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for calling me a retard, yes I am. Do you know why the thread is called
    "[HELP]"?

    Well..whatever...thanks for the code. It is C# (I think) so i need to change some stuff.
    Last edited by nightshack; 11-13-2008 at 11:58 PM.


  5. #20
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by nightshack View Post
    Thanks for calling me a retard, yes I am. Do you know why the thread is called
    "[HELP]"?

    Well..whatever...thanks for the code. It is C# (I think) so i need to change some stuff.
    Seriously? You can't even read the language you're attempting to program in?

    I gave you VB.NET code.

  6. #21
    Brandan1337's Avatar Member
    Reputation
    8
    Join Date
    Feb 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the code, +rep
    Last edited by Brandan1337; 11-15-2008 at 09:32 AM.

  7. #22
    nightshack's Avatar Contributor
    Reputation
    107
    Join Date
    Jan 2007
    Posts
    248
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    --nevermind
    Last edited by nightshack; 08-07-2009 at 11:29 PM.


  8. #23
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.mmowned.com/forums/vb/182...ml#post1204195 <-- That post was nothing but VB.NET code.

    http://www.mmowned.com/forums/vb/182...ml#post1203816 <-- That post had a snippet of C# code (as I wrote it off the top of my head, outside of the IDE).

    So yes, you're retarded, and no, I'm not perfect. (I gave you an entire Form full of code that you can pretty much just plug in, and let it go.)

  9. #24
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Theres a difference between asking for help and asking to be spoonfed to the point where someone else does your entire project for you. You're asking for the latter, which makes you a retard.

  10. #25
    Brandan1337's Avatar Member
    Reputation
    8
    Join Date
    Feb 2008
    Posts
    45
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    -nvm got it working, thanks
    Last edited by Brandan1337; 11-15-2008 at 10:12 AM.

  11. #26
    nightshack's Avatar Contributor
    Reputation
    107
    Join Date
    Jan 2007
    Posts
    248
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    --nevermind-
    Last edited by nightshack; 08-07-2009 at 11:29 PM.


  12. #27
    Apoc's Avatar Angry Penguin
    Reputation
    1387
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright fine, I'll give you the proper way of doing it.

    Create a new method that handles your anti-AFK logic. (Whether it be a loop, or whatever)

    Create a new thread to act on that method when the button is clicked, and also abort that thread when it's supposed to stop.

    Also, making sure that you're using a callback to make sure you're not going to have IllegalCrossThreadCalls issues.

    Better? Understand that?

  13. #28
    suicidity's Avatar Contributor
    Reputation
    207
    Join Date
    Oct 2006
    Posts
    1,439
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just enable / disable the tick (timer) when you click the button?

    EzNuf?

    Seriously, please at least read tutorials first. I, and probably apoc and cypher too, hate trying to teach people and holding hands. It's simply not our jobs; So don't bite the hand your trying to hold and call us dicks when your blatantly asking for the treatment.

    When you get some common sense in the field your trying to code in, come back and then ask; So next time we may not have to bash you.


Page 2 of 2 FirstFirst 12

Similar Threads

  1. [HELP] Fishing bot afking
    By kingviper in forum WoW Memory Editing
    Replies: 9
    Last Post: 09-20-2012, 09:24 PM
  2. Pirox Anti-Afk Bot | Pics, Tips and Help
    By Rectal Exambot in forum World of Warcraft Guides
    Replies: 20
    Last Post: 01-25-2008, 10:14 AM
  3. Replies: 4
    Last Post: 09-18-2006, 06:38 PM
  4. [Program] WoW AV AFK Bot
    By Cypher in forum World of Warcraft Bots and Programs
    Replies: 0
    Last Post: 05-22-2006, 05:04 AM
  5. AutoIt Macro for WoW AFK Bot
    By Matt in forum World of Warcraft Bots and Programs
    Replies: 8
    Last Post: 04-06-2006, 06:01 AM
All times are GMT -5. The time now is 07:48 PM. 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