Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Rift - Fishing Bot Simplistic (Modified)


  • Please log in to reply
24 replies to this topic
Arael
  • Members
  • 47 posts
  • Last active: Feb 11 2013 05:51 AM
  • Joined: 03 Dec 2012

Due to requests, here is my version of the Rift - Fishing Bot Simplistic.
 
 
This script requires the user to set only 4 variables before using the first time, then will not need to be changed after that.
 
 
How to use
----------------------------------------
At the top of the script you need to set:

  • RodL - Fishing rod location on your bar (eg -- If your rod is on the first button, simply put 1 after := )
  • BaitL (Bait location on your bar)
  • xRod and yRod - X and Y coordinates for your fishing rod in your bag (do not include decimal points)

To get the X and Y coordinates you need to use AutoIt Window Spy, which is installed with Autohotkey, and simply hover your mouse over your rod in your bags, then note down the On-Screen coordinates.
 
When you run this script it will automatically make Rift the active window and attempt to start fishing.
Ideally you should position the cursor where you want to start fishing, however if you need to adjust the position press F9 to pause script, reposition mouse and press F10 to start the script again.
If you are using bait, leave your bags open.
That's it!
 
 
Changes
19/19/2012 - Updated for anti-fishing changes. Mouse cursor will move after cast.
12/12/2012 - Updated Bait section to skip attempting to bait if you run out of lures

; ************************************************************************************************************************
; **************************************************** User Variables ****************************************************
; ************************************************************************************************************************

; Enter the following values in the section below AFTER :=
; RodL          - The location of the Fishing Rod on your bar
; BaitL         - The location of Bait on your bar
; xRod / yRod   - The X and Y coordinates of your Fishing Rod in your bags (use AutoIT Window Spy)

RodL := 
BaitL := 
xRod := 
yRod := 

; ************************************************************************************************************************
; *************************************************** End of Variables ***************************************************
; ************************************************************************************************************************

IfWinNotActive, RIFT, , WinActivate, RIFT,
WinWaitActive, RIFT,

Logfile = %userprofile%\Documents\RIFT\log.txt
Fish :=0

MouseGetPos, xFish, yFish

Top:

Random, xRand, 0, 25
Random, yRand, 0, 25
xPos := (xFish+xRand)
yPos := (yFish+yRand)

FileDelete, %logfile%
Last_Line :=0
If Fish = 1
Goto, bait
Sleep, 1000
Send, %RodL%
Sleep, 400
MouseClick, left, xPos, yPos
Sleep, 200
MouseMove, 0, 0
MouseMove, xPos, yPos, 20
CurrentMouseCode := QueryMouseCursor()


Go:
Timer := A_TickCount

Go-loop:
Loop
	{
		If (FishMouseCode = "")
		{
			While (FishMouseCode = "")
			{
				If (QueryMouseCursor() != CurrentMouseCode)
				FishMouseCode := QueryMouseCursor()
			}
		}
		Else If (QueryMouseCursor() = FishMouseCode)
		{
			Sleep, 200
			Send, %RodL%
			Sleep, 500
		}
		Else
		{
			FileRead, last_line, %logfile%
			Sleep, 200
			IfInString, Last_Line, lure has decayed
			Fish :=1
			IfInString, Last_Line, away
			Goto, Top
			IfInString, Last_Line, stop fishing
			Goto, Top
			IfInString, Last_Line, received
			Goto, Top
			If A_TickCount - Timer < 20000
			Goto, Go-Loop
		}
	}

Bait:
{
        Fish :=0
        Sleep, 200
        Send, ºitL%
        Sleep, 200
		
		If (QueryMouseCursor() = CurrentMouseCode)
		{
			Goto, Top
		}
		Else
		{
			MouseClick, left, xRod, yRod
			Sleep, 4000
			Goto, Top
		}
}


QueryMouseCursor(byRef numP=0)
{
	NumPut(VarSetCapacity(CurrentCursorStruct, A_PtrSize + 16), CurrentCursorStruct, "uInt")
	DllCall("GetCursorInfo", "ptr", &CurrentCursorStruct)
	return (numP:=NumGet(CurrentCursorStruct,  8))
}


F8::Goto, Bait
F9::Pause
F10::Reload
F11::ExitApp

Thanks to - NotCoder and Temil2008



jfx
  • Members
  • 6 posts
  • Last active: Feb 10 2013 01:08 AM
  • Joined: 11 Dec 2012

Hello,

your script works once home, i forgot something?

(sorry for my bad english)



jfx
  • Members
  • 6 posts
  • Last active: Feb 10 2013 01:08 AM
  • Joined: 11 Dec 2012

ok I found the problem must be modified according to its language:

 

 

 

FileRead, last_line, %logfile% 
Sleep, 200 
IfInString, Last_Line, lure has decayed 
Fish :=1 
IfInString, Last_Line, away 
Goto, Top 
IfInString, Last_Line, stop fishing 
Goto, Top 
IfInString, Last_Line, received 
Goto, Top 
If A_TickCount - Timer < 20000 
Goto, Go-Loop


Arael
  • Members
  • 47 posts
  • Last active: Feb 11 2013 05:51 AM
  • Joined: 03 Dec 2012

Untested Fix - Attempting to apply bait when you run out should no longer attempt to delete your rod.

 

 

Not like you needed a fishing rod in the first place ...



tony3379
  • Members
  • 2 posts
  • Last active: Dec 18 2012 12:27 PM
  • Joined: 12 Dec 2012

