Alright guys, here's my preliminary, and bad-as-hell version of an auto fossil miner. What it does is click in place (somehow, I managed to fail to imagesearch the sulfur site *shrug* Maybe I'll fix it, or I'll let one of you do that =D)
Then, instead of failing to imagesearch the fossil, I made it use the same string I used for metallurgy, so that worked. You'll hafta edit your fossils to contain the words "Metallurgy Site". Actually, you're probably better off not using this bot, because it fails so hard -_-
Code:
/******************************Start Inititalization
*/
MineX = 0
MineY = 0
Startchannel = 1
Currentchannel := Startchannel
CCX = 100
CCY = 300
CCWarnCloseX= 600
CCWarnCloseY= 400
C1X = 342
C1Y = 268
CHX := C1X
IncY = 12
CCAcceptX = 377
CCAcceptY = 422
/******************************End Initialization
*/
/******************************Start Functions
*/
Pickup()
{
global
Loop
{
MouseMove 50,50
Sleep 150
Send {LALT DOWN}
Sleep 100
ImageSearch MX, MY, MineX-250, MineY-200, MineX+250, MineY+200, *100 *TransBlack Ore2.gif
If (ErrorLevel = 0)
{
MX += 20
MY += 8
MouseMove MX, MY
Sleep 100
Click
Sleep 100
}
If (ErrorLevel = 1)
Break
}
SEND {LALT UP}
}
Mine(MineX, MineY)
{
MouseMove %MineX%, %MineY%
Sleep 100
Click
Sleep 6000
}
NextChannel()
{
global
WinWait, Mabinogi : Dragon,
IfWinNotActive, Mabinogi : Dragon, , WinActivate, Mabinogi : Dragon,
WinWaitActive, Mabinogi : Dragon,
CurrentChannel += 1
If (CurrentChannel = 8)
CurrentChannel = 1
ChannelDifference := CurrentChannel - 1
ChannelYDifference := IncY * ChannelDifference
NextY := C1Y + ChannelYDifference
;MsgBox %CCX%, %CCY%
Send {LWIN}
Sleep 250
MouseMove %CCX%, %CCY%
Sleep 250
Click
Sleep 250
MouseMove %CCWarnCloseX%, %CCWarnCloseY%
Sleep 250
Click
Sleep 250
MouseMove %CHX%, %NextY%
Sleep 250
Click
Sleep 250
MouseMove %CCAcceptX%, %CCAcceptY%
Sleep 250
Click
PixelGetColor StartColor, 150, 150, Slow
Loop
{
PixelGetColor CCCheck,150,150,Slow
If (CCCheck =! StartColor)
{
break
}
}
Sleep 8000
}
/******************************End Functions
*/
/****************************** Start Hotkeys
*/
$F1::
MouseGetPos MineX,MineY
Loop
{
Loop 50 ;put # of times 1 pickaxe can be used before swapping
{
Loop 9
{
Mine(MineX, MineY)
Pickup()
}
NextChannel()
}
}
return
$F2::
NextChannel()
return
$F3::
MouseGetPos MouseX,MouseY
PixelGetColor StartColor, MouseX, MouseY, Slow
MsgBox %StartColor%
return
$F11::
Pause Toggle
return
$F12::
Reload
return
/******************************End Hotkeys
*/
Um... that's .ahk. Zoom all the way out using 600x800 windows mode. Click F1 with your mouse over a sulfur site. Start in ch 1. It'll mine that site a number of times, then CC >.<
Told you its fail. Its a workable frame tho. I don't think I'll be updating it much. If someone else wants to take this code and fly with it, be my guest.
Image for the "Metallurgy Site" attached
If this doesn't work for you, don't tell me that. I know. I re-itterate, its not good by any means.
Make it imagesearch the sites, that's prob your best bet. Then... well... improve on it >.>
Of course, use bitmap fonts, OR create your own image (In which case, use the word "Sulfur" cuz that would be a lot more intelligent)