Jump to content

Guild Wars Bot


Mr.Llama
 Share

Recommended Posts

Well, it's only in beta, but I need testers. If you want to offer any suggestions go ahead, but please don't take this and put your name on it. (Not that anyone would want to do it with mine)

Edit: Oh yea! I think I used some custom hotkeys, but I think most of them are default...

; ----------------------------------------------------------------------------
;
;
; Author:        Mr. Llama <Kev10191@msn.com>
;
; Script Function:
;   Guild Wars bot, it can do the following:  FIGURE IT OUT!
;
;
;
; ----------------------------------------------------------------------------
#include <GUIConstants.au3>
HotKeySet("{ESC}", "Terminate")
Global $wait = 0
Global $Enemycheck
Global $enemythere
Global $enemybar
Global $PixelColor
Global $TimerNotMoving
Global $PixelColornow
Global $timertonotmoving
Global $itemcoordW
Global $itemcoordB
GUICreate("Guild Wars Bot", 200, 100)
GUICtrlCreateLabel("Choose Behavior", 50, 0, 100, 200)
$Smartbehave = GUICtrlCreateButton("Smart", 0, 0)
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        Exit 0
    EndIf
    If $msg = $Smartbehave Then
        SmartBehavior()
    EndIf
WEnd
Func SmartBehavior()
;Don't start until Guild Wars is up
    While $wait = 0
        Sleep(1000)
        If WinActive("Guild Wars") Then
            $wait = 1
            Sleep(2000)
        EndIf
    WEnd
;Start the bot-----------------
    While 1
        GuildWarscheck()
        EnemyCheck()
    WEnd
EndFunc ;==>SmartBehavior
Func GuildWarscheck()
    If Not WinActive("Guild Wars") Then
        $wait = 0
        While $wait = 0
            Sleep(2000)
            If WinActive("Guild Wars") Then
                $wait = 1
            EndIf
        WEnd
    EndIf
EndFunc ;==>GuildWarscheck
Func EnemyCheck()
    Send("c")
    $enemythere = "false"
    While $enemythere = "false"
        Send("c")
        Sleep(250)
        $enemybar = PixelSearch(398, 26, 625, 37, 0xD41A26, 5)
        If Not @error Then
            $enemythere = "true"
            Attack()
        EndIf
        If @error Then
            $enemythere = "false"
            Itemget()
        EndIf
        Send("{w down}")
        Sleep(2500)
        Send("{w up}")
        CheckNotmoving()
    WEnd
EndFunc ;==>EnemyCheck
Func Attack();;Use your skill combo below if you're a flare spammer this would be good.
    While $enemythere = "true"
        Send("{SPACE}")
        MouseClick("left", 533, 28, 2, 1)
        Send("1")
        Sleep(500)
        $enemybar = PixelSearch(398, 26, 625, 37, 0xD41A26, 5)
        If @error Then
            $enemythere = "false"
            Itemget()
        EndIf
    WEnd
EndFunc ;==>Attack
Func Itemget()
    $itemcoordW = PixelSearch(77, 113, 770, 649, 0xFFFFFF, 0)
    If Not @error Then
        MouseClick("Left", $itemcoordW[0], $itemcoordW[1], 1)
        Send("{SPACE}")
        Sleep(6000)
    EndIf
    $itemcoordB = PixelSearch(77, 113, 770, 649, 0x99EEFF, 0)
    If Not @error Then
        MouseClick("left", $itemcoordB[0], $itemcoordB[1], 1)
        Send("{SPACE}")
        Sleep(6000)
    EndIf
EndFunc ;==>Itemget
Func Terminate()
    Exit 0
EndFunc ;==>Terminate
Func CheckNotmoving()
    $PixelColor = PixelGetColor(405, 284)
    $TimerNotMoving = TimerInit()
    Send("{w down}")
    While $TimerNotMoving < 2000
        Sleep(1)
    WEnd
    Send("{w up}")
    $PixelColornow = PixelGetColor(405, 284)
    If $PixelColor = $PixelColornow Then
        Send("x")
    EndIf
EndFunc ;==>CheckNotmoving
Edited by Mr.Llama
Link to comment
Share on other sites

I've only tested it in pre-searing, but it could work anywhere with a bit of skill tweaking. Just make sure there's enemies where you can take on quite a few (5 maybe) and live. But then again I suppose it doesn't matter since you'll rez.

Link to comment
Share on other sites

  • 1 month later...

I like it. You shoulc check out some of the Guildwars functions I've posted in the past.

Interesting stuff.

JoshDB, I tried searching for your previous posts but can not find any. do you have alink to some of your older GuildWars posts?

Link to comment
Share on other sites

  • 3 months later...
  • 2 years later...
  • 3 years later...
  • Moderators

Echoman123, you seem to have missed the forum rules on your way in. Notice this part:

"Do not discuss any of the following:

  • Automating games or game servers. This rule is zero tolerance"

This is another reason it is not a good idea to resurrect such an old post. AutoIt has changed a lot in the last 3 years, and so have the rules on this forum.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Echoman123,

What he said. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...