Post Reply Home » Forums » Guild Wars » GW Submissions

Pre-Sear Macro : GW Submissions

Posted: June 13th, 2007
dlm_bittersweet
This is a basic Autoit v3 macro for Pre-searing warriors that I've been working on. Currently it is capable of targeting/attacking, which was easy enough. It also picks up blue/purple items that drop, and heals when your health is too low. Keep in mind: Your health bar will need to be in the default position for the healing to work correctly, otherwise it will always go off. I've been trying to get it to find words using a series of PixelSearch functions, but have had no luck so far. The macro is currently pretty basic, but i plan to expand on it, and having access to more powerful scripting programs (XUnleashed) would help with targeting items such as worn belts/other collectibles and gold.

Code: Select all

#cs ----------------------------------------------------------------------------
	
	AutoIt Version: 3.2.2.0
	Author:  DLM_Bittersweet
	
	Script Function:	Pre-Sear basic Farming bot with Magic item detection

	Build: W/Mo
Slot 1= Sever Artery
Slot 2= Gash
Slot 3 = Healing Signet
Slots 5-7 = UNUSED
Slot 8 = Retribution
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <Array>

$health = 0
$Adren = 0
$coord = 0
$coord2 = 0
$apix1 = 0
$apix2 = 0
$a = 0
WinActivate( "Guild Wars")
Func Target()
	send("c")
	send( "{SPACE}" )
EndFunc

Func IsComboCharged()
	$apix1 = PixelGetColor( 441, 912 )
	$apix2 = PixelGetColor( 505, 917 )
	If Not ($apix1 = 16403207) & ($apix2 = 14898717) Then
		$Adren = 0
	Else
		$Adren = 1
	EndIf
EndFunc


Func Magic()
	$coord = PixelSearch(4,4,1270,985, 0x99EDFE, 2, 1)
	If Not @error Then 
		MouseMove($coord[0],$coord[1],0) 
		Sleep (500) 
		MouseClick("left",$coord[0],$coord[1]) 
		Sleep (2000)
	EndIf
	$coord2 = PixelSearch(4,4,1270,985, 0xBA88ED, 2, 1)
	If Not @error Then 
		MouseMove($coord2[0],$coord2[1],0) 
		Sleep (500) 
		MouseClick("left",$coord2[0],$coord2[1]) 
		Sleep (2000)
	EndIf
EndFunc

Func Combo()
	Call("IsComboCharged")
	If ($Adren = 1) Then
		send("1")
		Sleep(Random(1100, 1300))
		Send("2")
	ElseIf ($Adren = 0) Then
		Sleep(500)
	EndIf
EndFunc


Func Heal()
	$health = PixelGetColor( 561, 886 )
	If Not ($health = 11798279) Then
		Send("3")
	EndIf
EndFunc

Func All()
	Send("8")
	Sleep(Random(2100,2900))
	Do
		Call("Magic")
		Call("Heal")
		Call("target")
		Sleep(Random(3000,4000))
		Call("Combo")
		Call("Magic")
		Call("Heal")
		$a = $a + 1
	Until $a = 150
EndFunc

Call("All")
	
	
Currently expanded, the health function is now working more correctly, but the combo function, I can't find a stable way of telling if they are charged or not.


Last edited by Guest on June 16th, 2007, 6:18 pm, edited 3 times in total.
Posted: June 13th, 2007
User avatar
administrator
Total Posts:29918 Joined:2002
Can premium members say yay or nay to this being moved to a confirmed section.
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 29 guests
Post Reply