Results 1 to 5 of 5
  1. #1
    bennyboo123's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    112
    Reputation
    20
    Thanks
    657
    My Mood
    Dead

    Very simple AHK pixel fishing "bot"

    I recently got into this game and decided to start fucking around. One of the first things I've decided to do as a personal boost, but decided to release it seeing as this section is pretty much dead.
    It aint no packet editor or client, but it helps

    Source is for 1920x1080 resolution.
     

    1) fish until you have a fish on your hook
    2) take a screenshot of your entire screen
    3) upload it to a picture editing software
    4) put a box around the fishing UI
    EX.
    5) Get a program that will show coords of where your mouse is. Make sure it's on the screen you want to bot on.
    MAKE SURE YOU'RE USING RELATIVE COORDS.
    AHK source to show relative coords.
     

    Code:
    ;
    ; Active Window Info
    ;
    
    #NoEnv
    #NoTrayIcon
    #SingleInstance Ignore
    SetWorkingDir, %A_ScriptDir%
    SetBatchLines, -1
    CoordMode, Pixel, Screen
    
    IfExist, ..\toolicon.icl ; Seems useful enough to support standalone operation.
    	Menu, Tray, Icon, ..\toolicon.icl, 9
    
    isUpd := true
    txtNotFrozen := "(Win+A to freeze display)"
    txtFrozen := "(Win+A to unfreeze display)"
    
    Gui, New, hwndhGui AlwaysOnTop Resize MinSize
    Gui, Add, Text,, Window Title, Class and Process:
    Gui, Add, Edit, w320 r3 ReadOnly -Wrap vCtrl_Title
    Gui, Add, Text,, Mouse Position:
    Gui, Add, Edit, w320 r3 ReadOnly vCtrl_MousePos
    Gui, Add, Text,, Control Under Mouse Position:
    Gui, Add, Edit, w320 r3 ReadOnly vCtrl_MouseCur
    Gui, Add, Text,, Active Window Position:
    Gui, Add, Edit, w320 r2 ReadOnly vCtrl_Pos
    Gui, Add, Text,, Status Bar Text:
    Gui, Add, Edit, w320 r2 ReadOnly vCtrl_SBText
    Gui, Add, Checkbox, vCtrl_IsSlow, Slow TitleMatchMode
    Gui, Add, Text,, Visible Text:
    Gui, Add, Edit, w320 r2 ReadOnly vCtrl_VisText
    Gui, Add, Text,, All Text:
    Gui, Add, Edit, w320 r2 ReadOnly vCtrl_AllText
    Gui, Add, Text, w320 r1 vCtrl_Freeze, % txtNotFrozen
    Gui, Show,, Active Window Info
    GetClientSize(hGui, temp)
    horzMargin := temp*96//A_ScreenDPI - 320
    SetTimer, Update, 250
    return
    
    GuiSize:
    Gui %hGui%:Default
    if !horzMargin
    	return
    ctrlW := A_GuiWidth - horzMargin
    list = Title,MousePos,MouseCur,Pos,SBText,VisText,AllText,Freeze
    Loop, Parse, list, `,
    	GuiControl, Move, Ctrl_%A_LoopField%, w%ctrlW%
    return
    
    Update:
    Gui %hGui%:Default
    curWin := WinExist("A")
    if (curWin = hGui)
    	return
    WinGetTitle, t1
    WinGetClass, t2
    WinGet, t3, ProcessName
    GuiControl,, Ctrl_Title, % t1 "`nahk_class " t2 "`nahk_exe " t3
    CoordMode, Mouse, Screen
    MouseGetPos, msX, msY, msWin, msCtrlHwnd, 2
    CoordMode, Mouse, Relative
    MouseGetPos, mrX, mrY,, msCtrl
    CoordMode, Mouse, Client
    MouseGetPos, mcX, mcY
    GuiControl,, Ctrl_MousePos, % "Absolute:`t" msX ", " msY " (less often used)`nRelative:`t" mrX ", " mrY " (default)`nClient:`t" mcX ", " mcY " (recommended)"
    PixelGetColor, mClr, %msX%, %msY%, RGB
    mClr := SubStr(mClr, 3)
    mText := "`nColor:`t" mClr " (Red=" SubStr(mClr, 1, 2) " Green=" SubStr(mClr, 3, 2) " Blue=" SubStr(mClr, 5) ")"
    if (curWin = msWin)
    {
    	ControlGetText, ctrlTxt, %msCtrl%
    	mText := "ClassNN:`t" msCtrl "`nText:`t" textMangle(ctrlTxt) mText
    } else mText := "`n" mText
    GuiControl,, Ctrl_MouseCur, % mText
    WinGetPos, wX, wY, wW, wH
    GetClientSize(curWin, wcW, wcH)
    GuiControl,, Ctrl_Pos, % "x: " wX "`ty: " wY "`tw: " wW "`th: " wH "`nClient:`t`tw: " wcW "`th: " wcH
    sbTxt := ""
    Loop
    {
    	StatusBarGetText, ovi, %A_Index%
    	if ovi =
    		break
    	sbTxt .= "(" A_Index "):`t" textMangle(ovi) "`n"
    }
    StringTrimRight, sbTxt, sbTxt, 1
    GuiControl,, Ctrl_SBText, % sbTxt
    GuiControlGet, bSlow,, Ctrl_IsSlow
    SetTitleMatchMode, % bSlow ? "Slow" : "Fast"
    DetectHiddenText, Off
    WinGetText, ovVisText
    DetectHiddenText, On
    WinGetText, ovAllText
    GuiControl,, Ctrl_VisText, % ovVisText
    GuiControl,, Ctrl_AllText, % ovAllText
    return
    
    GuiClose:
    ExitApp
    
    GetClientSize(hWnd, ByRef w := "", ByRef h := "")
    {
    	VarSetCapacity(rect, 16)
    	DllCall("GetClientRect", "ptr", hWnd, "ptr", &rect)
    	w := NumGet(rect, 8, "int")
    	h := NumGet(rect, 12, "int")
    }
    
    textMangle(x)
    {
    	if pos := InStr(x, "`n")
    		x := SubStr(x, 1, pos-1), elli := true
    	if StrLen(x) > 40
    	{
    		StringLeft, x, x, 40
    		elli := true
    	}
    	if elli
    		x .= " (...)"
    	return x
    }
    
    #a::
    Gui %hGui%:Default
    isUpd := !isUpd
    SetTimer, Update, % isUpd ? "On" : "Off"
    GuiControl,, Ctrl_Freeze, % isUpd ? txtNotFrozen : txtFrozen
    return

    6) Get coords for top left of the box. That will replace the first 2 numbers in each pixelsearch
    7) Get coords for bottom right of the box. That will replace the 2 numbers after the first 2.




    This method requires you to edit Assembly-CSharp.dll to change UI colors.

    This does not detect fishing spots. You have to click the fishing spot to initiate the bot.
    This does not automate running to fishing spots.
    If an epic spot is interfering with the detection, make sure you zoom out enough where the spot isn't in the scanning zone for catching/for the fish.
    Legendaries may be too fast, but that's sadly just AHK detection not being fast enough.


    Video


    Source
     
    Code:
    #NoEnv
    #Persistent
    SendMode Input
    CoordMode, Pixel, Screen
    CoordMode, Mouse, Screen
    
    Loop
    {
    	PixelSearch, Px, Py, 701, 344, 1664, 632, 0xFF00FF, 1, Fast RGB ; Detects Magenta Fish (R:255,G:0,B:255)
    	if ErrorLevel = 0 ; If successfully detects Magenta Fish
    	{
    		PixelSearch, Px, Py, 701, 344, 1664, 632, 0xBCB5A3, 1, Fast RGB ; Detects button for catching fish
    		if ErrorLevel = 0 ; If successfully detected the catch button
    		{
    			Click, %Px%, %Py% ; Catches fish
    			if ErrorLevel = 0 ; If successfully clicks a.k.a catching fish
    			{
    				MouseMove, A_ScreenWidth / 2, A_ScreenHeight / 2 ; Moves to the center of the screen to re-cast
    				Sleep, 2000 ; Can't click too fast or it won't cast. You can easily play around with the timing to get it faster casting.
    				Click
    			}
    		}
    	}
    }
    
    Delete::ExitApp


    How to set up Assembly-CSharp.dll
     

    1) Drag Assembly-CSharp.dll into dnSpy or your favorite C# decompiler.
    2) Search for DetermineSpriteColor
    3) Change DetermineSpriteColor void to this code below. This will turn all the highlighted fish into a magenta color, but it'll still keep the normal rarity color when it's not in catchable range.
    You are free to change the highlight colors, but make sure to change the first PixelSearch color.
    Code:
    	private void DetermineSpriteColor()
    	{
    		switch (this.itemRarity)
    		{
    		case RarityType.Common:
    			this.normal = new Color(0.52f, 0.52f, 0.52f, 1f);
    			this.highlight = new Color(1f, 0f, 1f, 1f);
    			break;
    		case RarityType.Uncommon:
    			this.normal = new Color(0.26f, 0.52f, 0.11f, 1f);
    			this.highlight = new Color(1f, 0f, 1f, 1f);
    			break;
    		case RarityType.Rare:
    			this.normal = new Color(0f, 0.23f, 0.7f, 1f);
    			this.highlight = new Color(1f, 0f, 1f, 1f);
    			break;
    		case RarityType.Epic:
    			this.normal = new Color(0.39f, 0f, 0.79f, 1f);
    			this.highlight = new Color(1f, 0f, 1f, 1f);
    			break;
    		case RarityType.Legendary:
    			this.normal = new Color(0.62f, 0.36f, 0f, 1f);
    			this.highlight = new Color(1f, 0f, 1f, 1f);
    			break;
    		}
    		this.spriteGoal.color = Color.white;
    		this.spriteTime.color = Color.green;
    	}
    4) Save it and you're all set!
    MAKE SURE YOU'RE CENTERED TO THE FISH SPOT SO IT'LL RE-CLICK IT

    Last edited by bennyboo123; 12-03-2021 at 05:51 PM.

  2. The Following User Says Thank You to bennyboo123 For This Useful Post:

    Geeld (12-04-2021)

  3. #2
    meme's Avatar
    Join Date
    Jan 2016
    Gender
    male
    Location
    42.434720, -83.985
    Posts
    8,050
    Reputation
    1403
    Thanks
    2,410
    My Mood
    Lurking
    thanks, video gave me a brain aneurysm
    Quote Originally Posted by Hennessy View Post
    meme is shittiest general mod ever.
     
    dd/mm/yy
    Member | 28/1/16 - ∞
    Premium | 20/3/16 - ∞
    BattleOn Minion | 24/12/17 - 21/7/21
    Minion+ | 4/4/19 - 11/12/20
    Other MMMORPG Minion | 10/11/19 - 21/7/21
    Publicist | 7/2/20 - Unknown
    Minecraft Minion | 10/12/20 - 21/7/21
    General Minion | 10/12/20 - 21/7/21

    Moderator | 11/12/20 - 21/7/21
    Princess | 5/1/21 - 30/6/21
    Global Moderator | 21/7/21 - ∞
    Pharaoh | 30/1/22 - ∞
    Trusted Member | 16/3/23 - ∞

  4. #3
    bennyboo123's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    112
    Reputation
    20
    Thanks
    657
    My Mood
    Dead
    Quote Originally Posted by meme View Post
    thanks, video gave me a brain aneurysm
    You are very much welcome

  5. #4
    DageLV's Avatar
    Join Date
    Mar 2017
    Gender
    male
    Posts
    20
    Reputation
    10
    Thanks
    47

    Thumbs down As expected this doesnt work.

    Quote Originally Posted by bennyboo123 View Post
    I recently got into this game and decided to start fucking around. One of the first things I've decided to do as a personal boost, but decided to release it seeing as this section is pretty much dead.
    It aint no packet editor or client, but it helps

    From what ive found, you have to copy/paste every single file one by one to then rebuld project, hope that visual studio actually decides to compile it and shit like that.
    If it worked, why wouldnt youve just provided the actual working file, like any normal sensible person would?

  6. #5
    bennyboo123's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    112
    Reputation
    20
    Thanks
    657
    My Mood
    Dead
    Quote Originally Posted by DageLV View Post
    From what ive found, you have to copy/paste every single file one by one to then rebuld project, hope that visual studio actually decides to compile it and shit like that.
    If it worked, why wouldnt youve just provided the actual working file, like any normal sensible person would?
    Not everyone has the same resolution and not everyone wants the same colors. It's not rocket science to get AHK working. Stop expecting to get spoonfed everything.

Similar Threads

  1. how to make very simple chams in C++
    By L96A1_ghille in forum Combat Arms Hacks & Cheats
    Replies: 16
    Last Post: 08-02-2009, 07:23 AM
  2. A very simple way to make Detected hacks work.
    By EndRiT in forum WarRock - International Hacks
    Replies: 13
    Last Post: 03-26-2009, 02:50 AM
  3. Will buy hacks for very simple game
    By newbiespark in forum Suggestions, Requests & General Help
    Replies: 2
    Last Post: 01-17-2009, 07:05 AM
  4. Very simple WR Hack
    By akilli in forum WarRock - International Hacks
    Replies: 13
    Last Post: 07-25-2007, 10:25 PM
  5. Very simple WR Hack
    By akilli in forum WarRock - International Hacks
    Replies: 4
    Last Post: 07-25-2007, 08:48 PM