Jump to content

guildwars bots


djomen
 Share

Recommended Posts

here are a couple scripts that i have made for GW since bots are nonexsistant for free to public

though not complete, they are effective and useful

the first one is my afk killer with pixelsearch .. the search field is buggy and kinda small. it only works with a warrior

this macro has gotten alot of experiance and very few items for my guild and i

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:djomen      
; Name:Killbot
; Script Function:For afk killing with Guild Wars.
;   
;
; ----------------------------------------------------------------------------
;~~~~~~~~~~~~~~~ 
#NoTrayIcon 
#Include<GUIConstants.au3> 
Global $Paused 
;~~~~~~~~~~~~~~~  
HotKeySet("{Pause}", "Pause") 
HotKeySet("{End}", "Hide") 
HotKeySet("{Home}", "Show") 
;~~~~~~~~~~~~~~~
GuiCreate("Killbot", 100, 50,(@DesktopWidth-100)/2, (@DesktopHeight-50)/2, $WS_DLGFRAME)
WinSetOnTop("Killbot", "", 1)
;~~~~~~~~~~~~~~~
$startKB = GuiCtrlCreateCheckbox("Start", 4, 1, 50, 20)
$Button_1 = GuiCtrlCreateButton("X", 95, 3, 18, 18)
$Buttonhelp = GUICtrlCreateButton("Help", 60, 3, 35, 18)
GuiSetState()
;~~~~~~~~~~~~~~~
While 1
$msg = GuiGetMsg()
;~~~~~~~~~~~~~~~
Select 
   Case GUICtrlRead($startKB) <> 4 
        While GUICtrlRead($startKB) <> 4 
          Kill() 
        WEnd 
   Case GUICtrlRead($startKB) = -15 
        ExitLoop 
 EndSelect
;~~~~~~~~~~~~~~~
Select 
Case $msg = $Buttonhelp 
msgbox(0, "Help", "Press (Pause) to pause, press (End) to hide the window and press (Home) to show the window.Killbot was created for educational purposes only.") 
EndSelect
;~~~~~~~~~~~~~~~   
    Select
   Case $msg = $Button_1
        ExitLoop
    EndSelect
WEnd
;~~~~~~~~~~~~~~~  
Func Pause() 
$Paused = NOT $Paused 
While $Paused 
sleep(100) 
ToolTip('GWit is currently paused.',0,0) 
WEnd 
ToolTip("") 
EndFunc 
;~~~~~~~~~~~~~~~ 
Func Hide() 
GUISetState(@SW_HIDE) 
EndFunc 
;~~~~~~~~~~~~~~~ 
Func Show() 
GUISetState(@SW_SHOW) 
EndFunc 
;~~~~~~~~~~~~~~~ 
;
;Funtion Kil 
Func Kill() 
; 
Sleep(100) 
    $CoordsA = PixelSearch(400, 300, 700, 550, 0xE3C243) ; Gold items 
    $CoordsB = PixelSearch(400, 300, 700, 550, 0xBB88EE) ; Purple items 
    $CoordsC = PixelSearch(400, 300, 700, 550, 0x99EEFF) ; Blue items 
  ; 
   ; 
    If IsArray($CoordsA) Then
        Sleep(500)                        ; The colour A was found 
        MouseClick('Left', $CoordsA[0], $CoordsA[1], 1, 0) 
        Sleep(500) 
    Else          ; The color A was not found 
    EndIf 
   ; 
    If IsArray($CoordsB) Then
        Sleep(500)                        ; The color B was found 
        MouseClick('Left', $CoordsB[0], $CoordsB[1], 1, 0) 
        Sleep(500) 
    Else           ; The color B was not found 
    EndIf 
   ; 
    If IsArray($CoordsC) Then
        Sleep(500)                        ; The color C was found 
        MouseClick('Left', $CoordsC[0], $CoordsC[1], 1, 0) 
        Sleep(500) 
    Else           ; The color C was not found 
    EndIf 
   ; 
    Sleep(100) 
   ; 
Send("{Alt down}") ;; hold (alt)        
        Sleep(100) 
        Send("{c down}") 
        Sleep(15) 
        Send("{c up}") 
        Sleep(25)     ;;   This is the attack sequence. ;; 
        Send("{SPACE down}") 
        Sleep(15) 
        Send("{SPACE up}") 
        Sleep(15) 
                     Send("{2  down}") 
                     Sleep(15) 
                     Send("{2 up}")  
                     Sleep(15) 
                     Send("{3 down}") 
                     Sleep(15)                      ;; Skills sequence. ;; 
                     Send("{3 up}") 
                     Sleep(15) 
                     Send("{4  down}") 
                     Sleep(15)                          
                     Send("{4 up}")  
                     Sleep(15) 
Send("{Alt up}") 
Sleep(100) 
EndFunc

next is my spam bot .. it needs alot added to it but it does the job

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:        djomen
; Script Name: GWspam
; Script Function:a spammer for guild wars
;   
;
; ----------------------------------------------------------------------------
Local $PromoteTimer = TimerInit()

