Simba Code:
Program Als_LRC_Fisher;
{$DEFINE SRL5}
{$DEFINE SMART} // Edit this line out to rn the script in your browser.
{$i SRL/srl.simba}
{$i sps/sps.simba}
{$i srl/srl/skill/fighting.simba}
{$i SRL/SRL/misc/paintsmart.simba}
//////////////////////// Fill The Variables Below In \\\\\\\\\\\\\\\\\\\\\\\\\\\
Const
WTRA = 550; // Enter how low health can go before resting. Must be at least 50 below your maximum health.
FishTimer = 5000; // Do NOT touch this variable.
World = 88; // Enter world you want to fish in.
PP = ''; // Enter your pin here.
OnScreenProg = 0; // 0 for an On Screen Report or 1 for no On Screen Report.
FishValue = 2235; // Enter current price of the fish you are catching.
FishType = 0; // 0 to catch Rock Tails and 1 to catch Cave Fish.
Crashing = True; // True if you are using SMART Manager or Crash Smart. False if not.
SRLStats_User = ''; /// SRL Stats Username.
SRLStats_Password = ''; /// SRL Stats Password.
/////////////////////////////// NO Touchy \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Var
x,y,RFish,CFish,bankbox,FC,Fish_Caught,Fish_XP,XP,FPH,TimeGone,P: Integer;
fshield,fdamage,fvalue: Integer;
FishCaught,FishXP,Info1,Info2,Info3,Info4,XPPH2,FPH2,FFC,FVN: String;
ToFish,ToBankBox,FSpot1,FSpot2,FSpot3,Restart,RunAwayN: TPointArray;
////////////////////////// Fill In Log In Info \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=''; // Enter your username here.
Players[0].Pass :=''; // Enter your password here.
Players[0].Nick :=''; // Enter nickname for progres report.
Players[0].Active:=True;
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins'];
Players[0].WorldInfo := [False, World];
End;
////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
///////////////////////DO NOT TOUCH ANYTHING PAST HERE \\\\\\\\\\\\\\\\\\\\\\\\\
////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Procedure AntiBan;
Begin
Case Random(500) Of
100: SleepAndMoveMouse(500);
200: PickUpMouse;
300: RandomMovement;
400: HoverSkill('Fishing',False);
500: CompassMovement(45,90,true);
End;
End;
Procedure IfRandoms;
Begin
FindNormalRandoms;
AntiBan;
End;
Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
Var
mx, my, Pic, Pic2, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
Begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
Pic2 := BitmapFromString(360,71,'me');
TPH := High(TP);
For I := 0 To TPH Do
Begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
For B := 0 To High(TTP) Do
Begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
End;
End;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
DrawBitmap(Pic2, Canvas, 100,10);
FreeBitmap(Pic);
FreeBitmap(Pic2);
end;
Procedure OnScreenUpdate;
Begin
Begin
SRLRandomsReport;
Stats_Commit;
IncEx(Fish_Caught, FC);
IncEx(Fish_XP, XP);
TimeGone := (GetTimeRunning/1000);
FishCaught := IntToStr(Fish_Caught);
FishXP := IntToStr(Fish_XP);
FValue := (Fish_Caught*FishValue);
FVN := IntToStr(FValue)
FPH := (3600*(Fish_Caught))/((TimeGone));
FPH2 := IntToStr(FPH);
Info1 := ('Fish Caught = ' + FishCaught)
Info2 := ('Fising XP = ' + FishXP)
Info3 := ('Fish Per Hr = ' + FPH2)
Info4 := ('Money Made = ' + FVN)
End;
If (OnScreenProg=0) Then
Begin
PrintOnSmart(['Last banked at '+(TheTime)],Point(15,210),296906);
PrintOnSmart([('Time script has run ')+MsToTime(GetTimeRunning,Time_Bare)],Point(15,240),296906);
PrintOnSmart([Info1+' so '+Info3],Point(15,270),296906);
PrintOnSmart([Info2+' and '+Info4],Point(15,300),296906);
End;
Begin
Writeln('');
Writeln('====================================================================');
Writeln('************************ Als LRC Fisher ****************************');
Writeln('====================================================================');
Writeln('You have caught ' + FishCaught + ' fish. That equals ' + FPH2 + ' fish per hour!');
Writeln('You have gained ' + FishXP + ' xp. That equals ' + XPPH2 + ' xp per hour!');
Writeln('====================================================================');
Writeln('************************ Als LRC Fisher ****************************');
Writeln('====================================================================');
Writeln('');
End;
End;
Procedure SetDTMs;
Begin
RFish := DTMFromString('mrAAAAHic42BgYMhmYmDIBOJCIK4C4iIgzgHiRCCOBeLnQDV3gfgWlH4LxJ+B+AMQvwBij2APIMmEE3MBSXyYkQCGAQD1rAvw');
CFish := DTMFromString('mrAAAAHic42BgYLBlYmCwAmJXIPYHYg8gdgJiCyC2B2IORqAiKGYGYm4gFgJiFiD+BxRevLwASDLhxPwM+AEjAQwDAIoYBTU=');
BankBox := DTMFromString('mggAAAHicY2NgYDgJxKeheA8QbwPie0C8AIhboGJNQLwTiGcAcU91HENyuDNDWbITQ060LUNRggNDYqgjAz9QDhtmxIEhAABB1g9T');
FShield := DTMFromString('mrAAAAHic42BgYOAFYgEg5gdiHiBmB2I+IGaBijECMRMQs0LlQOJcUBqkl9XUCS8mBBgJYBgAAK0nBH8=');
FDamage := DTMFromString('mbQAAAHicY2VgYNBmhGAdINYDYn0glgZiBSBWBmI5IJYA4nQ2NoYEPj4wns3DA6a5gPrRMSMWDAYAIPEEVA==');
End;
Procedure FreeDTMSet;
Begin
FreeDTM(RFish);
FreeDTM(CFish);
FreeDTM(BankBox);
FreeDTM(FShield);
FreeDTM(FDamage);
End;
Function HPLevel: Integer;
Var
ColourString: String;
Begin
Result:= GetMMLevels('HP', ColourString);
End;
Procedure AllMyPaths;
Begin
ToFish := [Point(303, 303), Point(307, 323), Point(279, 363), Point(249, 404)];
ToBankBox := [Point(147, 379), Point(191, 379), Point(231, 387), Point(279, 379), Point(303, 335), Point(307, 299), Point(287, 287)];
RunAwayN := [Point(185, 385), Point(235, 385), Point(275, 370), Point(305, 330), Point(288, 287)];
FSpot1 := [Point(247, 407)];
FSpot2 := [Point(183, 400)];
FSpot3 := [Point(150, 380)];
Restart := [Point(180, 395), Point(220, 395), Point(251, 395)];
End;
Procedure HealthCheck;
Begin
If HPLevel < (WTRA) Then
Begin
If (Not FindSymbolIn(x,y,'Bank',600,60,640,100)) Then SPS_WalkPath(ToBankBox);
Writeln('Resting until hp gets back up!');
setrest;
Repeat;
If (Not LoggedIn) Then LoginPlayer;
wait(randomrange(1500,2500));
AntiBan;
Until HPLevel > (WTRA + random(49));
End;
End;
Procedure ToFishing;
Begin
HealthCheck;
SetRun(True);
MakeCompass('n');
SPS_WalkPath(ToFish);
While isMoving Do
wait(100+random(50));
IfRandoms;
End;
Function FindPulley(x, y: Integer): Boolean;
Var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.18);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6521492, MSX1, MSY1, MSX2, MSY2, 3);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 60, 60);
For I := 0 To High(ATPA) Do
Begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 0, 0);
If(WaitUpTextMulti(['dep','osit','pul','ull','ley','lif','ift'],500)) Then
Begin
Result := True;
GetMousePos(x, y);
Break;
End;
End;
End;
Procedure Banking;
Begin
If (FindDTM(RFish,x,y,MIX1,MIY1,MIX2,MIY2) Or FindDTM(CFish,x,y,MIX1,MIY1,MIX2,MIY2)) Then
Begin
If (FindPulley(X,Y)) Then
Begin
If FindDTM(RFish,x,y,MIX1,MIY1,MIX2,MIY2) Then FC := CountItems('dtm', RFish, []) Else FC := CountItems('dtm', CFish, []);
XP := (FC*380);
FFC := IntToStr(FC);
Writeln('Trying to bank ' + FFC + ' fish!');
OnScreenUpdate;
ClickMouse2(True);
Wait(RandomRange(2250,2750));
If PinScreen Then InPin(PP);
Wait(RandomRange(1000,1250));
If (FindDTM(RFish, x, y, MSX1, MSY1, MSX2, MSY2) Or FindDTM(CFish, x, y, MSX1, MSY1, MSX2, MSY2)) Then
Begin
Mouse(x,y,3,3,False);
Wait(RandomRange(700,850));
ChooseOption('ll');
ToFishing;
End Else ToFishing;
End Else
Begin
SymbolAccuracy := 0.35
FindSymbol(x,y,'bank');
Mouse(x,y,0,0,true);
Wait(RandomRange(1000,1300));
SymbolAccuracy := 0.80
Banking;
End;
End Else ToFishing;
End;
Procedure ToBank;
Begin
SetRun(True);
MakeCompass('N');
SPS_WalkPath(ToBankBox);
While isMoving Do wait(100+random(50));
IfRandoms;
Banking;
End;
Procedure RunAwayNow;
Begin
SetRun(True);
MakeCompass('n');
Writeln('Fight detected. To the bank!');
SPS_WalkPath(RunAwayN);
While isMoving Do wait(100+random(50));
Writeln('Banking, then returning to fish!');
Banking;
IfRandoms;
End;
/// Credits to putonajonny ///
Procedure CheckFight;
Var
i: integer;
Begin
If Not InFight Then Exit;
WriteLn('Checking for fight....');
For i := 0 To 7 Do
Begin
If (FindDTM(FShield, x, y, MSX1, MSY1, MSX2, MSY2) Or FindDTM(FDamage, x, y, MSX1, MSY1, MSX2, MSY2)) Then
Begin
RunAwayNow;
Exit;
End;
Wait(200+Random(50));
End;
WriteLn('No fight detected.');
End;
Function PColor: Integer;
Var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
Begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 1.00);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 859691, MSX1, MSY1, MSX2, MSY2, 2);
If (Length(arP) = 0) Then
Begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
For i := 0 to arL Do
Begin
ColorToXYZ(arC[i], X, Y, Z);
If (X >= 1.12) And (X <= 2.02) And (Y >= 1.07) And (Y <= 1.93) And (Z >= 0.45) And (Z <= 0.74) Then
Begin
Result := arC[i];
Break;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
End;
Function IsFishing: Boolean;
Var
CTS: Integer;
TPA: TPointArray;
Begin
CTS := GetColorToleranceSpeed;
Begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.75);
FindColorsSpiralTolerance(x, y, TPA, PColor, 245, 130, 285, 195, 3);
ColorToleranceSpeed(CTS);
result := (Length(TPA) > 0);
If result Then
Exit;
End;
End;
Procedure FishingWait;
Var
T: Integer;
Begin
Marktime(T);
Repeat
CheckFight;
If IsFishing Then
Marktime(T);
If (InvCount=28) or (FindNPCChatText('carry',Nothing)) Then
Begin
WriteLn('All full. Time to bank the fish!');
ToBank;
End;
AntiBan;
IfRandoms;
Until(TimeFromMark(T) >= (FishTimer+(RandomRange(300,600))));
Exit;
End;
Function FindFishingSpot(var fx, fy: Integer): Boolean;
Var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
Begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 0.40);
If Not(FindColorsTolerance(arP, 11971492, MSX1, MSY1, MSX2, MSY2, 10)) Then
Begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);
For i := 0 to arL Do
Begin
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
If (waituptext('ockt', 1000)) Then
Begin;
Result := True;
Break;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
If (i = arL + 1) Then
Begin
Exit;
End;
GetMousePos(fx, fy);
End;
Function FindFishingSpotC(var fx, fy: Integer): Boolean;
Var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
Begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 0.40);
If Not(FindColorsTolerance(arP, 11971492, MSX1, MSY1, MSX2, MSY2, 10)) Then
Begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);
For i := 0 To arL Do
Begin
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
If (waituptext('vefis', 1000)) Then
Begin;
Result := True;
Break;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
If (i = arL + 1) Then
Begin
//Writeln('No Rocktail spot found. Relocating....');
Exit;
End;
GetMousePos(fx, fy);
end;
Procedure StartFishing;
Var
X,Y: Integer;
Begin;
CheckFight;
If (Not FindSymbol(x,y,'fish')) Then ToFishing;
If (FishType=0) Then
Begin;
If (FindFishingSpot(X, Y)) Then
Begin;
wait(300+randomrange(200,400));
ClickMouse2(True);
While isMoving Do
wait(100+random(50));
Writeln('Starting to fish!');
FishingWait;
End;
If Not (FindFishingSpot(X, Y)) Then
Begin;
Writeln('No spot found, relocating...');
End;
End;
If (FishType=1) Then
Begin;
If (FindFishingSpotC(X, Y)) Then
Begin;
wait(300+randomrange(200,400));
ClickMouse2(True);
While isMoving Do
wait(100+random(50));
Writeln('Starting to fish!');
FishingWait;
End;
If Not (FindFishingSpotC(X, Y)) Then
Begin;
Writeln('No spot found, relocating...');
End;
End;
IfRandoms;
End;
Procedure Relocate;
Begin;
SymbolAccuracy := 0.40;
MarkTime(P);
Repeat;
If InvFull or (FindNPCChatText('carry',Nothing)) Then
Begin
WriteLn('All full. Time to bank the fish!');
ToBank;
End;
If FindSymbolIn(x,y,'Fish',620,30,750,120) Then
Begin
HealthCheck;
WriteLn('Moving to spot 2...');
SetRun(True);
MakeCompass('n');
SPS_WalkPath(FSpot2);
While isMoving Do
wait(100+random(50));
IfRandoms;
SymbolAccuracy := 0.80;
StartFishing;
End;
If FindSymbolIn(x,y,'Fish',575,85,635,125) Then
Begin
HealthCheck;
WriteLn('Moving to spot 3...');
SetRun(True);
MakeCompass('n');
SPS_WalkPath(FSpot3);
While isMoving Do
wait(100+random(50));
IfRandoms;
SymbolAccuracy := 0.80;
StartFishing;
End;
If FindSymbolIn(x,y,'Mine',605,60,640,90) Then
Begin
HealthCheck;
WriteLn('Back to spot 2...');
SetRun(True);
MakeCompass('n');
SPS_WalkPath(FSpot2);
While isMoving Do
wait(100+random(50));
If (FindFishingSpot(X, Y)) Then
Begin
SymbolAccuracy := 0.80;
StartFishing;
End Else
Begin
HealthCheck;
Writeln('Back to spot 1...');
SPS_WalkPath(FSpot1);
SymbolAccuracy := 0.80;
StartFishing;
End;
End;
Until (TimeFromMark(P) >= 5000)
IfRandoms;
End;
Procedure MainLoop;
Begin
If Not (LoggedIn) Then Exit;
SetDTMs;
MakeCompass('n');
SetAngle(0);
ToFishing;
StartFishing;
Relocate;
FreeDTMSet;
End;
Begin;
ClearDebug
MouseSpeed := RandomRange(18,23);
Smart_Server := 86;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False
SetupSRL;
SPS_Setup(RUNESCAPE_OTHER,['custom_lrc']);
SetupSRLStats(1135, SRLStats_User, SRLStats_Password);
ActivateClient;
DeclarePlayers;
LoginPlayer;
SMART_ClearCanvas;
wait(1000);
PrintOnSmart(['A progress report will appear after banking. Good luck!'],Point(15,300),65674);
AllMyPaths;
If (Crashing = True) Then
Begin
SPS_WalkPath(ToBankBox);
Wait(500+Random(500));
Flag;
End;
Repeat;
Mainloop;
Until(AllPlayersInactive);
SMART_ClearCanvas;
OnScreenUpdate;
End.