[Tutorial] Angelbot mit AutoIt

01/09/2010 16:42 xBaiLomx#16
danke dir..!
01/09/2010 16:46 freddy2001#17
Kein Anhang da >.< Moment kurz...
02/03/2010 19:57 .GlaDos#18
Quote:
Originally Posted by eXcalibur93 View Post
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 
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")
Opt "PixelCoordMode")
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] = ;Aal
;$Fisch[2] = ;Ayu
$Fisch
[3] = 0x212018 ;Bachforelle
;$Fisch[4] = ;Barsch
;$Fisch[5] = ;Flussforelle
;$Fisch[6] = ;Goldfisch
$Fisch
[7] = 0x8C8673 ;Graskarpfen
$Fisch
[8] = 0xFFFFFF ;Grosserzander
$Fisch
[9] = 0xB58A84 ;Karpfen
;$Fisch[10] = ;Katzenfisch
$Fisch
[11] = 0x9C9A84 ;Lachs
;$Fisch[12] = ;Lotusfisch
$Fisch
[13] = 0x4A3418 ;Mandarinfisch
$Fisch
[14] = 0x5A5142 ;Regenbogenforelle
$Fisch
[15] = 0xFFFFF7 ;Rotfeder
;$Fisch[16] = ;Schmerle
;$Fisch[17] = ;Shiri
;$Fisch[18] = ;Spiegelkarpfen
;$Fisch[19] = ;Stint
;$Fisch[20] = ;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 )
    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 3365240095$Fischblase)
        If 
Not @error Then
            ExitLoop
        
EndIf
        
Sleep 100 )
    
WEnd ; @@@@@@@@@ dieses WEnd war gemeintda is aber nen While!
EndFunc

Func _Rausziehen
()
    
$Wartezeit Random $Min$Max)
    
Sleep $Wartezeit )
    
Send "{F4 DOWN}" )
    
Sleep 500 )
    
Send "{F4 UP}" )
EndFunc

Func _Fischtoeten
()
    For 
$e 1 To UBound $Fisch ) -1
        $Coord2 
PixelSearch 8774501005578$Fisch[$e], 032 )
        If 
Not @error Then
            MouseClick 
"right"$Coord2[0], $Coord2[1], 1)
        EndIf
    
Next
EndFunc 



dein bot funt bei mir net da het der nen fehler bei Line 20
$Slot[8][0]= 0
^ERROR
08/23/2010 07:31 LOL09#19
push^^
müsst mir mal eben helfen pls :D
Quote:

opt("MouseCoordMode",2)
opt("PixelCoordMode",2)
Global $slot [8][2]
$slot [1][0] = 572
$slot [1][1] = 1006
$slot [2][0] = 604
$slot [2][1] = 1006
$slot [3][0] = 636
$slot [3][1] = 1006
$slot [4][0] = 668
$slot [4][1] = 1006
$slot [5][0] = 714
$slot [5][1] = 1006
$slot [6][0] = 746
$slot [6][1] = 1006
$slot [7][0] = 778
$slot [7][1] = 1006
$Paste = 0xDEBD98
$Wurm = 0xF5C0AD
$Blase = 0x516159;40524A
WinActivate ("METIN2")

_main ()


Func _main ()
$KoederSlot= _koedersuche ()
_koederanbringen ($KoederSlot)
_rauswerfen ()
_blasewarte ()
_Rausziehen ()
_buffer ()
EndFunc


Func _koedersuche ()
For $i=1 to Ubound($slot) -1
If PixelGetColor ($slot[$1][0],$slot[$1][1] = $Wurm Then
Return ($1)
EndIf
Next
Return (0)

EndFunc




Func _koederanbringen ($slotNr)
If $slotNr > 4 Then
$Taste = "F" & ($slotNr -4)
ElseIf $SlotNr = 0
MsgBox (0,"Angelbot","Kauf dir Koeder und starte neu")
ProcessClose ("AutoIt3.exe")
Else
$Taste = $slotNr
EndIf

Send ("{" & $Taste & " Down}")
Sleep(500)
Send ("{" & $Taste & " UP}")

EndFunc





Func _rauswerfen ()

Send ("{F4 Down}")
Sleep (500)
Send ("{F4 UP}")

EndFunc




Func _blasewarte()
While 1
$Coord = PixelSearch (610,28,824,173, $Blase , 10 )
If not @error Then
ExitLoop
EndIf
Sleep (100)
WEnd
EndFunc






Func _Rausziehen ()
Sleep (2650)
Send ("{F4 down}")
Sleep (400)
Send ("{F4 UP}")

EndFunc



Func Buffer ()

Sleep (500)
EndFunc

das sollte es doch sein aba der sagt mir immer etwas bei pixelsearch ???
07/19/2011 09:40 shufflerboy#20
Ist dieser Script schon veralten ?
Ich bin auf den thread gestoßen und hab das gleich ausprobiert.
Bei mir kommt die Fehlermeldung:"For" statement has no matching "Next" statement.:
Return 0
07/19/2011 09:51 amnesi#21
Dann hast du etwas falsch gemacht :)
Das ist dann ein Fehler im Script.