While 1
;
    Sleep(20000)
    If TimerDiff($PromoteTimer) > 10000 Then
        $PromoteTimer = TimerInit()
        Sleep(1000)
        Send('{ENTER}')
        Sleep(1000)
        Send('~THE DARK REBELLION ACT~ recruiting rebels,bandits,and warlords~http://fizban.f2o.org/phpbb2~{ENTER}')
    EndIf
;
    Sleep(30000)

WEnd
    Exit 0
;EndFunc
Link to comment
Share on other sites

Awesome this helps! Release some more :king:! :lmao:

lol..

write own script..... this posted scripts aren't very hard to write oO

but such scripts are the right way to get nearer to autoit..

so i can say: djomen you're an the right way for better skills in autoit ;)

diablo 2 bots were my first script o:)

i have an idea for you: what about making an GUI for the soambot, which starts the game, and were you can enter the spammessages ?

the messages can be saved in a '.ini file, so that they could aautomatically be loaded the next start ^.^'

[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Link to comment
Share on other sites

look for the tutorials in help file, download the newest beta of autoit, download scite for autoit, try to understand non-gui-commands.

if you've done this, try to learn the gui functions.....

learn how to work with functions

and you will hae no problem!

make always smaller script...

you should always be proud of what you have scripted, even someone says it back.... see this as a help for doing it better =)

after 1-2 months you will be able to help some new guys here an the forum :lmao:

Edited by Analritter

[font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]

Link to comment
Share on other sites

  • 2 weeks later...

Sly, nearly everything I learned about autoit was from taking code from the scripts and scraps forum here and the outstanding search function in the autoit help (to help understand the gibberish)

i have an idea for you: what about making an GUI for the soambot, which starts the game, and were you can enter the spammessages ?

the messages can be saved in a '.ini file, so that they could aautomatically be loaded the next start ^.^'

Actually, you predicted my next move... i want to learn more about ini's so a person could edit the message from the gui.

My spambot now has a gui and switches between Ascalon City American districts 1 through 3

I left the debuging info in because its a bit clunky and it always finishes the loop no matter when you try to unclick it,(something that Readini and some better scripting would fix) so there is a message letting you know when the ideal time to stop the loop so it will shut off properly.

My screen resolution is set to 1280 by 1024 and I have my interface size (in game options) set to small.

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:djomen      
; Name:Spambot
; Script Function:For afk spaming with Guild Wars.
;   
;
; ----------------------------------------------------------------------------
;~~~~~~~~~~~~~~~ 
#NoTrayIcon 
#Include<GUIConstants.au3> 
Global $Paused 
;~~~~~~~~~~~~~~~  
HotKeySet("{Pause}", "Pause") 
HotKeySet("{End}", "Hide") 
HotKeySet("{Home}", "Show") 
;~~~~~~~~~~~~~~~
GuiCreate("Spambot", 100, 50,(@DesktopWidth-100)/2, (@DesktopHeight-50)/2, $WS_DLGFRAME)
WinSetOnTop("Spambot", "", 1)
;~~~~~~~~~~~~~~~
$startSB = GuiCtrlCreateCheckbox("Start", 4, 1, 50, 20)
$Button_1 = GuiCtrlCreateButton("X", 95, 3, 18, 18)
$Buttonhelp = GUICtrlCreateButton("Help", 60, 3, 35, 18)
GuiSetState()
;~~~~~~~~~~~~~~~
While 1
$msg = GuiGetMsg()
;~~~~~~~~~~~~~~~
Select 
   Case GUICtrlRead($startSB) <> 4 
        While GUICtrlRead($startSB) <> 4 
          Spam() 
        WEnd 
   Case GUICtrlRead($startSB) = -15 
        ExitLoop 
 EndSelect
;~~~~~~~~~~~~~~~
Select 
Case $msg = $Buttonhelp 
msgbox(0, "Help", "Guild Wars needs to be in windowed mode. To run, check (Start) then click anywhere on the GW window. Press (Pause) to pause, press (End) to hide the window and press (Home) to show the window. Spambot was created for educational purposes only.") 
EndSelect
;~~~~~~~~~~~~~~~   
    Select
   Case $msg = $Button_1
        ExitLoop
    EndSelect
WEnd
;~~~~~~~~~~~~~~~  
Func Pause() 
$Paused = NOT $Paused 
While $Paused 
sleep(100) 
ToolTip('Spambot is currently paused.',0,0) 
WEnd 
ToolTip("") 
EndFunc 
;~~~~~~~~~~~~~~~ 
Func Hide() 
GUISetState(@SW_HIDE) 
EndFunc 
;~~~~~~~~~~~~~~~ 
Func Show() 
GUISetState(@SW_SHOW) 
EndFunc 
;~~~~~~~~~~~~~~~ 
;
;Funtion Spam 
Func Spam()
;Starting your char in pre searing ascalon district 1 
 Sleep(5000)
ToolTip('ENTER')
        Send('{ENTER}')
        Sleep(500)
ToolTip('TYPING')
        Send('~THE DARK REBELLION ACT~ recruiting rebels,bandits,and warlords~Ventrilo,forums,hall and cape http://fizban.f20.org/phbb2{ENTER}')
        MouseClick("left",230,40)
ToolTip('DIS 2')
        Sleep(2000)
        MouseClick("left",220,88);dis 2
        MouseClick("left",615,575)
