View Full Version : Quick Question On Objects.
Cerealkillr
02-24-2012, 05:38 AM
Ok so i'm making a fishing bot and so far im finding the spots fine but it'll move to another spot sometimes when the loop goes. Is there a way to mark the location of the spot clicked and to keep on that spot until its not there?
For finding the spot im using this:
If FindObjTPA(x,y,FishSpotColor,5,1,15,7,7,['Net']) Then
Begin
WriteLn('Fishing!');
MarkTime(FishCounter);
GetMousePos(x,y);
Im pretty sure i need to use a case, but im not sure now to make it judge if the spots still there or not.
Caotom
02-24-2012, 08:58 AM
Have you tried leaving the mouse hovering over the fishing spot and waiting for the uptext to disappear?
Something like:
while IsUpText('Fish') do
begin
Wait(100);
FindNormalRandoms;
Antiban;
end;
I know this is a crude method but it seems to be the simplest and easiest :)
Oh and please try and avoid double posting, use the edit button if you want to add something :)
~Caotom
Cerealkillr
02-24-2012, 09:08 AM
Edited! :P
And ya ill try that, with AntiBan i think it'll work nice. Its my first script so i'm still a noob. Been puttin 10hrs a day into it tho.
Easiest way is said by caotom, and this is one question I asked myself when I tried to do a fishing script without using this crude method.
My solution was to mark a box of where the spot should be, and then check the pond ripple colors. If the spot is gone, my function should not find the required amount of colors in the TBox, and hence will begin searching for a new spot/change location.
Then the problem becomes marking the correct TBox of the fishing spot you're working at. That I didn't do very well :(
{************************************************* ******************************
function NoPondNearby(tb: TBox, max, time: integer): boolean;
by; nosaj421
Description: Returns true if bubble color in box area is below threshold
************************************************** *****************************}
function NoPondNearby(tb: TBox; max, time: integer): boolean;
var i, tcts, t: integer;
p: TPoint;
tpa, temptpa, tpa2: TPointArray;
atpa: T2DPointArray;
begin
tcts:=GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.2, 0.2);
MarkTime(t);
repeat
FindColorsTolerance(temptpa, 13091774, tb.X1 , tb.y1 , tb.x2 , tb.y2 , 20);
AppendTPA(tpa, temptpa);
writeln('tpa length: ' + IntToStr(length(tpa)));
if length(tpa) >= max then break;
wait(50+random(25));
until TimeFromMark(t) > time;
SetColorToleranceSpeed(tcts);
Result:=False;
if TimeFromMark(t) > time then
Result:=True;
end;
Cerealkillr
02-25-2012, 06:03 AM
ok so i got tpas working but i still dont know how to get it to remember what tpa it picked and stay fishing there until its gone. Any hints??
Debugs looking like this.
http://img408.imageshack.us/img408/1403/tpafishspots.jpg
You must mark the TBox and trace the colors inside. For instance, that would be ATPA 1 in your picture.
To mark the box area, one way is to search for the nearest fishing pond, but you can still get false positives.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.