Jump to content

Recommended Posts

Posted

Hey there

I made this as a fishing bot for this game I play with my family. I want it to look for and run the four included scripts while casting. It wont let me. please tell me what Im doing wrong?!

OK so here goes

#include <caught.au3>

#include <boot.au3>

#include <Jelly.au3>

#include <new.au3>

$i=0

Do

Cast ()

Until "0x" & Hex(PixelGetColor(638, 502)) = 0xD7ABA9 Then

MouseClick ("left",638, 502)

Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{RIGHT}")

Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIG

HT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{RIGHT})"

Func Cast ()

MouseClickDrag ( "Left", 641, 572, 639, 694 , 10 )

Sleep (15000)

EndFunc

================================================

$i=0

Func Caught ()

While 1

If "0x" & Hex(PixelGetColor(778, 344)) = 0xBF4F55 Then

Cast ()

EndIf

EndFunc

================================================

$i=0

Func boot()

While 1

If "0x" & Hex(PixelGetColor(851, 623)) = 0xAA5D5E Then

Cast ()

Endif

Endfunc

================================================

$i=0

Func jelly()

While 1

If "0x" & Hex(PixelGetColor(852, 265)) = 0xC49E9E Then

Cast ()

Endif

EndFunc

================================================

$i=0

Func new()

While 1

If "0x" & Hex(PixelGetColor(599, 193)) = 0x33CB65 Then

Send("{F9}")

Cast ()

Endif

EndFunc

================================================

Posted (edited)

#include doesnt run the funcs automatically, you have to call the func in the main script

heres what I have

cast works, but ONLY cast! it wont search for the boot, caught, jelly, etc just casts

;;; caught.au3;;;
Func Caught ()
    Cast ()
EndFunc

;;; boot.au3;;;
Func boot()
    Cast()
EndFunc

;;; Jelly.au3;;; 
Func jelly()
    Cast ()
EndFunc

;;; new.au3;;; 
Func new()
    Send("{F9}")
    Cast ()
EndFunc

;;; full.au3;;;
Func full()
MouseClick ("left",638, 502)
Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{RIGHT}")
Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGH

T}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{RIGHT})"
Cast()
EndFunc

;;; cast.au3;;;
Func Cast ()
MouseClickDrag ( "Left", 641, 572, 639, 694 , 10 )
Sleep (15000)
While 1
If "0x" & Hex(PixelGetColor(778, 344)) = 0xBF4F55 Then
    caught()
ElseIf "0x" & Hex(PixelGetColor(851, 623)) = 0xAA5D5E Then
    boot()
ElseIf "0x" & Hex(PixelGetColor(852, 265)) = 0xC49E9E Then
    Jelly()
ElseIf "0x" & Hex(PixelGetColor(599, 193)) = 0x33CB65 Then
    new()
    ElseIf "0x" & Hex(PixelGetColor(638, 502)) = 0xD7ABA9 Then
    full()
EndIf
WEnd
EndFunc 

;;; fish.au3;;;
#include "cast.au3"
#include "caught.au3"
#include "boot.au3"
#include "Jelly.au3"
#include "new.au3"
Do
Cast ()
Until $i=25
Edited by kayleeamanda
Posted

for Hex(PixelGetColor(638, 502)) (just grabed one for example, this would aply to them all)

try Hex(PixelGetColor(638, 502), 6)

this will only return 6 numbers/letters (without the 6 it would return 8 and throw off the amount you wanted)

Posted

thanks so much for your help Rental

essentially, I want it to 'cast' then once it has cast, search for the caught signal, boot signal, new signal, jelly signal, or full signal

I want it to keep looking for those signals continuously and quickly (its being rather slow :S)

and if none of the signals are found in 15 seconds, i want it to recast and repeat the whole process

it is still only casting, and not looking for the signals. here is the updated thing

;;; caught.au3;;;
Func Caught ()
    If "0x" & Hex(PixelGetColor(778, 344),6) = 0xBF4F55 Then
    Cast ()
    sleep (100)
ElseIf "0x" & Hex(PixelGetColor(778, 344),6) = 0 Then
    Call ("boot")
    EndIf
EndFunc

;;; boot.au3;;;
Func boot()
    If "0x" & Hex(PixelGetColor(851, 623),6) = 0xAA5D5E Then
    Cast()
    sleep (100)
ElseIf "0x" & Hex(PixelGetColor(851, 623),6) = 0 Then
    Call ("Jelly")
    EndIf
EndFunc

;;; Jelly.au3;;; 
Func jelly()
    If "0x" & Hex(PixelGetColor(852, 265),6) = 0xC49E9E Then
    Cast ()
    sleep (100)
    Elseif "0x" & Hex(PixelGetColor(852, 265),6) = 0 Then
    Call ("new")
    EndIf
EndFunc

;;; new.au3;;; 
Func new()
    If "0x" & Hex(PixelGetColor(599, 193),6) = 0x33CB65 Then
    Send("{F9}")
    Cast ()
    sleep (100)
ElseIf "0x" & Hex(PixelGetColor(599, 193),6) = 0 Then
    Call ("full")
    EndIf