ToolTip('WAITING')
        Sleep(20000)
;
ToolTip('ENTER')
        Send('{ENTER}')
        Sleep(500)
ToolTip('TYPING')
        Send('~THE DARK REBELLION ACT~ recruiting rebels,bandits,and warlords~Ventrilo,forums,hall and cape http://fizban.f20.org/phbb2{ENTER}')
        MouseClick("left",230,40)
ToolTip('DIS 3')
        Sleep(2000)
        MouseClick("left",220,102);dis 3
        MouseClick("left",615,575)
ToolTip('WAITING')
        Sleep(20000)
;
ToolTip('ENTER')
        Send('{ENTER}')
        Sleep(500)
ToolTip('TYPING')
        Send('~THE DARK REBELLION ACT~ recruiting rebels,bandits,and warlords~Ventrilo,forums,hall and cape http://fizban.f20.org/phbb2{ENTER}')
        MouseClick("left",230,40)
ToolTip('DIS 1')
        Sleep(2000)
        MouseClick("left",220,75);dis 1
        MouseClick("left",615,575)
ToolTip('Uncheck box now to stop the loop. Please wait about 10 seconds to close program.')
        Sleep(20000)
;
Endfunc
Link to comment
Share on other sites

Here's some of my code...

;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Dock System Script
;By JoshDB
;Use with credit
;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Aligns the player with the compass.

$Found = 0

While $Found = 0
    Send("{A Down}")
    Sleep(10)
    Send("{A Up}")
    Sleep(25)
    $Coord = PixelSearch( 910, 16, 920, 24, 0x4CED22, 50 )
    If NOT @Error Then
        $Found = 1
    EndIf
wEnd

Sleep(100)

Send("{D Down}")
Sleep(50)
Send("{D Up}")

;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Dock System Script
;By JoshDB
;Use with credit
;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Readies the Health Bar for use

$Coord = PixelSearch( 311, 700, 512, 713, 0xD8121E )
If NOT @ERROR Then
    If Hex( PixelGetColor( $Coord[0], $Coord[1] + 1 ), 6 ) = "DA121F" Then
        If Hex( PixelGetColor( $Coord[0], $Coord[1] + 3 ), 6 ) = "D9121F" Then
            $Status_Health_Dead = $Coord[0] & ", " & $Coord[1]
            $Status_Health_Low = $Coord[0] + 47 & ", " & $Coord[1]
            $Status_Health_Medium = $Coord[0] + 94 & ", " & $Coord[1]
            $Status_Health_High = $Coord[0] + 141 & ", " & $Coord[1]
            $Status_Health_Full = $Coord[0] + 188 & ", " & $Coord[1]
        EndIf
    EndIf
EndIF

#cs
EXAMPLE OF HOW TO USE THIS CODE

If Hex( PixelGetColor( $Status_Health_Full ), 6 ) = "D8121E" Then
;Full health - Run code here
Else
    If Hex( PixelGetColor( $Status_Health_High ), 6 ) = "D8121E" Then
    ;High health - Run code here
    Else
        If Hex( PixelGetColor( $Status_Health_Medium), 6 ) = "D8121E" Then
        ;Medium health - Run code here
        Else
            If Hex( PixelGetColor( $Status_Health_Low ), 6 ) = "D8121E" Then
            ;Low health - Run code here
            Else
                If Hex( PixelGetColor( $Status_Health_Dead ), 6 ) = "D8121E" Then
                ;Dead - Run code here
                Else
                    MsgBox(0,"Status,"Dead!")
                EndIf
            EndIf
        EndIf
    EndIf
EndIf
#ce

;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Dock System Script
;By JoshDB
;Use with credit
;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Selects the first NPC found.  Starts search at the top left of the screen.

$Found = 0

Send("{Alt Down}")

Sleep(500)

While $Found = 0
    $Coord = PixelSearch( 250, 215, 750, 500, 0x99FF00 )
    If NOT @Error Then
        $Found = 1
    EndIf
wEnd

Send("{Alt Up}")

MouseClick("Left", $Coord[0], $Coord[1])

;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Dock System Script
;By JoshDB
;Use with credit
;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Hunts the specified number of monsters

$TimesToRun = 3;Set this to how many times you want the macro to search for and kill a monster
$Temp0 = 0
$Temp1 = 0

While $Temp0 < $TimesToRun
    Sleep(1500)
    Send("C")
    Sleep(500)
    Send("{Space}")
    Sleep(5000)
    While $Temp1 = 0
        $Color = PixelGetColor (415, 32)
        If Hex($Color, 6) = "D7000D" Then
            Sleep(2000)
        Else
            $Temp1 = 1
        Endif
    wEnd
    Sleep(1000)
    $Temp0 = $Temp0 + 1
wEnd

;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Dock System Script
;By JoshDB
;Use with credit
;-+=+-+=+-+=+-+=+-+=+-+=+-+=+-;
;Picks up any loot designated to the player.

$TimesToRun = 1;Set this to how many times you want the macro to search for loot
$Found = 0
    
While $Found < $TimesToRun
    $Coord = PixelSearch(250, 215, 750, 500, 0xFFFFFF)
    If NOT @Error Then
        MouseClick("Left", $Coord[0], $Coord[1])
    EndIf
    $Found = $Found + 1
wEnd

Also, I made a Guild Recruiter Spambot for MMOExploits a while ago, as well. It even invites people that reply to your ad.

Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite
Link to comment
Share on other sites

thats some good stuff there josh... creds will be going out to you on my updates cause theres alot of useful stuff here :lmao:

the health bar and compas especially... thx for sharing

Edited by djomen
Link to comment
Share on other sites

  • 1 month later...

Hey guys.

Been working with this script for a while.

I work with a ranger, and I just have him chill in the field and kill.

Rangers use bows. I found that if you ask your equip a spell that does not require an arrow to be shot, say you equip it to key slot 8, you can ask the script to send("8") before it sends c, and you will be able to pull monsters without worrying about obstruction. This script also works better if you have a monk henchmen in your group.

Here are some ideas I really was hoping someone could help me with.

1) A script to only pick gold up, and not items?

