Sign in to follow this  
Followers 0
Akira056

little help on scrip?

2 posts in this topic

i'm not sure how this work but something wrong around imagesearch if anyone can help correct.

#include <pic.au3>

HotKeySet("{ESC}", "Terminate")

MsgBox(0,"Spirit Weapon","what?")

WinActivate("Mabinogi")

WinActive("Mabinogi")

; General purpose coords

Global $x

Global $y

Global $cx

Global $cy

While 1

TalkToEgo()

Check()

WEnd

Func TalkToEgo()

Send("{/}")

Sleep(5000)

MouseClick("Primary", 430, 783, 1)

Sleep(4000)

MouseClick("Primary", 253, 783, 1)

Sleep(2000)

EndFunc

Func Check()

$c = _ImageSearch("unhappy.BMP",0,$cx,$cy,30)

If $c=1 Then

Feed()

Return

EndIf

$c = _ImageSearch("fine.BMP",0,$cx,$cy,30)

If $c=1 Then

CloseEgo()

Return

EndIf

EndFunc

Func Feed()

MouseClick("Primary", 342, 783, 1)

Sleep(4000)

MouseClick("Primary", 251, 785, 1)

Sleep(2000)

MouseClick("Primary", 807, 506, 1)

Sleep(2000)

MouseClick("Primary", 907, 581, 1)

Sleep(4000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 500, 700, 1)

Sleep(1000)

MouseClick("Primary", 1000, 583, 1) ; cancel

Sleep(2000)

MouseClick("Primary", 257, 785, 1) ; continue

Sleep(4000)

MouseClick("Primary", 545, 785, 1) ; finish

Sleep(4000)

MouseClick("Primary", 272, 782, 1) ; end

Sleep(4000)

EndFunc

Func CloseEgo()

MouseClick("Primary", 545, 785, 1) ; finish

Sleep(4000)

MouseClick("Primary", 272, 782, 1) ; end

Sleep(4000)

EndFunc

Func cc()

MouseClick("Primary", 143, 865, 1) ; cross

Sleep(4000)

MouseClick("Primary", 210, 533, 1) ;cc

Sleep(4000)

MouseClick("Primary", 823, 568, 1) ;close

Sleep(4000)

MouseClick("Primary", 604, 440, 1) ;ch1

Sleep(4000)

MouseClick("Primary", 607, 594, 1) ;ok

Sleep(420000)

EndFunc

Func Terminate()

Exit 0

EndFunc

Share this post


Link to post
Share on other sites



Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0