i'm trying to make a macro that do the auto fishing in Black desert mmorpg game.
fishing is the part of the mini game in this BDO. look at the image that i attached to that i can explain how it should work.
so basically it has to look at the words that pop up in the middle of the screen and type the letter keys.
i made it work with one screen image but the game screen is keep changing and the word image color change every different mini games.
so even though i use the imagesearch option with *number and *trans, it won't work well.
in the code, you can find what i'm tying to do in sub function called matching.
any advice or idea would be very helpful.
thanks all.
Code: Select all
Matching:
MsgBox Good so far?.
Loop 3
{
ImageSearch, BoxX, BoxY, 700, 450, 1200, 600, *90 *TransBlack C:\Users\DonYoo\Desktop\blackdesert\type2.PNG
if (ErrorLevel = 0)
{
MsgBox Box %BoxX% %BoxY% find it.
WordEndX := BoxX+100
WordEndY := BoxY+80
Loop 9
{
ImageSearch, WordStartX, WordStartY, BoxX, BoxY, WordEndX, WordEndY, *100 *TransBlack C:\Users\DonYoo\Desktop\blackdesert\D.PNG
if (ErrorLevel = 0)
{
MsgBox D %WordStartX% %WordStartY%
}
else
{
ImageSearch, WordStartX, WordStartY, BoxX, BoxY, WordEndX, WordEndY, *100 *TransBlack C:\Users\DonYoo\Desktop\blackdesert\E.PNG
if (ErrorLevel = 0)
{
MsgBox E %WordStartX% %WordStartY%
}
else
{
ImageSearch, WordStartX, WordStartY, BoxX, BoxY, WordEndX, WordEndY, *100 *TransBlack C:\Users\DonYoo\Desktop\blackdesert\F.PNG
if (ErrorLevel = 0)
{
MsgBox F %WordStartX% %WordStartY%
}
else
{
ImageSearch, WordStartX, WordStartY, BoxX, BoxY, WordEndX, WordEndY, *100 *TransBlack C:\Users\DonYoo\Desktop\blackdesert\S.PNG
if (ErrorLevel = 0)
{
MsgBox S %WordStartX% %WordStartY%
}
else
{
MsgBox Out of loop
break 2
}
}
}
}
BoxX := WordStartX+16
BoxY := WordStartY-5
WordEndX := BoxX + 32
WordEndY := BoxY + 20
MsgBox NEXT %BoxX% %BoxY% %WordEndX% %WordEndY%
}
}
}
Return