EndFunc

;;; full.au3;;;
Func full()
    If "0x" & Hex(PixelGetColor(638, 502),6) = 0xD7ABA9 Then
MouseClick ("left",638, 502)
Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{RIGHT}")
Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGH

T}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{RIGHT})"
Cast()
Sleep (100)
ElseIf "0x" & Hex(PixelGetColor(638, 502),6) = 0 Then
Call ("caught")
EndIf
EndFunc

;;; cast.au3;;;
Func Cast ()
MouseClickDrag ( "Left", 641, 572, 639, 694 , 10 )
Call ("caught")
Sleep (15000)
EndFunc 

;;; fish.au3;;;
#include "cast.au3"
#include "caught.au3"
#include "boot.au3"
#include "Jelly.au3"
#include "new.au3"
Do
Cast ()
Until $i=25
Posted

Try this

;;; caught.au3;;;
Func Caught ()
    If "0x" & Hex(PixelGetColor(778, 344),6) = 0xBF4F55 Then
        Cast ()
        sleep (100)
    Else
        boot()
    EndIf
EndFunc

;;; boot.au3;;;
Func boot()
    If "0x" & Hex(PixelGetColor(851, 623),6) = 0xAA5D5E Then
        Cast()
        sleep (100)
    Else
        jelly()
    EndIf
EndFunc

;;; Jelly.au3;;;
Func jelly()
    If "0x" & Hex(PixelGetColor(852, 265),6) = 0xC49E9E Then
        Cast ()
        sleep (100)
    Else
        new()
    EndIf
EndFunc

;;; new.au3;;;
Func new()
    If "0x" & Hex(PixelGetColor(599, 193),6) = 0x33CB65 Then
        Send("{F9}")
        Cast ()
        sleep (100)
    Else
        full()
    
EndFunc

;;; full.au3;;;
Func full()
    If "0x" & Hex(PixelGetColor(638, 502),6) = 0xD7ABA9 Then
        MouseClick ("left",638, 502)
        Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{RIGHT}")
        Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{RIGHT})"
        Cast()
        Sleep (100)
    Else
        caught()
    EndIf
EndFunc

;;; cast.au3;;;
Func Cast ()
    MouseClickDrag ( "Left", 641, 572, 639, 694 , 10 )
    caught()
    Sleep (15000)
EndFunc

;;; fish.au3;;;
#include "cast.au3"
#include "caught.au3"
#include "boot.au3"
#include "Jelly.au3"
#include "new.au3"
Do
Cast ()
Until $i=25
Posted

hey there again

it is still only casting every 15 seconds when there is definitely signals on the screen it should follow (ie: pixels showing up)

:)

I bet its something uber simple that I'll kick myself for not knowing lol

Try this

;;; caught.au3;;;
Func Caught ()
    If "0x" & Hex(PixelGetColor(778, 344),6) = 0xBF4F55 Then
        Cast ()
        sleep (100)
    Else
        boot()
    EndIf
EndFunc

;;; boot.au3;;;
Func boot()
    If "0x" & Hex(PixelGetColor(851, 623),6) = 0xAA5D5E Then
        Cast()
        sleep (100)
    Else
        jelly()
    EndIf
EndFunc

;;; Jelly.au3;;;
Func jelly()
    If "0x" & Hex(PixelGetColor(852, 265),6) = 0xC49E9E Then
        Cast ()
        sleep (100)
    Else
        new()
    EndIf
EndFunc

;;; new.au3;;;
Func new()
    If "0x" & Hex(PixelGetColor(599, 193),6) = 0x33CB65 Then
        Send("{F9}")
        Cast ()
        sleep (100)
    Else
        full()
    
EndFunc

;;; full.au3;;;
Func full()
    If "0x" & Hex(PixelGetColor(638, 502),6) = 0xD7ABA9 Then
        MouseClick ("left",638, 502)
        Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{RIGHT}")
        Send ("{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{RIGHT}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{UP}{RIGHT})"
        Cast()
        Sleep (100)
    Else
        caught()
    EndIf
EndFunc

;;; cast.au3;;;
Func Cast ()
    MouseClickDrag ( "Left", 641, 572, 639, 694 , 10 )
    caught()
    Sleep (15000)
EndFunc

;;; fish.au3;;;
#include "cast.au3"
#include "caught.au3"
#include "boot.au3"
#include "Jelly.au3"
#include "new.au3"
Do
Cast ()
Until $i=25
Posted (edited)

Hi,

in your example script why you use :

#include "cast.au3"
   #include "caught.au3"
   #include "boot.au3"
   #include "Jelly.au3"
   #include "new.au3"

For functions already in the script ?

Edited by FireFox
Posted

I think he just copy and pasted all the functions into one so he didnt have more then 1 code box in his post. if you look he divides each function with the name of the file ie. ;;; new.au3;;;

Posted

I think he just copy and pasted all the functions into one so he didnt have more then 1 code box in his post. if you look he divides each function with the name of the file ie. ;;; new.au3;;;

LOL...ok :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...