Sunday, August 23, 2009

Auto Synthesis!

I neglected on checking older posts for new comments :X
As a result, here's what I had for a Synthesis-bot. It's pretty straight forward, though I havn't tested it in a loooooong time, so I cannot vouch for quality.



It's an easy couple codes, I even had mine buying and selling silver rings (4synths @ 10macca each + cost of crappy tarot)

Here's a couple codes, the pixelsearch-area is my inventory box (reset your window position to defaults to avoid constantly changing the coords. and the pixel color it searches for is a tarot card. Simple!

Func _FindTarot()
$Tarot = PixelSearch(543,355,904,493,0x9695C5)
If @error Then
ConsoleWrite("Unable to find Tarot: " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)
TogglePause()
_CloseMe()
EndIf
EndFunc


same as previous, but searches for a silver ring to click a silver ring that doesnt have the 'faded' effect from being broke infact.

Func _FindItem()
$Item = PixelSearch(543,355,904,493,0x808682)
If @error Then
ConsoleWrite("Unable to find Item: " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)
$Item = 0
EndIf
EndFunc

After this, all there is left to do is some clicks for hitting the buttons and starting tarot fusion again.



This was the main script, might not work. I don't know what resolution I was using, etc:


;Click Synth
Do
Send("{F11}")
sleep(250)
Until PixelGetColor(171,309) = 0x10222D

_FindTarot()
;Click Tarot
MouseClick("left",$Tarot[0],$Tarot[1])
sleep(250)
MouseClick("left",$Tarot[0],$Tarot[1])
sleep(250)
MouseClick("left",$Tarot[0],$Tarot[1])
sleep(500)

_FindItem()
If $Item = 0 Then
;Click Cancel
MouseClick("left",459,589)
sleep(500)
_Store()
Else
;Click Item
MouseClick("left",$Item[0],$Item[1])
sleep(250)
MouseClick("left",$Item[0],$Item[1])
sleep(250)
MouseClick("left",$Item[0],$Item[1])
sleep(500)
;Click Execute
MouseClick("left",309,524)
sleep(500)
EndIf
sleep(2500)




This isn't accounting for initializing any variables though. G'luck :)

5 comments:

  1. thanks alot for this guides, never used AutoIt before, and with ur examples i managed to get my synth script going :D trying to add buying / selling rings to shop too next, having most prob with actually selecting the shop dude, but i will figure it -_-

    ReplyDelete
  2. What I did was move my char right infront of the NPC so he literally covers 1/3rd the screen.

    Then I had autoIt click the same position (I used the center of my back as a reference for where he 'is').

    Only effort it requied on my part was adjusting the camera each time before I ran the script.

    *you CAN click through players/demons to select NPCs ;)
    *Choose an empty server

    ReplyDelete
  3. thats a good idea, thanks :) i was using his skin color as reference, but sometimes it wouldnt find it , this will work better i think :)

    ReplyDelete
  4. update : ok i made a bit patchy script, but it finally does the job, thanks a bunch man :D didnt feel too comfortable with putting much condition-checks, so i just made it "hardcoded" for 20 rings, fill the rest of my inv with cards, and it works like a charm ;)

    guess only thing i have left now is to automate going to saint germain and buying more cards, but i think thats bit too much for me xD

    ReplyDelete
  5. Yeah, I gave up on that part too *lazy*

    That tarots will fail often until sometime between synth 1 and 2.
    Just EQ all the -luck and -int gear you can for more fails :D


    Cheers.

    ReplyDelete