Help me with FishBot

04/17/2010 21:02 Eflyax#1
I made a simple fishbot. But I need help with the syntax :(

WinWaitActive ("METIN2")
$raby = Send("{SPACE}")
while 1
$coord = PixelSearch( 393, 126, 412, 133, 0xFCF8FC, 30)
If Not @error Then
$ryba = Send("{SPACE}")
EndIF
IF $ryba Then
Send("{F4}")
EndIF
WENd

When you find the fish so he pulls himself and NAND bait but then stops.
I do not know how I create the loop itself to hunt fish. Everything is OK except for the loop.
I imagine it like this:
Fishbot on ...
Cast rod. (Send space)
Wait for the fish.
Pull rod.
Apply bait. (Send F4)
-> And still the circle (loop)
Excuse my bad English, I used Google Translate.

Thank you very for your help! :)
04/17/2010 21:10 kajaman#2
Hey do you want the bot to restart after he got a fish ?
is your problem that the bot stops after getting a fish ?
04/17/2010 21:14 Eflyax#3
Quote:
Originally Posted by kajaman View Post
Hey do you want the bot to restart after he got a fish ?
is your problem that the bot stops after getting a fish ?

Yes, he used bait fish catch and stop working.
The problem is in that condition:
$coord = PixelSearch( 393, 126, 412, 133, 0xFCF8FC, 30)
If Not @error Then
$ryba = Send("{SPACE}") << here
EndIF
IF $ryba Then
Send("{F4}")
EndIF
WENd

There is the problem, those commands work only as long as the fish will appear. then it's over.

Game: Metin2
04/17/2010 21:22 kajaman#4
I think it must be right now you made $ fish but it must be $fish anit must be ("{Space}")
Code:
WinWaitActive (Metin2)
$Fish = Send ("(SPACE)")
While 1
$Coord = PixelSearch (393, 126, 412, 133, 0xFCF8FC, 30)
If Not @error Then
$Fish = Send ("(SPACE)")
Endif
IF $fish = 0 Then
Send ("(F4)")
Endif
Wend
tell me if it isnt working ;)
04/17/2010 21:28 Eflyax#5
WinWaitActive (Metin2)
$ Fish = Send ("(SPACE)")
WHILE 1
$ Coord = PixelSearch (393, 126, 412, 133, 0xFCF8FC, 30) <<That's okay, It Works
If Not @ error Then <<condition: if it turns out to fish ...
$ Fish = Send ("(SPACE)") <<press the space bar (pull out a fish)
And here I need to add additional commands. These commands do not work but because the fish disappears and it stops working.
(Pulls out the fish and continue doing nothing)
Endif
Wend
04/17/2010 21:31 Eflyax#6
I need that there was a functional loop:

1 search for fish.
2 Pull the fish
3, use bait rod
4 cast a rod into the water

A repeat from the beginning (loop)
04/17/2010 21:39 kajaman#7
Dont know sry i Look for an answere
04/17/2010 21:48 Eflyax#8
[Only registered and activated users can see links. Click Here To Register...]