Naja hier der Bot, hab noch den Fischkiller reingemacht. Also das mit dem Then hab ich vergessen mein fehler.
Aber die $taste is ja mit
PHP Code:
$Taste = "F" & ( $Slotnr - 4 )
eigentlich definiert oder?
Fischblase is au definiert, und Exitloop is in einer While 1 schleife.....
Und naja das WEnd steht au mit einem While...
PHP Code:
Opt ( "MouseCoordMode", 2 )
Opt ( "PixelCoordMode", 2 )
WinActivate ( "METIN2" )
WinWaitActive ( "METIN2" )
Global $Slot[8][2]
$Slot[1][0] = 443
$Slot[1][1] = 751
$Slot[2][0] = 475
$Slot[2][1] = 751
$Slot[3][0] = 507
$Slot[3][1] = 751
$Slot[4][0] = 539
$Slot[4][1] = 751
$Slot[5][0] = 585
$Slot[5][1] = 751
$Slot[6][0] = 617
$Slot[6][1] = 751
$Slot[7][0] = 649
$Slot[7][1] = 751
$Slot[8][0] = 0
$Slot[8][1] = 0
Global $Fisch[21]
;$Fisch[1] = 0 ;Aal
;$Fisch[2] = 0 ;Ayu
$Fisch[3] = 0x212018 ;Bachforelle
;$Fisch[4] = 0 ;Barsch
;$Fisch[5] = 0 ;Flussforelle
;$Fisch[6] = 0 ;Goldfisch
$Fisch[7] = 0x8C8673 ;Graskarpfen
$Fisch[8] = 0xFFFFFF ;Grosserzander
$Fisch[9] = 0xB58A84 ;Karpfen
;$Fisch[10] = 0 ;Katzenfisch
$Fisch[11] = 0x9C9A84 ;Lachs
;$Fisch[12] = 0 ;Lotusfisch
$Fisch[13] = 0x4A3418 ;Mandarinfisch
$Fisch[14] = 0x5A5142 ;Regenbogenforelle
$Fisch[15] = 0xFFFFF7 ;Rotfeder
;$Fisch[16] = 0 ;Schmerle
;$Fisch[17] = 0 ;Shiri
;$Fisch[18] = 0 ;Spiegelkarpfen
;$Fisch[19] = 0 ;Stint
;$Fisch[20] = 0 ;Tenchi
$Fisch[21] = 0xF7EBAD ;Zander
$Koeder = 0x422415
$Fischblase = 0xFcF8Fc
$Min = InputBox ( "Angelbot", "Minimale Zeit in ms?" )
$Max = InputBox ( "Angelbot", "Maximale Zeit in ms?" )
_Main()
Func _Main()
$Koederslot = _Koedersuche()
_Nimmkoeder($Koederslot)
_Angelhinein()
_Blasewarten()
_Fischtoeten()
_Rausziehen()
EndFunc
Func _Koedersuche()
For $i = 1 to UBound ( $Slot ) - 1
If PixelGetColor ( $Slot[$i][0], $Slot[$i][1] ) = $Koeder Then
Return $i
EndIf
Next
Return 0
EndFunc
Func _Nimmkoeder($Slotnr)
If $Slotnr > 4 Then
$Taste = "F" & ( $Slotnr - 4 )
ElseIf $Slotnr = 0 Then
MsgBox ( 0, "Angelbot", "Keine Köder mehr!" )
Exit
Else
$Taste = $Slotnr
EndIf
Send ("{" & $Taste & " DOWN}")
Sleep ( 500 )
Send ("{" & $Taste & " UP}")
EndFunc
Func _Angelhinein()
Send ( "{F4 DOWN}" )
Sleep ( 500 )
Send ( "{F4 UP}" )
EndFunc
Func _Blasewarten()
While 1
$Coord = PixelSearch ( 336, 52, 400, 95, $Fischblase, 5 )
If Not @error Then
ExitLoop
EndIf
Sleep ( 100 )
WEnd ; @@@@@@@@@ dieses WEnd war gemeint, da is aber nen While!
EndFunc
Func _Rausziehen()
$Wartezeit = Random ( $Min, $Max, 1 )
Sleep ( $Wartezeit )
Send ( "{F4 DOWN}" )
Sleep ( 500 )
Send ( "{F4 UP}" )
EndFunc
Func _Fischtoeten()
For $e = 1 To UBound ( $Fisch ) -1
$Coord2 = PixelSearch ( 877, 450, 1005, 578, $Fisch[$e], 0, 32 )
If Not @error Then
MouseClick ( "right", $Coord2[0], $Coord2[1], 1, 2 )
EndIf
Next
EndFunc