[source wowSelfDefense bot vb.net] menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [source wowSelfDefense bot vb.net]

    (very similar to my previous post wowFollowBot - just some different functionality. lots of bug fixes. some made me laugh: ''AndAlso .Health > 150...''
    Updates to wowGps, new combat class, wowSpell, wowObjectManager..
    )
    Full project source (all project files) included in link at bottom.
    Very primitive self defense bot, coded in vb.net, .Net framework 3.0
    ONLY works on 32 bit wow, and probably 32 bit windows os.
    ONLY works for wow 5.1.0 (16309) mop
    USES injection 1 time -> ie. warden could catch if they monitor the addr it patches. You can easily find static FirstObjectAddress from [info dumps] and not use injection.
    USES keyboard/mouse -> you can't use other programs while the bot is on
    What it does
    1) you 'add' the attack spells you want to use (most important are keyboard key and cooldown)
    If a mob comes within maxAttackDistance, it will target it, keep facing it and spam attack keys based on user input.
    That's it.

    What it doesn't do
    Rez. Heal. WALK! Anything. It only searches for possible targets in range, faces them, targets them, and uses attack spells until .Health = 0


    Probably still bugs, only been testing it for a morning: with two spells (a pet off and on). Seems to be working fine.

    1. log into world
    2. File->Attach
    3. Combat tab->Add at least 1 spell (hopefully you have a ranged spell to pull - bot won't run up to target)
    4. If you have a pet, Target it in-game, then click "set pet" on the Main tab. guid label should update to hex number. Untarget pet.
    5. Set min/max attack level.
    6. Press Start
    7. Press down arrow key to stop (clicking the button won't do it)

    *hover over an attack spell to see its max attack range. If it doesn't say a min range, its probably 1.
    *most ranged spells are (5,40), (5,35) (5,30) or (1,40),(1,35),(1,30) -- if you do it wrong, it won't use the spell when you want it to.
    *melee attacks would be (1,5) or even (1,4) to be safe.
    UseOnce: Only use the spell once per mob


    note: if there are no targets in range, you can actually run around with w,a,s,d
    Once a target is in range, the bot will seize control and start rotating your char -- stop moving (wasd) at this point..it's trying to do its thing.
    After there are no more targets, you can wasd again.

    It does use ASyncGetKeyState. Pressing the [b]down arrow key[b] (might have to hold it for a second, if the bot's in a loop() it might not check user input) turns it off.(Form1_tmrOnOff_Tick)

    project source files: http://www.qfpost.com/file/d?g=3ZofR2pkx

    *your char jumps when you press 'start'. (signaling keyboard is good and all is ready)
    you can't use any other computer program while the bot is on because of how it uses mouse/keyboard
    Last edited by abuckau907; 12-06-2012 at 04:39 PM.
    Some things that can be counted, don't matter. And some things that matter, can't be counted.

    [source wowSelfDefense bot vb.net]
  2. #2
    Anonie's Avatar Knight-Lieutenant
    Reputation
    58
    Join Date
    Nov 2010
    Posts
    281
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does it loot?

  3. #3
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    code snippet
    Code:
    Public Sub BotOn()
            If OBJMGR.IsAttached = False Then
                DoOutput("Can't start yet. Attach first!")
                Exit Sub
            End If
            Dim _lastActionTime As Date = Date.Now
            _isBotOn = True
            Form1.cmdStartStop.Text = "Stop"
            GOOEY.FocusWoW()
            Do Until _isBotOn = False
                ''#0 Are we alive?
                If OBJMGR.LocalPlayer.Health = 0 Then
                    DoOutput("LocalPlayer died. Shutting down")
                    BotOff()
                    Exit Do
                End If
                ''#1 Are we in combat?
                'is anything targeting us?
                Dim _attackersCount As Int32 = OBJMGR.GetTargetCount(OBJMGR.LocalPlayer)
                If _attackersCount > 0 Then
                    Do Until OBJMGR.LocalPlayer.TargetGuid > 0
                        DoOutput("something is targeting us")
                        DoOutput("waiting for auto-target...")
                        Threading.Thread.Sleep(rndm.Next(750, 1250))
                        Application.DoEvents()
                    Loop
                    ''kill the target
                    COMBAT.KillCurrentTarget()
                    Continue Do 'jump back up to priority 0
                End If
                ''#2 Do we need to heal?
                If OBJMGR.LocalPlayer.HealthAsPercent <= 50 Then
                    DoOutput("Need to heal! //todo: add code here")
                    Dim _cancelEarly As Boolean = False
                    Do Until OBJMGR.LocalPlayer.HealthAsPercent > 95
                        DoOutput("--loop until health > 95% -- ")
                        If OBJMGR.GetTargetCount(OBJMGR.LocalPlayer) > 0 Then
                            DoOutput("ambush while healing. do self defense!")
                            Continue Do 'jump back to priority 0
                        End If
                        If _isBotOn = False Then
                            _cancelEarly = True 'user press 'stop button' during heal
                            Exit Do
                        End If
                        Application.DoEvents()
                        Threading.Thread.Sleep(rndm.Next(1280, 1790))
                    Loop
                    If _cancelEarly Then
                        Exit Do 'ie. don't show 'health normal' message. could use label right after outer loop + goto ...
                    End If
                    DoOutput("Health Normal. Continue.")
                End If
                ''#3 Any mobs to kill, in range?
                If OBJMGR.GetTargetCountInArea(OBJMGR.LocalPlayer.WorldPos, COMBAT.MaxAttackRange) > 0 Then
                    DoOutput("Target Available!")
                    If COMBAT.TargetClosestMob Then
                        COMBAT.KillCurrentTarget()
                    End If
                End If
                ''#4 don't go afk
                ''todo
                ''If timeSpan > userSetting then
                ''Jump or something
                Application.DoEvents()
            Loop
            DoOutput("Bot OFF")
        End Sub
    *just looking over the post, huge bug (never actually tested the 'heal' section)

    it should be this
    Code:
                ''#2 Do we need to heal?
                If OBJMGR.LocalPlayer.HealthAsPercent <= 50 Then
                    DoOutput("Need to heal! //todo: add code here")
                    Do Until OBJMGR.LocalPlayer.HealthAsPercent > 95
                        DoOutput("--loop until health > 95% -- ")
                        If OBJMGR.GetTargetCount(OBJMGR.LocalPlayer) > 0 Then
                            DoOutput("ambush while healing. do self defense!")
                            Exit Do
                        End If
                        If _isBotOn = False Then Exit Do 'user requested bot to stop
                        Application.DoEvents()
                        Threading.Thread.Sleep(rndm.Next(1280, 1790))
                    Loop
                    DoOutput("Health Normal. Continue.")
                End If
    Not going to re-upload file. Edit yourself if it causes you to die.
    Last edited by abuckau907; 12-06-2012 at 11:42 PM.
    Some things that can be counted, don't matter. And some things that matter, can't be counted.

  4. #4
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    negative. Generally that involves moving the character. |sarcasm sign| - looting wasn't included in 'what it does'..
    But there is a simple solution.

    Sub Combat.KillCurrentTarget()
    ...
    Do Until _curTarget.Health = 0
    ....
    Loop
    ''mob is dead now. Loot it.
    GPS.RunToPoint(_curTarget.worldPos)
    GOOEY.SetCursorRCTP()
    GOOEY.Mouse_Right_Click(); '<--isn't in my source
    Threading.Thread.Sleep(Random.Next(2000,3000)) ' ?? good time
    GOOEY.KeyPress(Keys.Escape) 'make the bag go away. or if you start running, it will auto-close
    End Sub

    *auto loot must be enabled not too big of a deal.
    *this doesn't actually check if you have the rights to loot it, or if it has anything to loot etc. Just runs to the dead body and clicks. But under ideal circumstances, it works 99% of the time.
    *with a little screenshot magic you can check the cursor image and at least verify it's lootable. //todo

    *edit: if there was a loot failure, and no bag opened up - pressing escape would bring up the red wow menu. whole new problem. I believe there is a variable in wow ram like isLootWindowOpen? Or there is some other way to check if there is a loot window open. I'll probably check into it later and update.
    Last edited by abuckau907; 12-07-2012 at 03:57 AM.
    Some things that can be counted, don't matter. And some things that matter, can't be counted.

  5. #5
    fultoejame's Avatar Private
    Reputation
    1
    Join Date
    Dec 2012
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Generally that involves moving the character.

  6. #6
    abuckau907's Avatar Active Member
    Reputation
    49
    Join Date
    May 2009
    Posts
    225
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by fultoejame View Post
    Generally that involves moving the character.
    -sarcasm because my code must 'move the char?'

    Yes, which it can do via wowGps.RunToPoint() --source code exists, never gets called.
    It *currently* doesn't do that, because the app was only designed to do self defense, nothing more.

    Once you start doing navigation code, everything gets more complicated.
    (Navigation by its self is hard + when random things happen to you, like being attacked while running up to a dead body -- if you don't code carefully, the bot will continue to try to loot when really it should stop and defend its self. + pet and possibly group member; it gets complicated. And other things. --my control structure for ai is virtually non existent)
    Last edited by abuckau907; 12-07-2012 at 03:56 AM.
    Some things that can be counted, don't matter. And some things that matter, can't be counted.

Similar Threads

  1. [Release] [source wowFollow bot vb.net]
    By abuckau907 in forum World of Warcraft Bots and Programs
    Replies: 16
    Last Post: 06-13-2014, 02:18 AM
  2. PocketGnome Source Mac Bot
    By vitosans in forum WoW Bots Questions & Requests
    Replies: 0
    Last Post: 05-04-2011, 12:40 PM
  3. [Bot] [Source] Dyno Bot Re-Release - Free bg bot
    By swollen in forum World of Warcraft Bots and Programs
    Replies: 58
    Last Post: 10-16-2010, 10:14 AM
  4. [SOURCE] Prospecting Bot/Addon For LuaNinja
    By GliderPro in forum World of Warcraft Bots and Programs
    Replies: 5
    Last Post: 11-22-2009, 05:02 AM
  5. [Bot:Source] Acidic Bot Source Code
    By =sinister= in forum World of Warcraft Bots and Programs
    Replies: 10
    Last Post: 07-03-2006, 05:38 PM
All times are GMT -5. The time now is 12:41 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search