Quote:
Originally Posted by argentino
I did some changes to the script to make it look a little like mine, with this you can download the OP jpg file and rename to cobweb.jpg and use it directly, and it will automatically hold alt down no need for a coin.
Code:
#include <ImageSearch.au3>
MsgBox(0,"Notice","Click Ok to start. Make sure you have Mabinogi window maximized.")
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("!{ESC}", "Stop") ;script can be stopped by pressing ESC
$x1=0
$y1=0
While (1)
Send("{LALT down}")
$result = _ImageSearch("cobweb.jpg",1,$x1,$y1,100) ;change the cobweb.jpg if you want to pick up something else.
if $result=1 Then
MouseMove($x1,$y1,3)
MouseClick("left",$x1,$y1,1,3)
Sleep(2000) ;Enough time for the character to go pick up the cobweb. You can change it if you want (2000 = 2 seconds so 1000 = 1 second)
EndIf
WEnd
Func TogglePause()
$Paused = not $Paused
While $Paused
ToolTip("paused")
sleep(100)
WEnd
EndFunc
Func Stop() ;to allow the script to stop
Exit ;same
EndFunc ;same
|
Ok so, you seem to know what you're doing, so I've got a question, I took your code, tried to understand it as best I could and then tried to make this from it:
Code:
#include <ImageSearch.au3>
MsgBox(0,"Notice","Click Ok to start. Make sure you have Mabinogi window maximized.")
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("!{ESC}", "Stop") ;script can be stopped by pressing ESC
$x1=0
$y1=0
While (1)
Send("{LALT down}")
$result = _ImageSearch("herb.jpg",1,$x1,$y1,100) ;change the herb.jpg if you want to pick up something else.
if $result=1 Then
MouseMove($x1,$y1,3)
MouseClick("left",$x1,$y1,1,3)
Sleep(1000) ;Enough time for the character to go pick up the cobweb. You can change it if you want (2000 = 2 seconds so 1000 = 1 second)
if $result=0 Then
Send("{LALT up}")
$result = _ImageSearch("manaherb.jpg",1,$x1,$y1,100)
if $result=1 Then
MouseMove($x1,$y1,3)
MouseClick("left",$x1,$y1,1,3)
Sleep(3000)
if $result=0 Then
$result = _ImageSearch("baseherb.jpg",1,$x1,$y1,100)
if $result=1 Then
MouseMove($x1,$y1,3)
MouseClick("left",$x1,$y1,1,3)
Sleep(3000)
if $result=0 Then
$result = _ImageSearch("bloodyherb.jpg",1,$x1,$y1,100)
if $result=1 Then
MouseMove($x1,$y1,3)
MouseClick("left",$x1,$y1,1,3)
Sleep(3000)
if $result=0 Then
$result = _ImageSearch("goldenherb.jpg",1,$x1,$y1,100)
if $result=1 Then
MouseMove($x1,$y1,3)
MouseClick("left",$x1,$y1,1,3)
Sleep(3000)
if $result=0 Then
$result = _ImageSearch("sunherb.jpg",1,$x1,$y1,100)
if $result=1 Then
MouseMove($x1,$y1,3)
MouseClick("left",$x1,$y1,1,3)
Sleep(3000)
EndIf
EndIf
EndIf
EndIf
EndIf
EndIf
WEnd
Func TogglePause()
$Paused = not $Paused
While $Paused
ToolTip("paused")
sleep(100)
WEnd
EndFunc
Func Stop() ;to allow the script to stop
Exit ;same
EndFunc ;same
my idea is to have it auto search for herb patches and pick them (for use in homesteads) does this code look right or am I doing it wrong? Help would be appreciated for a noob like me :3