Had this around for a while,and seeing nothing similar being posted(save for cobweb gathering ones) thought I'd put it here in case anyone has any kind of use for this.It did rely on mod_potato's autopick for gathering cobwebs from a spider-farm so commented that part for obvious reasons.
Might need more crippling on some parts,I won't bother testing it as I don't play mabi anymore(testing it crippled I mean,it worked fine otherwise)
Images needed etc on comments.
Might need more crippling on some parts,I won't bother testing it as I don't play mabi anymore(testing it crippled I mean,it worked fine otherwise)
Images needed etc on comments.
Code:
#Include <Imagesearch.au3>
#include <GUIConstantsEX.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
MsgBox (0,"Startbox","Push ok to start")
HotKeySet("{ESC}", "Terminate")
WinActivate("Mabinogi")
WinActive("Mabinogi")
Global $inputweavingbutton,$weavingbutton
;$fullinv=0
Popup()
Sleep (2000)
;Commenting this out cause it relied on potato's auto pick up feature.
;Do ;This starts gathering cobwebs,make sure you are at the spider farm without autopick
; GatherCobwebs()
;Until $fullinv=1
While 1 ;Main loop of weaving,gathering,blabla
While $fullinv=1
GoinHS()
Weave()
Sleep(1000)
OutofHS()
Popupwait()
;If $fullinv=0 Then
; Do
; GatherCobwebs()
; Until $fullinv=1
;EndIf
WEnd
WEnd
;Func GatherCobwebs() ;Function that gathers cobwebs,obviously needs a working mod_potato for autopick
; Send ("{Enter}")
; Send ("/pick")
; Send ("{Enter}")
; Sleep(30000)
; CheckINV()
; If $fullinv=1 Then
; Send ("{Enter}")
; Send ("/pick")
; Send ("{Enter}")
; EndIf
; Sleep(1000)
;EndFunc
Func GoinHS()
Send ("{U}")
$goin=_Imagesearch("Goin.jpg",$x,$y,80) ;Image is supposed to be the homestead entry button
MouseClick("left",$x,$y,1,2)
EndFunc
Func Popup()
GUICreate("Thin Thread bot",328, 128, 202, 178)
$inputweavebutton=GUICtrlCreateInput("",184, 32, 25, 21,$ES_UPPERCASE)
GUICtrlSetLimit(-1, 2)
$Label1 = GUICtrlCreateLabel("Weaving Skill Button", 120, 32, 64, 40)
$Button1 = GUICtrlCreateButton("Start!", 128, 96, 75, 25, 0)
GUISetState(@SW_SHOW)
Do
$msg = GUIGetMsg()
If $msg = $button1 Then
$weavingbutton=Number(GuiCtrlRead($inputweavingbutton))
$msg = $GUI_EVENT_CLOSE
EndIf
Until $msg = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc
Func Popupwait()
GuiCreate("Waiting",100,150,100,100)
$Button1=GuiCtrlCreateButton("Start Again!",50,100,50,50,0)
GUISetState(@SW_SHOW)
Do
$msg=GUIGetMsg()
If $msg=$Button1 Then
$msg=$GUI_EVENT_CLOSE
EndIf
Until $msg=$GUI_EVENT_CLOSE
GuiDelete()
EndFunc
Func OutofHS()
Send ("{U}")
$goout=_Imgesearch("goout.jpg",$x,$y,80) ;Suppoosed to be the button that gets you out of homestead.
MouseClick("left",$x,$y,1,2)
EndFunc
Func Weave()
Send("{$weavingbutton}")
$count=0
$result1 = _ImageSearch("Cobweb.bmp",1,$x1,$y1,100) ;Stack of 5 cobwebs in inventory slot.
$result2 = _ImageSearch("Slot.bmp",1,$x2,$y2,100) ;Empty slot at production window.
While $result1=1
Do
$result1 = _ImageSearch("Cobweb.bmp",1,$x1,$y1,100)
$result2 = _ImageSearch("Slot.bmp",1,$x2,$y2,100)
If $result1=1 and $result2=1 Then
MouseMove($x1,$y1,1)
MouseClick("left",$x1,$y1,1,1)
Sleep(100)
MouseMove($x2,$y2,1)
MouseClick("left",$x2,$y2,1,1)
Sleep(100)
$count=$count+1
EndIf
Until $count=10
If $count=10 Then
$button= _Imagesearch("start.jpg",1,$x,$y,100) ;Start button of production window.
MouseClick ("left",$x,$y,1,1)
EndIf
Send("{$weavingbutton}")
$result1= _ImageSearch("Cobweb.bmp",1,$x1,$y1,100)
$result2 = _ImageSearch("Slot.bmp",1,$x2,$y2,100)
$count=0
WEnd
If $result1=0 Then
$result3=_Imagesearch("cancel.jpg",1,$x,$y,100) ;Cancel button on production window.
Mouseclick ("left",$x,$y,1,1)
;$fullinv=0
EndIf
EndFunc
;Func CheckINV()
; $result=_Imagesearch("emptyinvslot.jpg",1,$x,$y,90) ;Empty inventory slot image.
; If $result=0 Then
; $fullinv=1
; EndIf
;EndFunc