Cerealkillr
02-22-2012, 11:59 PM
So i just got into coding this week but im starting to put alot of time into it. I know its a really bad script but take it easy on me! I'm just trying to get basics down.
Right now my problem is that it clicks a fishing spot, then after antiban it clicks it again, but if theres another one close it will potentially click that one. Is there a way to set the first clicked fishing spot to be fished until false? Help me out please i want to keep coding@!.
---------------------------------------------------------------------------------
program new;
{$define srl5}
{$loadlib sps}
//{$define smart}
{$i srl/srl.simba}
{$i sps/sps.simba}
var
LobCage:Integer;
procedure AntiBan;
begin
case Random(70) of
0: RandomRClick;
1: GameTab(1 + Random(12));
2: PickUpMouse;
3: RandomMovement;
4: BoredHuman;
end;
end;
function FishSpotColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.17, 0.55);
if not (FindColorsTolerance(arP, 11972006, MSX1, MSY1, MSX2, MSY2, 9)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Function FishSpot:Boolean;
var
x,y,PlusOne,StartFishing,FishCounter:Integer;
Begin
MarkTime(StartFishing);
PlusOne:= InvCount+1;
If FindObjTPA(x,y,FishSpotColor,5,1,15,7,7,['Fish']) Then
Begin
WriteLn('Found Spot!');
MarkTime(FishCounter);
GetMousePos(x,y);
Case Random(2) Of
0: Mouse(x,y,2,2,True);
1: Begin
Mouse(x,y,2,2,False);
WaitOption('Fishi', 200+Random(100));
ChooseOption('Fishi');
end;
end; end; end;
procedure WhileFishing;
var
C:Integer;
begin
MarkTime(c);
begin
While(TimeFromMark(c))<7000 do
begin
Wait(100+random(2000));
AntiBan;
end;end;end;
Procedure DropFish;
var
x,y,FishDTM,I: Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin
FishDTM:=DTMFromString('mwQAAAHic42RgYFBgYWBQA2IDI DYBYi0oXwaIxYFYCoiTmBgYwoA4EIgjgDgBiNOBOAuIM4E4EYh nT5kCNI0JL2ZlIAwYicBwAACnzwbE');
LogPattern:=[5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23 ,27,4,8,12,16,20,24,28]
For I:=0 To 26 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTM(FishDTM,x,y,SlotBox.X1,SlotBox.Y1,SlotBox. X2,SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I],0);
Wait(1+random(500));
ChooseOption('Dro');
End;
End;
End;
Begin
SetupSRL;
Repeat
FishSpot;
WhileFishing;
If InvFull Then
DropFish;
Until(false);
End.
Right now my problem is that it clicks a fishing spot, then after antiban it clicks it again, but if theres another one close it will potentially click that one. Is there a way to set the first clicked fishing spot to be fished until false? Help me out please i want to keep coding@!.
---------------------------------------------------------------------------------
program new;
{$define srl5}
{$loadlib sps}
//{$define smart}
{$i srl/srl.simba}
{$i sps/sps.simba}
var
LobCage:Integer;
procedure AntiBan;
begin
case Random(70) of
0: RandomRClick;
1: GameTab(1 + Random(12));
2: PickUpMouse;
3: RandomMovement;
4: BoredHuman;
end;
end;
function FishSpotColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.17, 0.55);
if not (FindColorsTolerance(arP, 11972006, MSX1, MSY1, MSX2, MSY2, 9)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Function FishSpot:Boolean;
var
x,y,PlusOne,StartFishing,FishCounter:Integer;
Begin
MarkTime(StartFishing);
PlusOne:= InvCount+1;
If FindObjTPA(x,y,FishSpotColor,5,1,15,7,7,['Fish']) Then
Begin
WriteLn('Found Spot!');
MarkTime(FishCounter);
GetMousePos(x,y);
Case Random(2) Of
0: Mouse(x,y,2,2,True);
1: Begin
Mouse(x,y,2,2,False);
WaitOption('Fishi', 200+Random(100));
ChooseOption('Fishi');
end;
end; end; end;
procedure WhileFishing;
var
C:Integer;
begin
MarkTime(c);
begin
While(TimeFromMark(c))<7000 do
begin
Wait(100+random(2000));
AntiBan;
end;end;end;
Procedure DropFish;
var
x,y,FishDTM,I: Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin
FishDTM:=DTMFromString('mwQAAAHic42RgYFBgYWBQA2IDI DYBYi0oXwaIxYFYCoiTmBgYwoA4EIgjgDgBiNOBOAuIM4E4EYh nT5kCNI0JL2ZlIAwYicBwAACnzwbE');
LogPattern:=[5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23 ,27,4,8,12,16,20,24,28]
For I:=0 To 26 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTM(FishDTM,x,y,SlotBox.X1,SlotBox.Y1,SlotBox. X2,SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I],0);
Wait(1+random(500));
ChooseOption('Dro');
End;
End;
End;
Begin
SetupSRL;
Repeat
FishSpot;
WhileFishing;
If InvFull Then
DropFish;
Until(false);
End.