2) Further farming, a script to pick up all items, unless inventory is full, or only green/blue/purple/gold items (IE, not black), or items of a specific name, (Charr Carvings for instance).

3) This is most important. I would like to sleep with the script on, but I don't always want to fight in zones with unlimited amounts of monsters, especially because many of these zones only contain lowbie monsters. If there is no target after maybe 3 c-press attempts, the script could send m, then click on a city, then run out of the city back into the playing field and fight. Most cities start close to zones, but I would be willing to find distances and required key presses if anyone could figure out how to get the if's and the thens, and the locators working. I'm working on it, but I'm pretty newb with Autoit. Please help with these. It would be great for farming gold and exper.

Link to comment
Share on other sites

Some easy in-game work arounds.

If you find a character to group with in China or something, you can sleep all night and just have them zone for you. They are happy to get the free experience, and sometimes they pickup gold, but not always. I can't figure out what font guildwars uses, and I think that it is custom, but if I could get it to click on texts, it would be cool as heck, because then I could have the scripts teleport and pick up gold and specific items and everything, automatically. I could even have it hold down ALT and LEFT until the word MERCHANT appears, and then release left, and then click on the word MERCHANT, and then release ALT. If I had the script do this 3 times, it would be enough to reach any merchant.

Link to comment
Share on other sites

Hello again.

Here is what I have done to the djomen Killbot script.

Most, if not all of the changes were just added right at the end. I'm really unsure about the last part, because I do not understand the return value of PixelSearch for a negative. It says if the color is not found, it sets @error to 1. I don't know if I should use If $Color4 = 1 or If @error = 1 or If $Color4 = @error???

Anyway....

I added an automatic re-locate to mission start, so you can go into missions and commit suicide on monsters, killing a few and getting some exp, then just respawn in town and restart the mission. (The coords are set for the windowed ver of the game, and they only work with at least 1 party member.) I use a mage henchmen, cause they deal dmg, and I can still die fast.

Incorporated all skills, but added sends for r, c, and space after each skill is cast. That way, you keep a target between skill casts, and if there are no targets, it looks like you are doing something productive (running to a place where there ARE kills).

Lastly, I tried to make the bot scan radar, and if there is nothing on radar, you send V then Space, which will cause you to follow the closest party member. This is problematic if you have a pet or if you are a group leader fighting with NPCs. So, it's really just good for group missions where you do a lot of fighting. It's easy to delete. This works now.

*Please note that this is just an edit of a previous script on this page, and it is not a stand-alone. There's no loop, so it has to be put into the other script.

Send("{Alt down}");; hold (alt)     
        Sleep(100)
        Send("{c down}")
        Sleep(15)
        Send("{c up}")
        Sleep(25)   ;;   This is the attack sequence.;;
        Send("{SPACE down}")
        Sleep(15)
        Send("{SPACE up}")
        Sleep(15)
                     Send("{1  down}")
                     Sleep(15)
                     Send("{1 up}")  
                     Send("r")
                     Send("space")
                     Send("c")
                     Send("{2 down}")
                     Sleep(15)                    ;; Skills sequence.;;
                     Send("{2 up}")
                     Send("r")
                     Send("space")
                     Send("c")
                     Send("{3  down}")
                     Sleep(15)                          
                     Send("{3 up}")  
                     Send("r")
                     Send("space")
                     Send("c")
                     Send("{4  down}")
                     Sleep(15)
                     Send("{4 up}")  
                     Send("r")
                     Send("space")
                     Send("c")
                     Send("{5 down}")
                     Sleep(15)                    ;; Skills sequence.;;
                     Send("{5 up}")
                     Send("r")
                     Send("space")
                     Send("c")
                     Send("{6  down}")
                     Sleep(15)                          
                     Send("{6 up}")  
                     Send("r")
                     Send("space")
                     Send("c")
                     Send("{7  down}")
                     Sleep(15)
                     Send("{7 up}")  
                     Send("r")
                     Send("space")
                     Send("c")
                     Send("{8 down}")
                     Sleep(15)                    ;; Skills sequence.;;
                     Send("{8 up}")
                     Send("c")
                     Send("r")
                     Send("{space}")