So we do not need to enter the LogL variable? I ask cause I can't get it to reel in.



Arael
  • Members
  • 47 posts
  • Last active: Feb 11 2013 05:51 AM
  • Joined: 03 Dec 2012

Sorry, forgot to remove LogL from the comments at the top. There is no longer a Log variable as it goes directly to your user profile folder via %userprofile%.

 

Just tested the updated script then, no issues with reeling in. Are you running the file as administrator?



tony3379
  • Members
  • 2 posts
  • Last active: Dec 18 2012 12:27 PM
  • Joined: 12 Dec 2012

Didn't run it as Admin, but I will surely test it a little later today.



Rand
  • Members
  • 17 posts
  • Last active: Jan 15 2013 03:27 PM
  • Joined: 30 Aug 2012

Things I can verify I have done:

Have set my 4 variables in the User Variables section
RodL := -
BaitL := 0
xRod := 1829
yRod := 325

Have changed the 4 variables:

[::Goto, Bait
\::Pause
]::Reload
ESC::ExitApp

Running as Admin in Win 7

Non-Combat log is enabled via /log

Non-Combat log is stored (via the rift.cfg file) in: D:\RIFT Game\Documents\log.txt  -- This is what it looks like directly from script: Logfile = D:\RIFT Game\Documents\log.txt.

 

Things I can do or see occurring:

I can load my bait using the assigned hotkey.

I can manually hit my rod to bring up the targetting circle for fishing then hit the hotkey to reload the script and it will cast the initial cast.

I see the cursor click at some point in the script, but this is without doing anything else besides running script.

EDIT: I have let the script run without interference a few times for a few minutes at a time. I have seen it set the initial cursor point and move back to that spot but nothing else. During these I have not seen the script reset via the A_TickCount - Timer < 20000 line

 

Current Problem:

So the part I am currently stuck on is the very beginning. The initial pole cast on my action bar is not being pressed to bring up the targetting circle.

I have been able to bring up the targetting circle manually and the script has got it to left click, but it never catches it. It is just the fish got away message.

 

I can post whole code if you like, but nothing else has been modified.



Arael
  • Members
  • 47 posts
  • Last active: Feb 11 2013 05:51 AM
  • Joined: 03 Dec 2012
http://l.autohotkey.net/

Try using the AHK from there. I believe I use Autohotkey_L

jfx
  • Members
  • 6 posts
  • Last active: Feb 10 2013 01:08 AM
  • Joined: 11 Dec 2012

I'd like to change:

IfInString, Last_Line, received

 

 

by

IfInString, Last_Line, Vous avez reçu : [

 

 

but it does not work.

How should I proceed?



Temil2008
  • Members
  • 364 posts
  • Last active: Jun 14 2015 09:02 PM
  • Joined: 10 Dec 2012

I'd like to change:

IfInString, Last_Line, received

 

 

by

IfInString, Last_Line, Vous avez reçu : [

 

 

but it does not work.

How should I proceed?

 

JFX,

With this script, changing just that one value alone will not work for that, because that lang is french, and uses accents. When rift writes the data to the log, it adds additional hidden values as well, which the script needs to be programmed to pick up and read.

 

I have allready acounted for this in a different script located at the link i'm including. I'm not trying to hijack this other users script, but if they want to add this support, it's going to me more then simply 1 line of code change.

 

Fishing Assistant Script = http://www.autohotke...hing-assistant/


________________________________________________________________

Did a solution provided fix your issue? please mark as "Answered" if so. thank you!


AHKcurious
  • Members
  • 1 posts
  • Last active: Dec 20 2012 03:53 AM
  • Joined: 09 Dec 2012
I believe in another thread some issues arose regarding the localization of the computer. Maybe try only a portion of the phrase with no language specific characters? Also looks like they altered the cursor change to only occasionally happen in one of the recent patches. The latest run I've seen probably about half 'get away' due to no cursor change. Also not a big enough set, but I've only gotten a handful or uncommon, rare, or artifacts for roughly 2 stacks of common fish in the area.

Arael
  • Members
  • 47 posts
  • Last active: Feb 11 2013 05:51 AM
  • Joined: 03 Dec 2012
Updated to bypass the anti-fishing changes.

Temil2008
  • Members
  • 364 posts
  • Last active: Jun 14 2015 09:02 PM
  • Joined: 10 Dec 2012

Updated to bypass the anti-fishing changes.

 

Arael, the issue with anti-fishing isn't with the mouse cursor moving after fishing, the issue is that if the same exact fishing location is used multiple time, they end up blocking that fishing/casting location until it is changed to a different location.

 

So, as long as you use the same location to cast, the rift devs can detect this, which if i look at the packet data going out to them, every-time you cast the line it definitely reports the location to the devs. Are they going to use that data for a future detection?? really don't know..

 

If i were you, I would do what I already implemented in my script about 4-5 days ago, and add in random cast locations on every cast. so another words, have it random pick a X and Y location within 50pixels from the main set cast location, set that to a temp variable and use that variable for the current cast. on every cast, it would pick a new random X and Y within 50pixels of the main to cast at. this would allow for detection prevention, along with correcting the issue with them blocking users from fishing in same location.

 

it's just a recommended, as i'm looking out for our users is all.


________________________________________________________________

Did a solution provided fix your issue? please mark as "Answered" if so. thank you!


Arael
  • Members
  • 47 posts
  • Last active: Feb 11 2013 05:51 AM
  • Joined: 03 Dec 2012

Didn't realise they updated that, as my personal one has had that implemented ages ago.