Very basic fishbot source menu

User Tag List

Results 1 to 3 of 3
  1. #1
    ziao's Avatar Banned
    Reputation
    234
    Join Date
    Apr 2006
    Posts
    657
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Very basic fishbot source

    Aloha,

    I quickly made a fishbot in autoit, because i was tired of FishBuddy not working (wasn't very experienced back then, so it has alot of glitches). Below i posted the source, it explains EVERYTHING that happens, and it is only ment to learn from if you are planning to learn autoit.
    Please do NOT compile this, remove the credits, and release it claiming you've made it. Not only does it disencourage me to help anybody, but you're also fooling yourself. Making your own bot and seeing it work is much more satisfying then stealing.

    Anyway, here you goes:

    Code:
    ;Fishbuddy - made by [email protected].
    ;This source is ment to learn from only, please do not publish this claiming you've made it. You're only fooling yourself
    ;Making a bot yourself and seeing it catch a fish is much more satisfacting
    
    ;vars, edit this
    $bobcolor = 0xb73a15    ;color for the bob (in HEX format)
    $hotkey = 7                ;hotkey for fishing
    $border = 150            ;the edge of the screen that the bot will not search in (hard to explain :P)
    
    ;don't change anything below this line
    HotKeySet("{scrolllock}", "stop")            ;set the hotkey to stop the bot
    HotKeySet("{pause}", "pause")                ;set the hotkey to pause the bot
    Dim $timerstart, $pos, $pause        ;dim some vars that will be used later, to prevent errors
    $fishcaught = 0                                ;this will be shown in the tooltip. default is 0 as we haven't caught any fish yet doh
    
    Func stop()                                    ;function to stop the bot
        tt("Quiting - " & $fishcaught & " fish were caught")    ;tooltip telling the user that we're is quiting
        sleep(1000)                                ;sleeping before quiting
        Exit                                    ;exit the bot ^^
    EndFunc
    
    Func pause()                                ;function to pause the bot
        if $pause = 1 Then                        ;if the bot is already paused, 
            global $pause = 0                        ;then change the pause var to 0
        Else                                    ;else
            global $pause = 1                        ;change the pause var to 1
            tt("Bot paused - press pause again to resume fishing")    ;tell the user that the bot is pausing
            while $pause = 1                        ;as long as the bot is paused,
                sleep(1000)                                ;do nothing
            WEnd                                    ;end of the loop
        EndIf
    EndFunc
        
    Func castpole()                                ;function to cast the pole (proper grammer?)
        tt("Casting pole")                        ;tell the user we're casting the pole
        Send($hotkey)                            ;press the hotkey for fishing (defined at the top)
        Global $timerstart = TimerStart()        ;start a timer, will be used later to check if 30 seconds have passed
        sleep(3000)                                ;do nothing for 3 seconds, to wait for the bob to appear (lag)
        tt("Searching for the bob")                ;tell the user we're searching for the bob
        
        Global $pos = PixelSearch($border, $border, @DesktopWidth - $border, @DesktopHeight - $border, $bobcolor, 20, 3)    
            ;search for the bob, color defined at the top. if found, set the $pos var, this contains the location for the bob
            
        if not @error Then                        ;if no error has occured while searching, the bob has been found
            tt("Found the bob!")                    ;tell the user that it was found
            MouseMove($pos[0], $pos[1])                ;move the mouse to that position
            Global $gotbite = 0                        ;reset this var, will be used later
            waitforbite()                            ;run the function that waits for a bite
        EndIf
    EndFunc
    
    Func waitforbite()                            ;function that waits untill the splash was found, then it loots.
        while(TimerDiff($timerstart) < 30000)    ;as long as 30 seconds have not passed, continue to search for a splash
            tt("Waiting for a bite")            ;tell the user we're waiting for a bite
            PixelSearch($pos[0]-60, $pos[1] - 60, $pos[0] + 60, $pos[1] + 60, 0xffffff, 25, 3)    ;search for the splash
            if not @error Then                    ;if no error has occured, the splash was found
                tt("Bite!")                        ;tell the user we have a bite!
                loot()                            ;run the function that handles looting
                ExitLoop                        ;exit the loop that was looking for a splash. removing this might make the bot crash after a very long time
            EndIf
            sleep(10)                            ;wait a very short while before looking for the splash again, removing this MIGHT make your fps drop
        WEnd    
    EndFunc
    
    Func loot()                                    ;function that handles looting when we have a bite
        tt("Looting")                            ;tell the user we're looting
        $fishcaught = $fishcaught + 1            ;adding +1 to the fish caught, will be shown in the tooltip
        Send("{lshift down}")                    ;press the left shift button
        MouseClick('right', $pos[0], $pos[1], 1, 0)        ;click the right mouse button on the location where the bob was found earlier
        Send("{lshift up}")                        ;release the left shift button
        sleep(1000)                                ;wait one second, to make sure we got the loot (lag)
    EndFunc
    
    Func tt($txt)                                ;function that shows a text at the top-left of the screen, it will also show how many fish have been caught
        ToolTip('[' & $fishcaught & '] - '& $txt, 1, 1)    ;make the tooltip and add text
    EndFunc
    
    if not WinExists("World of Warcraft") Then    ;check if WoW is (not) running
        tt("Please start WoW before running the bot")    ;if that's the case, warn the user and quit
        stop()                                            ;quit, like said 1 line before :p
    EndIf
    
    WinActivate("World of Warcraft")            ;activate the WoW window
    WinWait("World of Warcraft")                ;wait untill WoW is active
    tt("Starting the bot - [Scrolllock] to exit, [Pause] to pause") ;tell the user that the bot is starting
    
    sleep(1000)                                    ;wait a second, so the user can read the previous message
    MouseMove($border, $border, 1000)            ;these 4 lines show the user where the bot is gonna search for the bob by moving the mouse
    MouseMove(@DesktopWidth - $border, $border, 1000)
    MouseMove(@DesktopWidth - $border, @DesktopHeight - $border, 1000)
    MouseMove(150, @DesktopHeight - $border, 1000)
    
    While 1                                        ;as long as..  forever,
        castpole()                                ;run this function, which casts the pole and leads to everything else
    WEnd
    Also, feel free to ask any questions about AutoIt. I'll try to help you the best I can
    Last edited by ziao; 06-12-2009 at 01:34 AM.

    Very basic fishbot source
  2. #2
    afhouston's Avatar Member
    Reputation
    1
    Join Date
    Dec 2006
    Posts
    46
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Very basic fishbot source

    thanks man.

    now to learn it :-)

    TimerStart(); is an unknown function?
    Last edited by afhouston; 01-09-2007 at 11:26 PM. Reason: Auto-merged Doublepost

  3. #3
    ziao's Avatar Banned
    Reputation
    234
    Join Date
    Apr 2006
    Posts
    657
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Very basic fishbot source

    if it doesn't work for you you might have a very old version of autoit installed. what it does is it returns the timestamp in miliseconds. I use it to compare it later, to see if 30 seconds have passed (30000 miliseconds), if so, no longer search for a splash since fishing has stopped.

Similar Threads

  1. [Bot] Searching an Old FishBot Source
    By Reflexes in forum WoW Memory Editing
    Replies: 1
    Last Post: 03-20-2012, 01:21 PM
  2. [C++] Very Basic Script. Lookover? :3
    By AngelSandy in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 02-22-2010, 06:19 AM
  3. [Guide - Very Basic] Make your NPC's Move
    By Pufftrees in forum WoW EMU Guides & Tutorials
    Replies: 16
    Last Post: 07-27-2008, 12:26 AM
  4. [Release] Ultima's VERY basic Repack
    By sscultima in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 07-03-2008, 10:43 AM
  5. [Release] Very Basic Ascent Site
    By somguynamedmason in forum WoW EMU Programs
    Replies: 3
    Last Post: 02-02-2008, 02:59 AM
All times are GMT -5. The time now is 04:34 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search