Send("{Alt up}")
Sleep(3000) ; Changed so that walk time is longer between skills.
    $var = PixelGetColor( 790 , 389 );
    If $var = 0x490000 then MouseClick("Left", 550, 389)
    $var2 = PixelGetColor( 826 , 244 )
    If $var2 = 0x6D5D42 then 
        MouseClick("Left", 754, 378) 
        Send("{Space}"); This will cause you to enter a mission, if you die and go to town.  (Only works if you are grouped and windowed)
    EndIf
        $Color4 = PixelSearch(821, 37, 1015, 212, 0xDD0100, 2); This is to follow the closest PC if no spawns are up.
        If @error Then
            Send("v")
            Send("{Space}")
            Endif
        If NOT @error Then
        EndIf
    EndFunc
Edited by Foaman
Link to comment
Share on other sites

I discovered that the return to town and enter mission parts of the script actually only work not only when you are windowed, but also when the interface size is set to small. You have to input new coords and get colors for these to work in different interface size modes.

This is for windowed with Normal interface size.

$var = PixelGetColor( 869 , 427 );
    If $var = 0x3D0000 then MouseClick("Left", 550, 389)
    $var2 = PixelGetColor( 812 , 269 )
    If $var2 = 0x6D5D43 then
        MouseClick("Left", 854, 419)
        Send("{Space}"); This will cause you to enter a mission if you are in town and go to town if you die.  (Only works if you are grouped and windowed)
Endif
Edited by Foaman
Link to comment
Share on other sites

  • 4 weeks later...

Sly, nearly everything I learned about autoit was from taking code from the scripts and scraps forum here and the outstanding search function in the autoit help (to help understand the gibberish)

Actually, you predicted my next move... i want to learn more about ini's so a person could edit the message from the gui.

My spambot now has a gui and switches between Ascalon City American districts 1 through 3

I left the debuging info in because its a bit clunky and it always finishes the loop no matter when you try to unclick it,(something that Readini and some better scripting would fix) so there is a message letting you know when the ideal time to stop the loop so it will shut off properly.

My screen resolution is set to 1280 by 1024 and I have my interface size (in game options) set to small.

; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author:djomen      
; Name:Spambot
; Script Function:For afk spaming with Guild Wars.
;   
;
; ----------------------------------------------------------------------------
;~~~~~~~~~~~~~~~ 
#NoTrayIcon 
#Include<GUIConstants.au3> 
Global $Paused 
;~~~~~~~~~~~~~~~  
HotKeySet("{Pause}", "Pause") 
HotKeySet("{End}", "Hide") 
HotKeySet("{Home}", "Show") 
;~~~~~~~~~~~~~~~
GuiCreate("Spambot", 100, 50,(@DesktopWidth-100)/2, (@DesktopHeight-50)/2, $WS_DLGFRAME)
WinSetOnTop("Spambot", "", 1)
;~~~~~~~~~~~~~~~
$startSB = GuiCtrlCreateCheckbox("Start", 4, 1, 50, 20)
$Button_1 = GuiCtrlCreateButton("X", 95, 3, 18, 18)
$Buttonhelp = GUICtrlCreateButton("Help", 60, 3, 35, 18)
GuiSetState()
;~~~~~~~~~~~~~~~
While 1
$msg = GuiGetMsg()
;~~~~~~~~~~~~~~~
Select 
   Case GUICtrlRead($startSB) <> 4 
        While GUICtrlRead($startSB) <> 4 
          Spam() 
        WEnd 
   Case GUICtrlRead($startSB) = -15 
        ExitLoop 
 EndSelect
;~~~~~~~~~~~~~~~
Select 
Case $msg = $Buttonhelp 
msgbox(0, "Help", "Guild Wars needs to be in windowed mode. To run, check (Start) then click anywhere on the GW window. Press (Pause) to pause, press (End) to hide the window and press (Home) to show the window. Spambot was created for educational purposes only.") 
EndSelect
;~~~~~~~~~~~~~~~   
    Select
   Case $msg = $Button_1
        ExitLoop
    EndSelect
WEnd
;~~~~~~~~~~~~~~~  
Func Pause() 
$Paused = NOT $Paused 
While $Paused 
sleep(100) 
ToolTip('Spambot is currently paused.',0,0) 
WEnd 
ToolTip("") 
EndFunc 
;~~~~~~~~~~~~~~~ 
Func Hide() 
GUISetState(@SW_HIDE) 
EndFunc 
;~~~~~~~~~~~~~~~ 
Func Show() 
GUISetState(@SW_SHOW) 
EndFunc 
;~~~~~~~~~~~~~~~ 
;
;Funtion Spam 
Func Spam()
;Starting your char in pre searing ascalon district 1 
 Sleep(5000)
ToolTip('ENTER')
        Send('{ENTER}')
        Sleep(500)
ToolTip('TYPING')
        Send('~THE DARK REBELLION ACT~ recruiting rebels,bandits,and warlords~Ventrilo,forums,hall and cape http://fizban.f20.org/phbb2{ENTER}')
        MouseClick("left",230,40)
ToolTip('DIS 2')
        Sleep(2000)
        MouseClick("left",220,88);dis 2
        MouseClick("left",615,575)
ToolTip('WAITING')
        Sleep(20000)
;
ToolTip('ENTER')
        Send('{ENTER}')
        Sleep(500)
ToolTip('TYPING')
        Send('~THE DARK REBELLION ACT~ recruiting rebels,bandits,and warlords~Ventrilo,forums,hall and cape http://fizban.f20.org/phbb2{ENTER}')
        MouseClick("left",230,40)
ToolTip('DIS 3')
        Sleep(2000)
        MouseClick("left",220,102);dis 3
        MouseClick("left",615,575)
ToolTip('WAITING')
        Sleep(20000)
;
ToolTip('ENTER')
        Send('{ENTER}')
        Sleep(500)
ToolTip('TYPING')
        Send('~THE DARK REBELLION ACT~ recruiting rebels,bandits,and warlords~Ventrilo,forums,hall and cape http://fizban.f20.org/phbb2{ENTER}')
        MouseClick("left",230,40)
ToolTip('DIS 1')
        Sleep(2000)
        MouseClick("left",220,75);dis 1
        MouseClick("left",615,575)
ToolTip('Uncheck box now to stop the loop. Please wait about 10 seconds to close program.')
        Sleep(20000)
;
Endfunc

i actually managed to make a diablo 2 spam bot that reads from an ini file its really easy to learn about ini files especially when you made everyone on the forum think your a loser because you dont know wut they are. and if you need some help with the scripting i can help of the few things i understand spamming is one of them

Edited by Zmaster

A great place to start Autoit 1-2-3

Link to comment
Share on other sites

You might want to add in some random wait/sleep commands to make the bots seem more human, even if it is only waiting for a few hundred ms.

Just a suggestion to help avoid the ban wagon.

BTW: Thanks Foaman, I didn't think about the button-press delay factor, have to remember that in the future...

Link to comment
Share on other sites

  • 11 months later...

hey guys i bought guildwars yesterday.. this thread seems dead but some people might still be using it as reference. Anyway I made a little bot and tough I would share it since once of these script helped me alot, after trying for 2hours to find the color of blue items I found it here on this topic.

So this is a level bot to go from level 1-5 using the ranger pet (you can get it when you get to try other proffesions even if you arent a ranger and dont plan on using this as your second profeesion. The bot goes to the level 5 bull on lake place and kill it, go back to town and repeat. Its probably very buggy (i had to restard it only once in 1hour tho so maby not that bad) but it works good even if its very slow and im having problems with turn functions (ill work on a turn function based on mouse using a set of degrees wich should work MUCH better). it also pick up ANY items.

welll there are some requirments theyre written on top of the script. I hope this can be of some kind of use to someone.

;REQUIREMENTS: Max zoom out (must be the fartest from char). The biggest icons and french language. window mode

;TODO add timeouts

;set coorsd relative to client window
Opt ( "CaretCoordMode" , 2 )
opt ( "MouseCoordMode" , 2 )
opt ( "PixelCoordMode" , 2 )

global $TurnDelay = 500;time to wait befor each turn operation (turn left, right)
;HotKeySet( '9', 'left' );uncomment for testing
;HotKeySet( '0', 'right' )
WinActivate( 'Guild Wars' )
Sleep( 1000 )

global  $ItemColor_White = 16777215, $ItemColor_Blue = 0x99EEFF;item colors definition

;main bot loop
while 1
    GoOutsideAscalon()
    Sleep( 7000 )
    GoToBigBull()
    Sleep( 15000 )
    AttackBigBull()
    Sleep( 1000 )
    pickit()
    BackToAscalon()
WEnd

func GoOutsideAscalon()
    mouseclick( 'left', 586, 44, 1, 0 )
;1=near fence
;2=near stairs
    local $StartingPoint
    
;find wwhere we started
    $Sum = 0
    for $x = 891 To 918
        for $y = 189 to 216
            if PixelGetColor( $x, $y ) == 0xFFFFFF then $Sum += 1
        Next
    Next
    $StartingPoint = 2
    if $sum > 5 then $StartingPoint = 1
    
;act depending on the starting point and head outside
    Switch( $StartingPoint )
        case 1
        ;MsgBox(0,'','Starting point 1' )
            send( 'x' )
            Sleep( 2000 )
            Send( '{w down}' )
            for $i = 1 to 7
                Sleep( 1000 )
            Next
            send( '{w up}' )
            Sleep( 1000 )
            turn( 'left', 10 )
            Send( '{w down}' )
            While 1
                $pix1 = PixelGetColor( 200,20 )
                $pix2 = PixelGetColor( 220,20 )
                $pix3 = PixelGetColor( 240,20 )
                $pix4 = PixelGetColor( 260,20 )
                $pix5 = PixelGetColor( 280,20 )
                $pix6 = PixelGetColor( 300,20 )
                if $pix1 == 0x000000 and $pix1 == $pix2 and $pix1 == $pix3 and $pix1 == $pix4 and $pix1 == $pix5 and $pix1 == $pix6 then ExitLoop
            WEnd
            send( '{w up}' )
        case 2
        ;MsgBox(0,'','Starting point 2' )
            Send( '{w down}' )
            Sleep( 100 )
            Send( '{w down}' )
            While 1
                $pix1 = PixelGetColor( 200,20 )
                $pix2 = PixelGetColor( 220,20 )
                $pix3 = PixelGetColor( 240,20 )
                $pix4 = PixelGetColor( 260,20 )
                $pix5 = PixelGetColor( 280,20 )
                $pix6 = PixelGetColor( 300,20 )
                if $pix1 == 0x000000 and $pix1 == $pix2 and $pix1 == $pix3 and $pix1 == $pix4 and $pix1 == $pix5 and $pix1 == $pix6 then ExitLoop
            WEnd
            send( '{w up}' )
    EndSwitch
EndFunc

func GoToBigBull()
;go to the bull on the lake
    for $i = 1 to 12
        turn( 'right', 1 )
        Sleep( 100 )
    Next
    Sleep( 1000 )
    Send('{w down}')
    Sleep( 100 )
    Send('{w down}')
    for $i = 1 to 17
        Sleep( 1000 )
    Next
    Send('{w up}')
    Sleep( 100 )
    Send('{w up}')
    Sleep( 1000 )
    turn( 'left', 6 )
    Sleep( 1000 )
    Send('{w down}')
    while 1
        Send('{TAB}')
        Sleep( 100 )
        if PixelChecksum(370,29,586,44) == 993448726 then ExitLoop
        Sleep( 100 )
    WEnd
    Send('{w up}')
    Send('{SPACE}')
EndFunc

func AttackBigBull()
    while 1
    ;EDIT YOUR ATTACK ROUTINE HERE.
        Send( '1' )
        Sleep( 4000 )
        Send( '2' )
        Sleep( 4000 )
    ;0xD83D3D
        PixelSearch(282,7,686,111,0xD83D3D,10,2)
        if @error then ExitLoop
    WEnd
EndFunc

func Pickit()
;TODO Scan more pixels maby because some monsters have white graphics (bandits is an example)
;TODO find a way that it dsent try to pickup the sky... lol
;TODO: Scan multiple time using different start value to speed up, so if u dont find on first scan, start again with the same xstart value + offset.
    $Item_MinimumPixel = 10;the number of pixel that must match an item color in order to be considered an item
    $X_ScanStep = 10;step used in scanning the whole screen
    $Y_ScanStep = 5;same but for y axis
    $X_ScanStart = 272;next 4 vars are start*stop values of scan
    $Y_ScanStart = 3
    $X_ScanStop = 738
    $Y_ScanStop = 631
    $Item_XMax = 300; maximum x size of an item name (used to search)
    $Item_YMax = 20; same as above
    local $PixelsMatched = 1, $ItemFound[3];func vars dont edit
;start scanning
    for $y = $Y_ScanStart to $Y_ScanStop step $Y_ScanStep
        for $x = $X_ScanStart to $X_ScanStop step $X_ScanStep
        ;Sleep( 1 )
        ;check if we have a pixel that match an item color
            local $currPixel = PixelGetColor( $x, $y )
            if  $currPixel == $ItemColor_White or  $currPixel == $ItemColor_Blue  then 
                MouseMove( $x, $y, 0 )
            ;scan around to find more pixels of the same color
                for $iX = $x - $Item_XMax / 2 to $x + $Item_XMax / 2
                    for $iY = $y - $Item_YMax / 2 to $y +$Item_YMax / 2
                        $currPixel = PixelGetColor( $iX , $iY )
                        if  $currPixel ==  $ItemColor_White or  $currPixel == $ItemColor_Blue  Then
                        $PixelsMatched += 1
                        if $PixelsMatched == $Item_MinimumPixel Then
                            $ItemFound[0] = true 
                            $ItemFound[1] = $x
                            $ItemFound[2] = $y 
                            ExitLoop 4
                        EndIf
                    EndIf
                    Next
                Next
            EndIf
        Next
    Next
    if $ItemFound[0] == true Then
    ;we found an item
        MouseMove( $ItemFound[1], $ItemFound[2] )
        mouseclick('left')
        Sleep( 1000 )
    EndIf
;exit
EndFunc

func BackToAscalon()
    send('m')
    Sleep( 4000 )
    MouseClickDrag( 'left', 25,20,833,626 )
    Sleep( 1000 )
    MouseClick( 'left', 929, 591 )
    Sleep( 5000 )
    MouseClick( 'left', 657, 516 )
    Sleep( 15000 )
EndFunc

func left()
    turn( 'left', 1 )
EndFunc

func right()
    turn( 'right', 1 )
EndFunc

func Turn( $Direction, $Repeat )
;GAY ASS BUGGY FUNCTION
;direction = left or right
;repeat = 1 for 1 click, 2 for 2 click, etc...
    for $i = 1 to $Repeat
        Switch( StringLower( $Direction ) )
            case 'left'
                Send("{a down}")
                sleep ( 50 )
                Send("{a up}")
            case 'right'
                Send("{d down}")
                sleep ( 50 )
                Send("{d up}")
        EndSwitch
        Sleep( $TurnDelay )
    Next
EndFunc
Link to comment
Share on other sites

quick update, I made an item identifier, its still very beta like the above script but is very promising.

Ok well this generates an array of data that can be used to detect wich item it is. I tested it on gold, and i can detect if a white item is droped is gold or something else. If it is gold the the $sum2[0] (wich is an array of data read from the game) is 0x421085e1. in order to use this function you must detect an item, find the bottom-most pixel matching the item color you are scanning (white in the case of gold) and pass the x,y coords of that pixel, along with the color you are scanning to the function.

func GetItemCode( $x, $y, $color )
;find the left side of the item
    local $Left = $x, $Top = $y, $Right = $x, $Bottom = $y, $file = FileOpen( 'Log.txt', 2 )
    local $LastFound, $ConsecutiveFails = 0, $TotalColors = 0

;find left (not accurate but required)
    for $i = $x to $x - 300 step -1
    ;scan horizontal to be sure there is a pixel matching our color or not in the item name
        for $a = $y - 14 to $y + 14
            $tmpColor = PixelGetColor( $i, $a )
        ;FileWriteLine( $file, 'Scanning: ' & $i & ',' & $a & ' ' & PixelGetColor( $i, $a ) )
            if $tmpColor == $color then ExitLoop
            ;$TotalColors +=1
        ;EndIf
        Next
        if $tmpColor == $color then 
    ;if $TotalColors > 3 then 
        ;MsgBox( 0, '', 'found color' )
            $LastFound = $i
            $ConsecutiveFails = 0
        Else
            $ConsecutiveFails += 1
        EndIf
        if $ConsecutiveFails > 30 then 
            $Left = $LastFound 
            ExitLoop
        EndIf
    Next
;find bottom (not accurate but required)
    for $i = $y to $y + 14
    ;scan vertically to be sure there is a pixel matching our color or not in the item name
        for $a = $x - 14 to $x + 14
            $tmpColor = PixelGetColor( $a, $i )
            if $tmpColor == $color then ExitLoop
        Next
        if $tmpColor == $color then 
            $LastFound = $i
            $ConsecutiveFails = 0
        Else
            $ConsecutiveFails += 1
        EndIf
    ;if $ConsecutiveFails > 1 then 
    ;   $Bottom = $LastFound
    ;   ExitLoop
    ;EndIf
    Next
    $bottom = $LastFound

    MouseMove( $left, $bottom + 5 )
    Sleep( 200 )
;find y axis of the white line underneat the text
    local $Yaxis = 0, $found = false
    for $y3 = $bottom to $bottom + 10
        for $x3 = $left to $left + 50
            if PixelGetColor( $x3, $y3 ) <> $color then ExitLoop
            if $x3 >= $left +45 then 
                $found = True
                $Yaxis = $y3
                ExitLoop 2
            EndIf
        Next
    Next
    if $found Then
    ;MsgBox( 0, '', $Yaxis )
    Else
    ;MsgBox( 0, '', 'Not found' )
    EndIf
;find left
    for $x4 = $left + 10 to 0 step -1
        if PixelGetColor( $x4, $Yaxis) <> $color then 
            $left = $x4 + 1
            ExitLoop
        EndIf
    Next
;find right
    for $x4 = $left to 1000 
        if PixelGetColor( $x4, $Yaxis) <> $color then 
            $right = $x4 - 1
            ExitLoop
        EndIf
    Next
;MouseMove( $left, $Yaxis )
;MouseMove( $right, $Yaxis )
    local $sum2[255];array of bytes
    local $sum = 0, $index = 1, $byteIndex = 0
    for $x5 = $right to $left step -3
        for $y5 = $Yaxis to $Yaxis - 14 step -3
            if PixelGetColor( $x5, $y5 ) == $color then
                $sum += $index
            EndIf
            $index = $index *2
            if $index > 4294967295 then 
            ;add the byte into the array
                $sum2[$byteIndex] =  Hex( $sum ) 
                $sum = 0
                $byteIndex += 1
                $index = 1
            EndIf
        Next
    Next
;built the string off the bytes
    $bytestring = ''
    for $i =  $byteIndex to 0 step -1
        $bytestring &= $sum2[$i] & ' '
    Next
    StringReplace( $bytestring, '0','')
    MsgBox( 0, '' , $bytestring )
EndFunc
Edited by ramadash
Link to comment
Share on other sites

Lifewatct (life and mana) accurate to a couple %.

must use LARGER UI display, window mode

Opt ( "CaretCoordMode" , 2 )
opt ( "MouseCoordMode" , 2 )
opt ( "PixelCoordMode" , 2 )

func GetManaPercent()
    local $LifeIndex = -1
    for $x = 517 to 760
        if PixelGetColor( $x, 644 ) == 7502 then 
            $LifeIndex = $x
            ExitLoop
        EndIf
    Next
    if $LifeIndex = -1 then return 100
    return Round( ( ( $LifeIndex - 517 ) / 243 ) * 100 ) - 6
EndFunc
func GetLifePercent()
    local $LifeIndex = -1
    for $x = 246 to 493
        if PixelGetColor( $x, 644 ) == 5711645 then 
            $LifeIndex = $x
            ExitLoop
        EndIf
    Next
    if $LifeIndex = -1 then return 100
    return Round( ( ( $LifeIndex - 246 ) / 247 ) * 100 )
EndFunc
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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