Happy Birthday!:
{===============Script-info===============}
{-----------------------------------------}
{ Author: King of Knives }
{ ---- }
{ If you downloaded this anywhere else }
{ than SRL-forums.com, please go to }
{ SRL-forums.com and send me a PM }
{ about it. My name on SRL-forums.com is }
{ King of Knives }
{ ---- }
{ Versions: }
{ > Tested on SCAR 3.13, but compatible }
{ with the latest 3.12 }
{ > SRL Version 4, Rev #7 }
{ ---- }
{ What it does: }
{ Fishes for mackerel, tuna, swordfish, }
{ lobsters and sharks, banks and repeats. }
{ ---- }
{ Setup: }
{ 1: Place your character(s) in Catherby }
{ bank, and place your fishing equip- }
{ ment in the top-part of the bank }
{ 2: Make sure they are wearing nothing, }
{ as they can happen to die. }
{ 3: Setup the Player Array (L. 101-138) }
{ 4: Setup the consts (Lines 78-83) }
{ 5: Hit run and check if the script gets }
{ your first character to the fish }
{-----------------------------------------}
{=========================================}
///////////////\\\\\\\\\\\\\\\
// Special Credits To: \\
///////////////\\\\\\\\\\\\\\\
// - Khazar
// = For lending me his Members account for the initial release
//
// - Tarajunky
// = For the AutoColoring-functions
// (Taken out from SRL and edited slightly)
///////////////\\\\\\\\\\\\\\\
{===============-- NOTES --===============}
{ Note #1: Strings[0] can be set to either 'Auto','Lobster' or 'Shark'.
{ 'Auto': Will fish the highest possible fish. It will
{ autodetect if you can fish a higher fish.
{ 'Shark': Will fish sharks.
{ 'Swordfish': Will fish swordfish and tuna too.
{ 'Lobster': Will fish lobsters.
{ 'Tuna': Will fish tuna and swordfish if you have a
{ high enough level.
{ 'Big Net': Will fish with a big net. I only suggest using
{ this for players with low fishing level,
{ because it only counts mackerels.
{
{ Note #2: Time in milliseconds that one fish MAX may take. If this
{ time has gone before you have a caught a fish, it will
{ automatically find a new fishing-spot.
{
{ Note #3: Script performs Normal AntiBan once out of
{ this number. For instance, If the number is 50, it will
{ perform ONE AntiBan out of 50.
{ If this number is low, it is a good idea to
{ set UseLevelAsker and RandomTalk to false.
{
{ Note #4: True to end the script when desired
{ loads have been fished for each player ONCE.
{ If this one is set to false, it will simply restart the
{ fishing cycle, going through all the players again.
{ If you are only using 1 player, it will do a relog.
{
{ Note #5: Only set this to true if you have done
{ Barbarian Training and you have the right strength level.
{
{ Note #6: If this is true, it will check for a fishingspot in front
{ of your character, and will move on if there is no spot found.
{ And if Players[#].Integers[1] time has gone without a fish
{ caught, but the spot is still there, it will reclick the spot.
{ Sadly, the fishingspot-checker doesn't work very well,
{ although I've done everything I can. The script still works,
{ probably just a little slower.
{=========================================}
Program Catherby_Fisher;
{.include SRL/SRL.scar}
Type TFishing = Record
Time: Integer;
Fished: Integer;
Loads: Integer;
FishLevel: Integer;
FishStr: String;
end;
var
UserStats: Array of TFishing;
MackerelFished,LobstersFished,TunaFished,Swordfish Fished,SharksFished: Integer;
Fished,Loads: Integer;
CurrentPlayerTime,LoadTime,ProgTimer: Integer;
BigNet,Cage,Harpoon,Equip: Integer;
Shark,Swordfish,Tuna,Lobster,Mackerel: Integer;
Fish,Fish2: Integer;
PlayerNum,FishSpotChecks,FishingSpot: Integer;
Fish_UpText,Fish_Option,EquipStr,FishStr: String;
UseFishingSpotChecker: Boolean;
{////\\\\////\\\\////\\\\}
{} Const
{} AntiBanRate= 1; // See notes #3.
{} UseFishingSpotChecking= False; // See notes #6.
{} UseLevelAsker= False; // True to use my Level-Asker.
{} RandomTalk= False; // True to say randoms (But relevant) things.
{} AntiBanCommenting= True; // Commenting on AntiBan's or not.
{} SRL_Stats_ID = ''; // SRL-Stats-ID. If you do not have one, then go get one
{} SRL_Stats_Password = ''; // Password for SRL-Stats-Account.
{} SCARToTray= False; // True sends SCAR to windows tray.
{} ProggyInReport= True; // True: Writes proggy in the Report-Box.
{ False: Writes proggy in Debug-Box.
{} StopWhenLoadsDone= False; // See notes #4.
{////\\\\////\\\\////\\\\}
Procedure DeclarePlayers;
begin
HowManyPlayers:= 1; // Number of players you are running
CurrentPlayer:= 0; // Starting player
NumberOfPlayers(HowManyPlayers) // Don't touch
SetArrayLength(UserStats,HowManyPlayers) // Don't touch
UseFishingSpotChecker:= UseFishingSpotChecking; // Don't touch
Players[0].Name:= 'Username'; // Name of your RuneScape account
Players[0].Pass:= 'Password'; // Password to your RuneScape account
Players[0].Nick:= 'sern'; // 3-4 chars of your RuneScape-Accounts name. No capitals or numbers!
Players[0].Pin:= '0000'; // Bank-pin, if any
Players[0].Strings[0]:= 'Swordfish'; // See notes #1 (But notes #5 first)
Players[0].Booleans[0]:= False; // See notes #5
Players[0].Integers[0]:= 3; // Loads to fish and bank, before changing player/relogging
Players[0].Integers[1]:= 20000; // See notes #2
Players[0].Integers[2]:= 1000; // Time in seconds 1 load can take before banking
Players[0].Active:= True; // True to use account, false to skip
{ Players[1].Name:= '';
Players[1].Pass:= '';
Players[1].Nick:= '';
Players[1].Pin:= 0000;
Players[1].Strings[0]:= 'Shark';
Players[1].Booleans[0]:= False;
Players[1].Integers[0]:= 3;
Players[1].Integers[1]:= 20000;
Players[1].Integers[2]:= 1000;
Players[1].Active:= True;
Players[2].Name:= '';
Players[2].Pass:= '';
Players[2].Nick:= '';
Players[2].Pin:= 0000;
Players[2].Strings[0]:= 'Auto';
Players[2].Integers[0]:= 3;
Players[2].Integers[1]:= 20000;
Players[2].Integers[2]:= 1000;
Players[2].Active:= True; }
{ You can add more players if you like. }
end;
Procedure DeclareDTMs;
begin
BigNet := DTMFromString('78DA63CC666260B8CF8002A27DAC18FE036 94' +
'620FE0F048C29986A20B23012482702D53C25A0261DA8E639 0135' +
'7940356F09A8A900AA7946404D1550CD63FC6A0021E50F36' );
Cage := DTMFromString('78DA8DCF410A40601005E019B7710016121 B4' +
'9CAEFFC885829257281DF5B62E1CDAB99D97C4D339A0522A3 BC92' +
'86221E53511ED112A6934FF4D1312B989E981666309889180 7B31' +
'8F6ACC434301B3135CC6EF8FD24A680B988C90D7B12988398 C870' +
'730C33FF9B1B6573172F');
Harpoon := DTMFromString('78DA634C65626078C3800232FD3919FE036 94' +
'620FE0F048CC540355719D000231209A4CB816AAE1350930F 54F3' +
'88809A5CA09A6704D46462BA19434D1250CD07CACD01005A4 0106' +
'B');
Shark := DTMFromString('78DA639CC8C4C07097010554151532FC07D 28' +
'C40FC1F0818FB816AAE33A00146241248CF06AAB94540CD54 A09A' +
'9B04D42C00AA794040CD42A09AC704D42C06AA794140CD12A 09AB' +
'704D4CC03AAF94084DF5F11503305A8E625116A0899038A8B F704' +
'D47410A986907BBA09C70500E3A91E5E');
Swordfish := DTMFromString('78DA6374626460B0046224B0B8640DC37F2 00' +
'D12FD0F048CFE409635AA1A882C8C04D20140962301351E40 962D' +
'01358E4498630364B912506349841A90390EF8D500007DE70 AFE');
Tuna := DTMFromString('78DA637464646030046224307B423FC37F2 00' +
'D12FD0F048C6E409636AA1A882C8C04D2FE409609116A7409 A871' +
'07B2AC08A8B105B26C09A8B100B22C08A8B106B28CF0AB010 0380' +
'30A97');
Lobster := DTMFromString('78DA63DCCFC4C0F088010554B8C832FC07D 28' +
'C40FC1F08188F01D5DC6240038C4824903E0954738D809A73 4035' +
'3709A8390D54739D809A134035F708A8398EE92FAC6E7E494 0CD1' +
'1A09A4F04D4EC03AA794A40CD2EA09A1704D46C23C23D2073 1E10' +
'50B31DA8E62101359B08BB190058C01EAC');
Mackerel := DTMFromString('78DA63B4676460A8026224B0704134C37F2 00' +
'D12FD0F048CEE40561DAA1A882C8C04D2BE98E660A8B101B2 9A09' +
'A83127C22E3B22CC7102B29AF0AB0100AF2A0BF8');
end;
Procedure EndPlayer(Activity: Boolean; ReasonLoc: String);
begin
UserStats[CurrentPlayer].Time:= UserStats[CurrentPlayer].Time + TimeFromMark(CurrentPlayerTime);
PlayerNum:= PlayerNum + 1;
LogOut;
Players[CurrentPlayer].Active:= Activity;
Players[CurrentPlayer].Loc:= ReasonLoc;
Writeln('Player was logged out')
Writeln('ReasonLoc: '+ReasonLoc)
end;
Function Randomize(Original,Rand: Integer): Integer;
begin
case random(2) of
0: Result:= Original - Random(Rand);
1: Result:= Original + Random(Rand);
end;
end;
Procedure DropToPosition(StartPos,EndPos: Integer);
var I: Integer;
begin
for I:= Min(StartPos,EndPos) to Max(StartPos,EndPos) do
begin
DropItem(I)
Wait(100+random(200))
end;
end;
Procedure HighestAngle;
var I: Integer;
begin
KeyDown(VK_UP)
Wait(1100)
for I:= 0 to 4 do
begin
Wait(random(50))
end;
KeyUp(VK_UP)
end;
Procedure AskForLevelsHuman; Forward;
Procedure SaySomethingWeird;
var Root,P1,P2,P3: String;
Var C: Integer;
begin
Case Random(3) of
0:
begin
Root:= IntToStr(Players[CurrentPlayer].Integers[0]-UserStats[CurrentPlayer].Loads)
case Random(2) of
0: P1:= 'only ';
end;
Case Random(3) of
0: P2:= ' loads left';
1: P2:= ' full invs left';
2: P2:= ' loads to go';
end;
TypeSend(P1+Root+P2)
Writeln(Players[CurrentPlayer].Name+': "'+P1+Root+P2+'"')
end;
1:
begin
P1:= 'b'
for C:= 1+random(10) downto 0 do
begin
Root:= Root + 'o';
end;
case random(2) of
0: P2:= 'rin';
1: P2:= 'ring';
end;
TypeSend(P1+Root+P2)
Writeln(Players[CurrentPlayer].Name+': "'+P1+Root+P2+'"')
end;
2:
begin
case random(2) of
0: P1:= 'what ';
1: P1:= 'wat ';
end;
case random(3) of
0,1: P2:= 'are '
end;
case random(2) of
0: P3:= 'you guys ';
1: P3:= 'you ';
end;
case random(2) of
0: Root:= ' fishing?';
1: Root:= ' fishing';
end;
TypeSend(P1+P2+P3+Root)
Writeln(Players[CurrentPlayer].Name+': "'+P1+P2+P3+Root+'"')
FTWait(15)
TypeSend('Im fishing '+UserStats[CurrentPlayer].FishStr)
Writeln(Players[CurrentPlayer].Name+': "im fishing '+UserStats[CurrentPlayer].FishStr+'"')
end;
end;
end;
Procedure WriteAB(Text: String);
begin
if AntiBanCommenting then Writeln(Text);
end;
Function NormalAntiban: Boolean;
var I,C: Integer;
begin
if (Not LoggedIn) then Exit;
case Random(AntiBanRate) of
0:
begin
WriteAB('Performing Normal-Antiban: ')
case Random(7) of
0:
begin
WriteAB('Random camera-tilt')
I:= 300+random(700)
KeyDown(40)
Wait(I)
KeyUp(40)
Wait(500+random(500))
KeyDown(38)
Wait(I+random(200))
KeyUp(38)
Result:= True;
end;
1:
begin
WriteAB('Random camera-pane')
I:= 300+random(800)
C:= 4;
case random(2) of
0:
begin
KeyDown(VK_RIGHT)
Wait(I)
KeyUp(VK_RIGHT)
C:= C - 1;
end;
1:
begin
KeyDown(VK_LEFT)
Wait(I)
KeyUp(VK_LEFT)
C:= C - 3;
end;
end;
Wait(700+random(500))
case C of
1:
begin
KeyDown(VK_RIGHT)
Wait(Randomize(I,20))
KeyUp(VK_RIGHT)
end;
3:
begin
KeyDown(VK_LEFT)
Wait(Randomize(I,20))
KeyUp(VK_LEFT)
end;
end;
Result:= True;
end;
2:
begin
WriteAB('Random GameTab')
I:= GetCurrentTab;
C:= 1+random(10)
if (C = 4) then
begin
case Random(2) of
0: GameTab(1+random(3));
1: GameTab(5+random(7));
end;
end else GameTab(1+random(10));
Wait(500+random(1500))
GameTab(I)
Result:= True;
end;
3:
begin
if UseLevelAsker then
begin
WriteAB('Level Asker/Random mouse-movement')
AskForLevelsHuman;
end else NormalAntiban;
Result:= True;
end;
4:
begin
WriteAB('SleepAndMoveMouse')
SleepAndMoveMouse(200+random(2000))
Result:= True;
end;
5:
begin
WriteAB('Random hoverskill')
case Random(3) of
0: HoverSkill('Fishing',false);
1: HoverSkill('Cooking',false);
2: HoverSkill('Woodcutting',false);
end;
UserStats[CurrentPlayer].Fishlevel:= GetSkillInfo('Fishing',true)
GameTab(4)
Result:= True;
end;
6:
begin
WriteAB('Saying something weird')
if RandomTalk then SaySomethingWeird
else NormalAntiban;
Result:= True;
end;
end;
end;
end;
end;
Procedure MouseAntiban(Tx,Ty: Integer);
var a,b: Integer;
begin
if (Not LoggedIn) then Exit;
case Random(50) of
0:
begin
WriteAB('Performing Mouse-Antiban')
Case Random(5) of
0:
begin
WriteAB('Starting-insecurity')
GetMousePos(a,b)
MMouse(a-5,b-5,10,10)
Wait(500+random(500))
end;
1:
begin
WriteAB('PickUpMouse')
PickUpMouse;
Wait(200+random(300))
end;
2,4:
begin
WriteAB('Mousespeed-change')
if MouseSpeed <= 10 then MouseSpeed:= MouseSpeed + Random(6);
if MouseSpeed >= 20 then MouseSpeed:= MouseSpeed - Random(6);
if ((MouseSpeed > 12) and (MouseSpeed < 18)) then MouseSpeed:= Randomize(MouseSpeed,5);
Wait(200+random(300))
end;
3:
begin
WriteAB('Overshooting target')
GetMousePos(a,b)
if (Tx > 30) and (Ty > 30) and (Tx < 700) and (Ty < 420) then
begin
if Not PointInBox(IntToPoint(a,b),IntToBox(Tx-20,Ty-20,Tx+20,Ty+20)) then
begin
case Random(4) of
0: MMouse(Tx,Ty-30,10,10);
1: MMouse(Tx-30,Ty,10,10);
2: MMouse(Tx,Ty+30,10,10);
3: MMouse(Tx+30,Ty,10,10);
end;
Wait(200+random(200))
end;
end;
end;
end;
end;
end;
end;
Procedure MMouse2(x,y,ranx,rany: Integer);
var Tx,Ty: Integer;
begin
Tx:= X+Random(Ranx)
Ty:= Y+Random(Rany)
MouseAntiban(Tx,Ty);
MMouse(Tx,Ty,0,0);
end;
Procedure Mouse2(x,y,ranx,rany: Integer; Left: Boolean);
var Tx,Ty: Integer;
begin
Tx:= X+Random(Ranx)
Ty:= Y+Random(Rany)
MouseAntiban(Tx,Ty)
Mouse(Tx,Ty,0,0,Left)
end;
Procedure BankToTop;
var a,b,ScrollButton,C: Integer;
begin
if (Not LoggedIn) then Exit;
ScrollButton := DTMFromString('78DA63BCC2C8C090CA8002CAD24218B8803 42' +
'394CFF818C8AA465563ACAB8AA92695809A2B4498731DC82A 4355' +
'E3EB648CAAE62E90954D40CD4D20AB8408734A895093875BC D7F2' +
'00000839C16A8');
if SimilarColors(GetColor(474,75),1777699,5) then
begin
if FindDTM(ScrollButton,a,b,464,49,487,290) then
begin
MMouse(a,b,10,10)
GetMousePos(a,b)
HoldMouse(a,b,true)
MouseSpeed:= 4+random(5)
Wait(100+random(50))
MMouse(468, 75,5,2)
GetMousePos(a,b)
ReleaseMouse(a,b,true)
if SimilarColors(GetColor(474,75),1777699,5) then
begin
MMouse(469, 60,10,10)
GetMousePos(a,b)
HoldMouse(a,b,true)
repeat
Wait(100+random(100))
C:= C + 1;
until(not SimilarColors(GetColor(474,75),1777699,5)) or (C = 20)
end;
end;
end;
FreeDTM(ScrollButton)
end;
Function FindFishingSpot2(UpText,Choose: String): Boolean;
var
A,b,Bn,I,x,y,NFT,WCol: Integer;
Boxes: Array of TBox;
begin
repeat
Wait(1)
if FindColorSkipBoxArrayTolerance(a,b,15584681,MSx1,M Sy1,MSx2,MSy2,15,Boxes) then
begin
MMouse(a,b,5,5)
Wait(200+random(300))
if IsUpText('quarium') then
begin
Writeln('Noooees! We''re at the Aquarium!')
WCol:= FindWaterColor;
if WCol = 0 then
begin
Mouse(636, 127,10,10,true)
FFlag(0)
Exit;
end;
for I:= 30 to 80 do
begin
if FindColor(x,y,FindWaterColor,MMCx+I,MMCy-1,MMCx+I+1,MMCy+1) then
begin
Mouse(x,y,3,3,true)
FFlag(0)
Exit;
end;
end;
end;
if IsUpText(UpText) then
begin
GetMousePos(a,b)
Mouse(a,b,0,0,false)
Wait(200+random(300))
if ChooseOption(Choose) then Result:= True
else
begin
if Bn > 15 then Exit;
SetArrayLength(Boxes,Bn+1)
Boxes[Bn]:= IntToBox(A-30,b-30,a+30,b+30);
Bn:= Bn + 1;
end;
end else
begin
if Bn > 15 then Exit;
SetArrayLength(Boxes,Bn+1)
Boxes[Bn]:= IntToBox(A-30,b-30,a+30,b+30);
Bn:= Bn + 1;
end;
end else
begin
NFT:= NFT + 1;
if NFT = 50 then Exit;
end;
until(Result)
end;
function FindObjUTCH(var x,y: Integer; Boxsize,SBSize: Integer; UpText,Choose: String; Colors: TIntegerArray; Tol,MaxSkipBoxes: Integer): Boolean;
var
A,b: TIntegerArray;
Boxes: TBoxArray;
C,CsInBox,NB: Integer;
NBox: Boolean;
begin
if (Not LoggedIn) then Exit;
SetArrayLength(a,GetArrayLength(Colors))
SetArrayLength(b,GetArrayLength(Colors))
if MaxSkipBoxes = 0 then MaxSkipBoxes:= 2;
SetArrayLength(Boxes,MaxSkipBoxes)
repeat
NBox:= False;
C:= 0;
CsInBox:= 0;
if FindColorSkipBoxArrayTolerance(A[0],B[0],Colors[C],MSx1,MSy1,MSx2,MSy2,Tol,Boxes)then
begin
repeat
Inc(C)
if FindColorTolerance(A[C],B[C],Colors[C],A[0]-BoxSize,B[0]-BoxSize,A[0]+BoxSize,B[0]+BoxSize,Tol)then
begin
Inc(CsInBox)
end else NBox:= True;
until (CsInBox = GetArrayLength(Colors)-1) or (NBox)
end;
begin
if NB >= MaxSkipBoxes then Break;
if NBox then
begin
Boxes[NB]:= IntToBox(A[0]-SBSize,B[0]-SBSize,A[0]+SBSize,B[0]+SBSize)
Inc(NB)
end else
begin
if Not PointInBox(IntToPoint(A[0],B[0]),IntToBox(0,0,4,4)) then
begin
MMouse2(A[0],B[0],3,3)
Wait(120+random(70))
end;
if IsUpText(UpText) then
begin
GetMousePos(x,y)
Mouse2(x,y,0,0,false)
Wait(200+random(300))
if ChooseOption(Choose) then
begin
Result:= True;
Exit;
end else
begin
if NB >= MaxSkipBoxes then Break;
Boxes[NB]:= IntToBox(A[0]-SBSize,B[0]-SBSize,A[0]+SBSize,B[0]+SBSize)
Inc(NB)
end;
end else
begin
if NB >= MaxSkipBoxes then Break;
Boxes[NB]:= IntToBox(A[0]-SBSize,B[0]-SBSize,A[0]+SBSize,B[0]+SBSize)
Inc(NB)
end;
end;
end;
until(false)
end;
Function MMColorAngle(var x,y: Integer; Col,Tol,StartAngle,EndAngle,StartRadius,EndRadius: Integer): Boolean;
var Cpx,Cpy,R,A: Integer;
begin
if (Not LoggedIn) then Exit;
if StartAngle > EndAngle then
begin
for A:= StartAngle downto EndAngle do
begin
if StartRadius > EndRadius then
begin
for R:= StartRadius downto EndRadius do
begin
Cpx:= Round(R*Sine(A))+MMCx;
Cpy:= Round(-R*Cose(A))+MMCy;
if FindColorTolerance(x,y,Col,Cpx,Cpy,Cpx+1,Cpy+1,Tol ) then
begin
Result:= True;
Exit;
end;
end;
end else
begin
for R:= StartRadius to EndRadius do
begin
Cpx:= Round(R*Sine(A))+MMCx;
Cpy:= Round(-R*Cose(A))+MMCy;
if FindColorTolerance(x,y,Col,Cpx,Cpy,Cpx+1,Cpy+1,Tol ) then
begin
Result:= True;
Exit;
end;
end;
end;
end;
end else
begin
for A:= StartAngle to EndAngle do
begin
if StartRadius > EndRadius then
begin
for R:= StartRadius downto EndRadius do
begin
Cpx:= Round(R*Sine(A))+MMCx;
Cpy:= Round(-R*Cose(A))+MMCy;
if FindColorTolerance(x,y,Col,Cpx,Cpy,Cpx+1,Cpy+1,Tol ) then
begin
Result:= True;
Exit;
end;
end;
end else
begin
for R:= StartRadius to EndRadius do
begin
Cpx:= Round(R*Sine(A))+MMCx;
Cpy:= Round(-R*Cose(A))+MMCy;
if FindColorTolerance(x,y,Col,Cpx,Cpy,Cpx+1,Cpy+1,Tol ) then
begin
Result:= True;
Exit;
end;
end;
end;
end;
end;
end;
Function FindDTMRMM(DTM: Integer; var a,b: Integer; SA,EA: Integer): Boolean;
var E: Extended;
begin
if (Not LoggedIn) then Exit;
Result:= FindDTMRotated(DTM,a,b,MMx1,MMy1,MMx2,MMy2,SA,EA,0 .05,E)
end;
Function WeirdRW(Color,Tol,SR,ER,SRa,ERa: Integer): Boolean;
var a,b: Integer;
begin
if (Not LoggedIn) then Exit;
if MMColorAngle(a,b,Color,10,SR,ER,SRa,ERa) then
begin
Mouse2(a-2,b-2,4,4,true)
Result:= True;
end;
if (Random(5)=0) then NormalAntiban;
end;
Function GotEquip: Boolean;
var a,b: Integer;
begin
if (Not LoggedIn) then Exit;
GameTab(4)
Result:= FindDTM(Equip,a,b,MIx1,MIy1,MIx2,MIy2)
end;
Function MMColorPercent(Color: Integer): Integer;
var P: TPointArray;
begin
if (Not LoggedIn) then Exit;
FindColorsTolerance(p,Color, MMX1, MMY1, MMX2, MMY2, 0);
Result := Round((Length(p) / 15741.0) * 100.0);
end;
{All Creds to Tarajunky for this. All I did was edit out the Writeln's}
function FindWaterColorNC: Integer;
var
GC, a, l, TestColor, Red, Green, Blue : integer;
var
P:array of Tpoint;
begin
GC := 12095356;
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 50);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
if rs_OnMinimap(P[a].x,P[a].y) then
begin
TestColor := GetColor(P[a].x,P[a].y);
if SimilarColors(TestColor,GC,50) then
begin
red := (TestColor mod 256);
green := ((TestColor / 256) mod 256);
blue := ((TestColor / 256) / 256);
if Green - Red <= 22 then if Green - Red >= 18 then
if Blue - Red >= 55 then if Blue - Red <= 72 then
if Blue - Green >= 35 then if Blue - Green <= 52 then
if GetColor(P[a].x + 2, P[a].y + 2) = TestColor then
if GetColor(P[a].x + 1, P[a].y + 1) = TestColor then
if GetColor(P[a].x, P[a].y + 2) = TestColor then
if GetColor(P[a].x + 2, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 1) = TestColor then
if GetColor(P[a].x + 1, P[a].y) = TestColor then
if GetColor(P[a].x + 2, P[a].y + 1) = TestColor then
if GetColor(P[a].x + 1, P[a].y + 2) = TestColor then
begin
Result := TestColor;
WaterColor := TestColor;
Exit;
end;
end;
end;
end;
Result := 0;
end;
{Same as above; 100% Tara-power :D}
function FindRoadColorNC: Integer;
var
GC, a, l, TestColor, Red, Green, Blue : integer;
var
P:array of Tpoint;
begin
GC := 5987170;
Flag;
FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
if rs_OnMinimap(P[a].x,P[a].y) then
begin
TestColor := GetColor(P[a].x,P[a].y);
if SimilarColors(TestColor,GC,60) then
begin
red := (TestColor mod 256);
green := ((TestColor / 256) mod 256);
blue := ((TestColor / 256) / 256);
if Red - Green <= 10 then if Red - Green >= 5 then
if Red - Blue <= 10 then if Red - Blue >= 5 then
if GetColor(P[a].x + 5, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 3) = TestColor then
if GetColor(P[a].x, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 5, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y) = TestColor then
if GetColor(P[a].x + 5, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 5) = TestColor then
begin
Result := TestColor;
RoadColor := TestColor;
Exit;
end;
end;
end;
end;
Result := 0;
end;
Function InDoubleRange(Num,Dev,RangeOf: Integer): Boolean;
begin
if (Num-Dev <= RangeOf) and (Num+Dev >= RangeOf) then Result:= True;
end;
Function Spot: Integer;
var WP,RP: Integer;
begin
if (Not LoggedIn) then Exit;
WP:= MMColorPercent(FindWaterColorNC);
RP:= MMColorPercent(FindRoadColorNC)
if FindRoadColorNC = 0 then
begin
if InDoubleRange(36,5,WP) then Result:= 3
else Result:= 4;
end else
begin
if InDoubleRange(5,2,RP) then Result:= 1
else Result:= 2;
end;
end;
Procedure AskForLevelsHuman;
var
S1,S2,S3,Skill,QM: String;
begin
if (Not LoggedIn) then Exit;
Case random(5) of
0: Skill:= 'cooking';
1: Skill:= 'cook';
2: Skill:= 'fish';
3: Skill:= 'fishing';
4: Skill:= 'total';
end;
Case Random(5) of
0: S1:= 'what ';
1: S1:= 'wat ';
2: S1:= 'waht ';
3: S1:= 'what ';
end;
case random(4) of
0: S2:= 'are your ';
1: S2:= 'are youre ';
2: S2:= 'is your ';
3: S2:= 'is youre ';
end;
if(S1 = '')then
begin
S2:= ''
end;
Case random(4) of
0: S3:= 'levels';
1: S3:= 'lvls';
2: S3:= 'lvs';
3: S3:= 'level';
end;
Case random(3) of
0: QM:= '?';
1: QM:= '';
2: QM:= ' ?';
end;
Wait(10+random(50))
TypeSend(S1+S2+Skill+' '+S3+QM)
Writeln('Asked: "'+S1+S2+Skill+' '+S3+QM+'"')
end;
Function CountInvDTM(DTM: Integer): Integer;
var
I,O: Integer;
a,b: Integer;
begin
if (Not LoggedIn) then Exit;
if (DTM = -1) then Exit;
for O:= 0 to 7 do
begin
for I:= 1 to 4 do
if(FindDTM(DTM,a,b,562+((I-1)*40),207+(O*37),562+(I*40),244+(O*37)))then
begin
Result:= Result + 1;
end;
end;
end;
Function FishCount: Integer;
begin
if (Not LoggedIn) then Exit;
Result:= CountInvDTM(Fish);
end;
Function GetEquipFromGround: Boolean;
var
HarpoonGround,CageGround,a,b: Integer;
E: Extended;
begin
if (Not LoggedIn) then Exit;
HarpoonGround := DTMFromString('78DA6354626460D8C0800232FD3919E4803 42' +
'394CF280764AD25A0460AC85A8DAA26C1034D8D3890B50A55 4D65' +
'141FAA1A21206B19AA9AAAA24254352240D672543579E9E92 86A0' +
'090970B0A');
CageGround := DTMFromString('78DA6354626460D8C0800232FD3919E4803 42' +
'394CF280764AD25A0460AC85A8DAA26C1034D8D3890B50A55 4D65' +
'141FAA1A21206B19AA9AAAA24254352240D672543579E9E92 86A0' +
'090970B0A');
case LowerCase(EquipStr) of
'harpoon':
begin
if FindDTMRotated(HarpoonGround,a,b,MSx1,MSy1,MSx2,MS y2,-30,30,0.05,E) then
begin
MMouse2(a,b,3,3)
Wait(200+random(200))
if IsUpText('ake')then
begin
GetMousePos(a,b)
Mouse2(a,b,0,0,true)
FFlag(0)
Result:= True;
end;
end;
end;
'cage':
begin
if FindDTMRotated(CageGround,a,b,MSx1,MSy1,MSx2,MSy2,-30,30,0.05,E) then
begin
MMouse2(a,b,3,3)
Wait(200+random(200))
if IsUpText('ake')then
begin
GetMousePos(a,b)
Mouse2(a,b,0,0,true)
FFlag(0)
Result:= True;
end;
end;
end;
end;
FreeDTM(HarpoonGround)
FreeDTM(CageGround)
end;
Procedure FishToBank; Forward;
Procedure BankToFish; Forward;
Function OpenCathyBank: Boolean; Forward;
Procedure GetNewEq;
var a,b,I: Integer;
begin
if (Not LoggedIn) then Exit;
for I:= 1 to 28 do
begin
if ExistsItem(I) then
begin
MouseItem(I,false)
ChooseOption('Store All')
end;
end;
if BankScreen then
begin
if FindDTM(Equip,a,b,MSx1,MSy1,MSx2,MSy2) then
begin
Mouse2(a,b,5,5,true)
end else
begin
CloseWindow;
EndPlayer(False,'No new FishingEquip in bank')
end;
end;
end;
Procedure CheckEqExist;
begin
if (Not LoggedIn) then Exit;
if not GotEquip then
begin
Writeln('Lost '+EquipStr)
if GetEquipFromGround then Writeln('Got '+EquipStr+' from ground')
else
begin
Writeln('Getting new '+EquipStr+' from bank')
FishToBank;
OpenCathyBank;
BankToTop;
GetNewEq;
BankToFish;
end;
end;
end;
Function WalkWater(Sa,Ea,Sra,Era: Integer): Boolean;
var a,b: integer;
begin
if (Not LoggedIn) then Exit;
if MMColorAngle(a,b,FindWaterColor,2,Sa,Ea,Sra,Era) then
begin
Mouse(a,b-5,5,5,true)
Result:= True;
end;
end;
Procedure YouLaggedFix;
var T: Integer;
begin
if(GetColor(346,294)=8356779)and(GetColor(272,339) =8356779)and(GetColor(370,339)=16777215)then
begin
Mouse(347,320,110,40,true)
MarkTime(T)
repeat
Wait(300+random(300))
until(LoggedIn) or (TimeFromMark(T) > 10000)
end;
end;
Procedure FishLevelUpTalk(Level: Integer);
var P1,P2,P3,P4,P5: String;
var Count: Integer;
begin
Writeln('You advanced a fishing level. Assembling sentence...')
case Random(4) of
0: P1:= 'say ';
1: P1:= 'sai ';
2: P1:= 'omg ';
end;
case Random(2) of
0:
begin
P2:= 'w';
for Count:= 1+random(10) downto 0 do
begin
case random(2) of
0: P2:= P2 + '0';
1: P2:= P2 + 'o';
end;
end;
case random(2) of
0: P2:= P2 + 't! ';
1: P2:= P2 + 't ';
end;
end;
1:
begin
P2:= 'wh';
for Count:= 1+random(10) downto 0 do
begin
P2:= P2 + 'a'
end;
case random(2) of
0: P2:= P2 + 't! ';
1: P2:= P2 + 't ';
end;
end;
end;
case random(4) of
0: P3:= 'fish ';
1: P3:= 'fishing ';
2: P3:= 'fishin ';
end;
case random(4) of
0: P4:= 'level ';
1: P4:= 'lvl ';
2: P4:= 'lv ';
3:
begin
if (P3 = '') then
begin
case random(3) of
0: P4:= 'level ';
1: P4:= 'lvl ';
2: P4:= 'lv ';
end;
end;
end;
end;
case random(6) of
0: P5:= 'up!';
1: P5:= 'up';
2,4: P5:= IntToStr(Level)+' !';
3,5: P5:= IntToStr(Level);
end;
TypeSend(P1+P2+P3+P4+P5)
Writeln('Said: '+P1+P2+P3+P4+P5)
end;
Procedure NearWaterCheck;
var I: Integer;
begin
for I:= 0 to 10 do
begin
if (Not LoggedIn) then Exit;
if (FindWaterColorNC = 0) then FTWait(4+random(5))
else Exit;
end;
EndPlayer(False,'Not near water')
end;
Procedure CheckRandoms;
var a,b,T: Integer;
begin
YouLaggedFix;
if Not LoggedIn then
begin
if Players[CurrentPlayer].Active then LoginPlayer
else Exit;
end;
if (GetColor(352,293)=8356779) and (GetColor(271,350)=8356779) then
begin
Mouse2(338,318,100,35,true)
MarkTime(T)
repeat
Wait(100+random(100))
until(LoggedIn) or (TimeFromMark(T) >= 15000)
Wait(1000+random(1000))
end;
FindNormalRandoms;
SolveChatRandom;
FindTalk;
if FindFight then
begin
RunTo('N',false)
FTWait(10+random(10))
if FindFight then RunTo('W',False);
if FindSymbol(a,b,'Fish') then
begin
Mouse2(a,b,5,5,true)
FFlag(0)
end else if WalkWater(170,190,60,10) then FFlag(0);
end;
if FindDead then
begin
EndPlayer(False,'Dead')
end;
if FindText(a,b,'continue',NPCChars,MCx1,MCy1,MCx2,MC y2) then
begin
if FindText(a,b,'evel',NPCChars,MCx1,MCy1,MCx2,MCy2) then
begin
ClickToContinue;
Wait(1000+random(1000))
GameTab(2)
Wait(1000+random(500))
MMouse(682,274,45,20)
Wait(1000+random(1000))
MMouse(MSx1,MSy1,MSx2-MSx1,MSy2-MSy1)
FishLevelUpTalk(GetSkillInfo('Fishing',false));
GameTab(4)
end;
end;
NearWaterCheck;
if Not LoggedIn then Players[CurrentPlayer].Active:= False;
end;
Function NearSpots: Boolean;
var a,b: Integer;
begin
if (Not LoggedIn) then Exit;
Result:= (FindColorTolerance(a,b,FindWaterColor,642,92,643, 102,2))
end;
Procedure BankToFish;
var
a,b,WaterRocks: Integer;
GoBack: Boolean;
Label Walk,FS;
begin
if (Not LoggedIn) then Exit;
WaterRocks := DTMFromString('78DA63AC67626088604001C9D1110C22409 A1' +
'1CA676C03AA4922A0A60FA82681809A1AA09A44543535FD3B 50D5' +
'3400D5A41150D30E5493895F0D00DE850E7C');
if WeirdRW(FindRoadColor,5,120,80,60,10) then FFlag(0)
else if RadialWalk(FindRoadColor,120,80,60,1,1) then FFlag(0)
else WalkWater(70,140,67,10);
CheckRandoms;
if WeirdRW(FindRoadColor,5,120,80,60,10) then FFlag(0)
else if RadialWalk(FindRoadColor,110,80,60,1,1) then FFlag(0)
else WalkWater(70,140,67,10);
GoBack:= True;
Walk:
CheckRandoms;
if MMColorAngle(a,b,FindRoadColor,5,120,80,65,10) then
begin
if WeirdRW(FindRoadColor,5,180,80,60,10) then
begin
Wait(20)
if not FlagPresent then GoBack:= False;
FFlag(0)
end else WalkWater(70,140,67,10);
if GoBack then Goto Walk;
end;
FS:
if FindSymbolIn(a,b,'Fish',MMx1+((MMx2-MMx1)/2),MMy1,MMx2,MMy2) then
begin
Mouse2(a,b+10,5,5,true)
FFlag(0)
end else
begin
if FindDTMRMM(WaterRocks,a,b,-30,30) then
begin
Mouse2(a+5,b-5,5,5,true)
FFlag(0)
end else
begin
if WalkWater(60,140,50,20) then FFlag(0)
else Goto FS;
end;
end;
FishingSpot:= Spot;
CheckRandoms;
if Not NearSpots then
begin
Writeln('You weren''t near the spots. Waterwalking further.')
if WalkWater(70,220,60,20) then FFlag(0)
end;
end;
Function FindBankers(var x,y: Integer): Boolean;
var Bankers: Integer;
begin
Bankers := DTMFromString('78DA636C666260706740012DD5550CFF813 42' +
'310FF0702C64AA01A2B54357FFE30316840D58000632D508D 1901' +
'358D4498D349580D00AACE12BF');
Result:= (FindDTMRMM(Bankers,x,y,-30,30));
FreeDTM(Bankers)
end;
Procedure FishToBank;
var a,b,Tries: Integer;
begin
if (Not LoggedIn) then Exit;
Tries:= 0;
if (FishingSpot = 1) or (FishingSpot = 2) then Tries:= 0
else
begin
if WalkWater(350,230,65,60) then FFlag(0)
else if WalkWater(10,180,65,60) then FFlag(0)
end;
if (FindRoadColorNC=0) then if WalkWater(10,180,65,60) then FFlag(0);
if WeirdRW(FindRoadColor,10,200,360,70,30) then FFlag(0)
else
begin
if WeirdRW(FindRoadColor,5,200,20,70,30) then FFlag(0);
end;
CheckRandoms;
repeat
if WeirdRW(FindRoadColor,5,260,280,50,35) then FFlag(0);
CheckRandoms;
Tries:= Tries + 1;
until(Tries = 5) or (FindBankers(a,b)) or FindSymbol(a,b,'Bank')
if Tries = 5 then
begin
EndPlayer(False,'Lost')
end else
begin
Mouse2(a,b+5,5,5,true)
FFlag(0)
end;
CheckRandoms;
end;
Function OpenCathyBank: Boolean;
var a,b,Tol,C: Integer;
begin
if (Not LoggedIn) then Exit;
Tol:= 10;
CheckRandoms;
repeat
if FindObjUTCH(a,b,30,50,'se','quickly',[7311519,3173769,5462367,608352],Tol,40) then
begin
FFlag(0)
repeat
Wait(200+random(200))
C:= C + 1;
until(BankScreen) or (PinScreen) or (C = 20)
if C = 10 then
begin
EndPlayer(False,'Did not find bank')
Exit;
end;
if PinScreen then
begin
InPin((Players[CurrentPlayer].Pin))
C:= 0;
repeat
Wait(200+random(200))
C:= C + 1;
until(BankScreen) or (C = 20)
if C = 20 then
begin
EndPlayer(False,'Bank problems')
Exit;
end;
Wait(200+random(300))
end;
Wait(1000+random(1000))
Result:= True;
Exit;
end else
begin
if FindBankers(a,b) then
begin
Mouse(a,b+2,5,5,true)
FFlag(0)
Wait(200+random(300))
end;
end;
Tol:= Tol + 1;
until(Tol = 20)
end;
Procedure ChangeToNewEq(OldEquip: String);
var a,b,T: Integer;
var EquipDeposited: Boolean;
Label Redo;
begin
if (Not LoggedIn) then Exit;
if BankScreen then
begin
case OldEquip of
'Big Net':
begin
if FindDTM(BigNet,a,b,MIx1,MIy1,MIx2,MIy2) then
begin
Mouse2(a,b,5,5,true)
EquipDeposited:= True;
Redo:
end;
end;
'Harpoon':
begin
if FindDTM(Harpoon,a,b,MIx1,MIy1,MIx2,MIy2) then
begin
Mouse2(a,b,5,5,true)
EquipDeposited:= True;
Redo:
end;
end;
'Cage':
begin
if FindDTM(Cage,a,b,MIx1,MIy1,MIx2,MIy2) then
begin
Mouse2(a,b,5,5,true)
EquipDeposited:= True;
Redo:
end;
end;
end;
if EquipDeposited then
begin
if FindDTM(Equip,a,b,MSx1,MSy1,MSx2,MSy2) then
begin
Mouse2(a,b,5,5,true)
end else
begin
if T <> 1 then
begin
BankToTop;
T:= 1;
Goto Redo;
end else
begin
CloseWindow;
LogOut;
end;
end;
end;
end;
end;
Procedure DepositItems;
var a,b,Tries,I: Integer;
begin
if (Not LoggedIn) then Exit;
if BankScreen then
begin
if FindDTM(Fish,a,b,MIx1,MIy1,MIx2,MIy2) then
begin
Mouse(a,b,5,5,false)
Wait(300+random(300))
ChooseOption('Store All')
Wait(1000+random(1000))
end;
if not (Fish2 = -1) then
begin
if FindDTM(Fish2,a,b,MIx1,MIy1,MIx2,MIy2) then
begin
Mouse(a,b,5,5,false)
Wait(300+random(300))
ChooseOption('Store All')
Wait(1000+random(1000))
end;
end;
for I:= 2 to 28 do
begin
if ExistsItem(I) then
begin
MouseItem(I,False)
Wait(300+random(300))
ChooseOption('Store All')
Wait(500+random(500))
end;
end;
CloseWindow;
end else
begin
OpenCathyBank;
DepositItems;
Tries:= Tries + 1;
if Tries = 4 then
begin
EndPlayer(False,'Not in bank')
end;
end;
ReportVars[0]:= ReportVars[0] + 1;
Loads:= Loads + 1;
Inc(UserStats[CurrentPlayer].Loads)
CloseWindow;
UserStats[CurrentPlayer].FishLevel:= GetSkillInfo('Fishing',true)
GameTab(4)
DropToPosition(2,28)
end;
Procedure TryOtherFishSpot;
begin
if (Not LoggedIn) then Exit;
FishingSpot:= Spot;
if FishingSpot = 0 then
begin
Disguise('Wtf?')
end;
Case FishingSpot of
1,2,3:
begin
//Writeln('Changing from spot '+IntToStr(FishingSpot)+' to '+IntToStr(FishingSpot+1)+' via WaterWalk')
case FishingSpot of
1: if WalkWater(50,150,32,28) then FFlag(0);
2: if WalkWater(50,150,35,30) then FFlag(0)
else if WalkWater(310,210,32,28) then FFlag(0);
3: if WalkWater(50,120,30,25) then FFlag(0);
else if WalkWater(340,250,35,30) then FFlag(0);
end;
FishingSpot:= Spot;
end;
4:
begin
Writeln('WaterWalking to spot 1')
if WalkWater(300,200,62,55) then FFlag(0);
if WalkWater(300,200,30,25) then FFlag(0);
end;
end;
FishingSpot:= Spot;
end;
Function FindFishingSpot(UpText,Choose: String): Boolean;
var
A,b,Bn,NFT,WCol,Time: Integer;
Boxes: Array of TBox;
begin
CheckRandoms;
MarkTime(Time)
repeat
Status('SpotChecks = '+IntToStr(FishSpotChecks))
Wait(1)
if FindColorSkipBoxArrayTolerance(a,b,15584681,MSx1,M Sy1,MSx2,MSy2,15,Boxes) then
begin
MMouse(a,b,5,5)
Wait(400+random(300))
if IsUpText('quar') then
begin
Writeln('Noooees! We''re at the Aquarium!')
WCol:= FindWaterColor;
if WCol = 0 then
begin
Mouse(636, 127,10,10,true)
FFlag(0)
Exit;
end;
if WalkWater(90,200,68,30) then
begin
FFLag(0)
Exit;
end;
end;
if IsUpText(UpText) then
begin
GetMousePos(a,b)
Mouse(a,b,0,0,false)
Wait(200+random(300))
if ChooseOption(Choose) then Result:= True
else
begin
if Bn > 15 then Exit;
SetArrayLength(Boxes,Bn+1)
Boxes[Bn]:= IntToBox(A-30,b-30,a+30,b+30);
Bn:= Bn + 1;
end;
end else
begin
if Bn > 15 then Exit;
SetArrayLength(Boxes,Bn+1)
Boxes[Bn]:= IntToBox(A-30,b-30,a+30,b+30);
Bn:= Bn + 1;
end;
end else
begin
NFT:= NFT + 1;
if NFT = 50 then Exit;
end;
until(Result)or(TimeFromMark(Time)>10000)
end;
Procedure GetFishingSpot;
begin
if (Not LoggedIn) then Exit;
Players[CurrentPlayer].Loc:= 'Spot '+IntToStr(FishingSpot);
repeat
CheckRandoms;
if (FindFishingSpot(Fish_UpText,Fish_Option)=False) then
begin
CheckRandoms;
TryOtherFishSpot;
FishSpotChecks:= FishSpotChecks + 1;
Status('SpotChecks = '+IntToStr(FishSpotChecks))
if FishSpotChecks > 50 then EndPlayer(False,'No fishing spot');
if ((FishSpotChecks mod 6)=0) then
begin
Status('Waiting for some fishing spots')
Wait(10000+random(10000))
end;
end else
begin
FishSpotChecks:= 0;
Status('SpotChecks = 0')
Break;
end;
until(false)
Wait(2000+random(2000))
end;
Function InFrontOfSpot: Boolean;
var
T,Total: Integer;
TPA: TPointArray;
begin
for T:= 1 to 5 do
begin
FindColorsTolerance(TPA,15124146,243,210,287,250,2 5)
Total:= Total + GetArrayLength(TPA);
end;
Result:= (Total > 10)
end;
Function FishingAtSpot: Boolean;
var Total,I: Integer;
begin
for I:= 0 to 10 do
begin
if InFrontOfSpot then Total:= Total + 1;
end;
Result:= (Total>4)
end;
Function IsFishing: Boolean;
var
I,MT,RT,TT,AT,Rx,A,B: Integer;
SBF: Boolean;
begin
I:= FishCount;
FishingSpot:= Spot;
Players[CurrentPlayer].Loc:= 'Spot '+IntToStr(FishingSpot)
Status('Fishing')
MarkTime(MT)
MarkTime(RT)
MarkTime(TT)
MarkTime(AT)
case Random(5) of
0: Rx:= 0+random(500);
1: Rx:= 1000+random(500);
2: Rx:= 2000+random(500);
3: Rx:= 3000+random(500);
4: Rx:= 4000+random(500);
end;
repeat
Wait(100+random(100))
if TimeFromMark(MT) > 8000+Rx then
begin
if not NormalAntiban then MMouse2(0,0,745,450);
case Random(5) of
0: Rx:= 0+random(500);
1: Rx:= 1000+random(500);
2: Rx:= 2000+random(500);
3: Rx:= 3000+random(500);
4: Rx:= 4000+random(500);
end;
MarkTime(MT)
end;
if TimeFromMark(RT) > 2000 then
begin
CheckRandoms;
if not (EquipStr = 'Barehanded') then CheckEqExist;
MarkTime(RT)
end;
if (UseFishingSpotChecker) and (not FishingAtSpot) then Break;
until(FishCount > I) or (TimeFromMark(TT) > Players[CurrentPlayer].Integers[1])
if (UseFishingSpotChecker) and (Not FishingAtSpot) then Exit;
if FishCount > I then
begin
Result:= True;
CheckRandoms;
end else
begin
if (FishingAtSpot) and (UseFishingSpotChecker) then
begin
for I:= 0 to 2 do
begin
case I of
0: A:= 240;
1: A:= 235;
2: A:= 345;
end;
MMouse(A,225,5,5)
Wait(200+random(300))
if IsUpText(Fish_UpText) then
begin
GetMousePos(A,B)
Mouse(A,B,0,0,false)
Wait(200+random(300))
if ChooseOption(Fish_Option) then
begin
Result:= True;
SBF:= True;
Break;
end;
end;
end;
end;
end;
if (not (SBF)) then
begin
SBF:= False;
A:= A;
B:= B;
Result:= False;
CheckRandoms;
Wait(1000+random(1000))
if FishCount > I then
begin
Result:= True;
end;
end;
end;
Procedure SetupSharkFishing(SetDTM: Boolean);
var FishLevel: Integer;
begin
Writeln('Setting up for Shark-Fishing')
FishLevel:= UserStats[CurrentPlayer].FishLevel;
if FishLevel >= 76 then
begin
if SetDTM then
begin
Equip:= Harpoon;
Fish:= Shark;
Fish2:= -1;
end;
Fish_UpText:= 'et'
Fish_Option:= 'arpoon'
FishStr:= 'Shark'
if Players[CurrentPlayer].Booleans[0] then
begin
if FishLevel >= 96 then EquipStr:= 'Barehanded'
else EquipStr:= 'Harpoon';
end else EquipStr:= 'Harpoon';
UserStats[CurrentPlayer].FishStr:= FishStr;
Exit;
end;
end;
Procedure SetupSwordfishFishing(SetDTM: Boolean);
var FishLevel: Integer;
begin
Writeln('Setting up for Swordfish-Fishing')
FishLevel:= UserStats[CurrentPlayer].FishLevel;
if FishLevel >= 50 then
begin
if SetDTM then
begin
Equip:= Harpoon;
Fish:= Swordfish;
Fish2:= Tuna;
end;
Fish_UpText:= 'age'
Fish_Option:= 'arpoon'
FishStr:= 'Swordfish'
if Players[CurrentPlayer].Booleans[0] then
begin
if FishLevel >= 70 then EquipStr:= 'Barehanded'
else EquipStr:= 'Harpoon';
end else EquipStr:= 'Harpoon';
UserStats[CurrentPlayer].FishStr:= FishStr;
Exit;
end;
end;
Procedure SetupTunaFishing(SetDTM: Boolean);
var FishLevel: Integer;
begin
Writeln('Setting up for Tuna-Fishing')
FishLevel:= UserStats[CurrentPlayer].FishLevel;
if FishLevel >= 35 then
begin
if SetDTM then
begin
Equip:= Harpoon;
Fish:= Swordfish;
Fish2:= Tuna;
end;
Fish_UpText:= 'age'
Fish_Option:= 'arpoon'
FishStr:= 'Tuna'
if Players[CurrentPlayer].Booleans[0] then
begin
if FishLevel >= 55 then EquipStr:= 'Barehanded'
else EquipStr:= 'Harpoon';
end else EquipStr:= 'Harpoon';
UserStats[CurrentPlayer].FishStr:= FishStr;
Exit;
end;
end;
Procedure SetupLobsterFishing(SetDTM: Boolean);
var FishLevel: Integer;
begin
Writeln('Setting up for Lobster-Fishing')
FishLevel:= UserStats[CurrentPlayer].FishLevel;
if FishLevel >= 40 then
begin
if SetDTM then
begin
Equip:= Cage;
Fish:= Lobster;
Fish2:= -1;
end;
Fish_UpText:= 'age'
Fish_Option:= 'age'
FishStr:= 'Lobster'
EquipStr:= 'Cage';
UserStats[CurrentPlayer].FishStr:= FishStr;
Exit;
end;
end;
Procedure SetupBigNetFishing(SetDTM: Boolean);
var FishLevel: Integer;
begin
Writeln('Setting up for Big Net-Fishing')
FishLevel:= UserStats[CurrentPlayer].FishLevel;
if FishLevel >= 16 then
begin
if SetDTM then
begin
Equip:= BigNet;
Fish:= Mackerel;
Fish2:= -1;
end;
Fish_UpText:= 'et'
Fish_Option:= 'et'
FishStr:= 'Mackerel'
EquipStr:= 'Big Net';
UserStats[CurrentPlayer].FishStr:= FishStr;
Exit;
end;
end;
Procedure SetFishingStuff(SetDTM: Boolean);
var FishLevel: Integer;
begin
FishLevel:= UserStats[CurrentPlayer].FishLevel;
Case LowerCase(Players[CurrentPlayer].Strings[0]) of
'auto':
begin
if (FishLevel<16) then
begin
Writeln('Player '+IntToStr(CurrentPlayer)+' has too low fishing')
EndPlayer(False,'Too low fishing')
Exit;
end;
if (FishLevel>=16) and (FishLevel<35) then SetupBigNetFishing(SetDTM);
if (FishLevel>=35) and (Fishlevel<40) then SetupTunaFishing(SetDTM);
if (FishLevel>=40) and (FishLevel<50) then SetupLobsterFishing(SetDTM);
if (FishLevel>=50) and (Fishlevel<76) then SetupSwordfishFishing(SetDTM);
if (FishLevel>=76) then SetupSharkFishing(SetDTM)
end;
'shark','sharks':
begin
if FishLevel >= 76 then
begin
SetupSharkFishing(SetDTM);
end;
end;
'swordfish':
begin
if FishLevel >= 50 then
begin
SetupSwordfishFishing(SetDTM)
end;
end;
'tuna','tunas':
begin
if FishLevel >= 35 then
begin
SetupTunaFishing(SetDTM)
end;
end;
'lobster','lobsters':
begin
if FishLevel >= 40 then
begin
SetupLobsterFishing(SetDTM);
end;
end;
'big net':
begin
if FishLevel >= 16 then
begin
SetupBigNetFishing(SetDTM)
end;
end;
else
begin
Writeln('Player '+IntToStr(CurrentPlayer)+'s Strings[0] was set up wrong. Logging out...')
EndPlayer(False,'Wrong setup')
end;
end;
end;
Procedure ChangeEq;
var Es: String;
begin
Es:= EquipStr;
SetFishingStuff(False)
if not (Es = EquipStr) then
begin
SetFishingStuff(True)
OpenCathyBank;
ChangeToNewEq(Es);
end;
end;
Procedure AutoRetaliateTo(SetTo: Boolean);
var
B: Boolean;
begin
GameTab(1)
Wait(200+random(300))
B:= (GetColor(705,389)=1711220);
if not(SetTo = B) then Mouse(573,361,140,36,true)
end;
Procedure MySetChat(Chat: Integer; SetTo: String);
var A,b,Col: Integer;
begin
Case LowerCase(SetTo) of
'on': Col:= 65280;
'off': Col:= 252;
'friends': Col:= 65535;
'hide': Col:= 16776960;
end;
if (Chat > 5) or (Chat < 1) then Exit;
if not FindColorTolerance(a,b,Col,123+((Chat-1)*54),483,123+(Chat*54),495,4) then
begin
Mouse(123+((Chat-1)*54),483,40,12,false)
Wait(200+random(300))
ChooseOption(Capitalize(LowerCase(SetTo)))
end;
end;
Procedure SetupPlayer;
var CSign: String;
begin
if (Not LoggedIn) then Exit;
ActivateClient;
Writeln('Setting up '+Players[CurrentPlayer].name)
MarkTime(CurrentPlayerTime)
UserStats[CurrentPlayer].FishLevel:= GetSkillInfo('Fishing',true);
MakeCompass('N')
HighestAngle;
FishSpotChecks:= 0;
SetFishingStuff(True);
if (not GotEquip) and (not (EquipStr = 'Barehanded')) then
begin
OpenCathyBank;
BankToTop;
GetNewEq;
CloseWindow;
end;
if (GetMMLevels('Run',CSign) >= 20) then SetRun(True);
AutoRetaliateTo(False)
MySetChat(1,'On')
MySetChat(2,'Off')
MySetChat(3,'Off')
MySetChat(4,'On')
MySetChat(5,'Off')
end;
Function PlayersActive: Integer;
var I: Integer;
begin
for I:= 0 to HowManyPlayers-1 do
begin
if Players[I].Active then Result:= Result + 1;
end;
end;
Procedure Relog;
var T,Tr,I,M: Integer;
begin
case random(5) of
0: T:= 20000;
1: T:= 30000;
2: T:= 60000;
3: T:= 120000;
4: T:= 300000;
end;
Tr:= Random(T);
M:= (Tr+T) mod 1000;
Writeln(IntToStr((T+Tr)/1000)+' seconds until log-in')
for I:= (Tr+T)/1000 downto 1 do
begin
Status(IntToStr(I)+' seconds until log-in')
if (I > 1) then Wait(1000)
end;
Wait(1000+M)
Status('-Logging in-')
end;
Procedure WriteProggy(Text: String);
begin
if ProggyInReport then AddToReport(Text)
else Writeln(Text)
end;
Procedure Proggy;
var H,H2,M,M2,S,S2,I: Integer;
begin
SRLRandomsReport;
AddToReport('')
ConvertTime(GetTimeRunning,H,M,S)
WriteProggy('^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^')
WriteProggy('|| Catherby Sharks N'' Lobbies ||')
WriteProggy('=================================')
WriteProggy('-Total Runtime: '+IntToStr(H)+' hours, '+IntToStr(M)+' minutes and '+IntToStr(S)+' seconds')
WriteProggy('-Total Banktrips: '+IntToStr(Loads))
WriteProggy('-Total Fished: '+IntToStr(Fished+FishCount+CountInvDTM(Fish2))+' Fish')
WriteProggy(' -Including-')
if UserStats[CurrentPlayer].FishStr = 'Shark' then
begin
WriteProggy(' '+IntToStr(SharksFished+FishCount)+' Sharks')
WriteProggy(' '+IntToStr(SwordfishFished)+' Swordfish')
WriteProggy(' '+IntToStr(TunaFished)+' Tuna')
WriteProggy(' '+IntToStr(LobstersFished)+' Lobsters')
WriteProggy(' '+IntToStr(MackerelFished)+' Mackerel')
end;
if UserStats[CurrentPlayer].FishStr = 'Swordfish' then
begin
WriteProggy(' '+IntToStr(SharksFished)+' Sharks')
WriteProggy(' '+IntToStr(SwordfishFished+FishCount)+' Swordfish')
WriteProggy(' '+IntToStr(TunaFished+CountInvDTM(Fish2))+' Tuna')
WriteProggy(' '+IntToStr(LobstersFished)+' Lobsters')
WriteProggy(' '+IntToStr(MackerelFished)+' Mackerel')
end;
if UserStats[CurrentPlayer].FishStr = 'Tuna' then
begin
WriteProggy(' '+IntToStr(SharksFished)+' Sharks')
WriteProggy(' '+IntToStr(SwordfishFished+FishCount)+' Swordfish')
WriteProggy(' '+IntToStr(TunaFished+CountInvDTM(Fish2))+' Tuna')
WriteProggy(' '+IntToStr(LobstersFished)+' Lobsters')
WriteProggy(' '+IntToStr(MackerelFished)+' Mackarel')
end;
if UserStats[CurrentPlayer].FishStr = 'Lobster' then
begin
WriteProggy(' '+IntToStr(SharksFished)+' Sharks')
WriteProggy(' '+IntToStr(SwordfishFished)+' Swordfish')
WriteProggy(' '+IntToStr(TunaFished)+' Tuna')
WriteProggy(' '+IntToStr(LobstersFished+FishCount)+' Lobsters')
WriteProggy(' '+IntToStr(MackerelFished)+' Mackarel')
end;
if UserStats[CurrentPlayer].FishStr = 'Mackerel' then
begin
WriteProggy(' '+IntToStr(SharksFished)+' Sharks')
WriteProggy(' '+IntToStr(SwordfishFished)+' Swordfish')
WriteProggy(' '+IntToStr(TunaFished)+' Tuna')
WriteProggy(' '+IntToStr(LobstersFished)+' Lobsters')
WriteProggy(' '+IntToStr(MackerelFished+FishCount)+' Mackarel')
end;
WriteProggy('-----')
for I:= 0 to HowManyPlayers-1 do
begin
if I = CurrentPlayer then
begin
ConvertTime(TimeFromMark(CurrentPlayerTime),H,M,S)
ConvertTime(UserStats[I].Time,H2,M2,S2)
WriteProggy('P-'+IntToStr(I)+'(Current)= Active: '+BoolToStr(Players[I].Active)+'||F: '+IntToStr(UserStats[I].Fished+CountInvDTM(Fish)+CountInvDTM(Fish2))+'||B : '+IntToStr(UserStats[I].Loads)+ '||Loc: '+Players[CurrentPlayer].Loc+'||T: '+IntToStr((H*60+M)+(H2*60+M2))+' mins')
end else
begin
ConvertTime(UserStats[I].Time,H,M,S)
WriteProggy('P-'+IntToStr(I)+'= Active: '+BoolToStr(Players[I].Active)+'||F: '+IntToStr(UserStats[I].Fished)+'||B: '+IntToStr(UserStats[I].Loads)+ '||Loc: '+Players[CurrentPlayer].Loc+'||T: '+IntToStr(H*60+M)+' mins')
end;
end;
WriteProggy('=================================')
end;
begin
ClearDebug;
ClearReport;
if ProggyInReport then ChangeReportWidth(450);
case Random(10) of
0: Disguise('Google');
1: Disguise('iTunes');
2: Disguise('Ventrilo');
3: Disguise('Windows Media Player');
4: Disguise('AVG Anti-Virus');
5: Disguise('Norton Anti-Virus'); // Or as R0b0t1 would've said: "Norton is the virus".
6: Disguise('YouTube - Broadcast Yourself');
7: Disguise('Yahoo!');
8: Disguise('MySpace');
9: Disguise('Windows Live Messenger');
10: Disguise('I AM A BIG FAT CHEATER BAN ME TY!'); // Just a joke :P Can't be executed anyway
end;
if SCARToTray then MoveToTray;
SetupSRL;
ScriptID:= '492';
if LoggedIn then LogOut;
DeclarePlayers;
SRLID:= SRL_Stats_ID;
SRLPassword:= SRL_Stats_Password;
DeclareDTMs;
PlayerNum:= 1;
repeat
LoginPlayer;
SetupPlayer;
repeat
MarkTime(ProgTimer)
BankToFish;
GetFishingSpot;
MarkTime(LoadTime)
Proggy;
repeat
if not IsFishing then
begin
CheckRandoms;
GetFishingSpot;
end;
if not LoggedIn and (Players[CurrentPlayer].Active) then
begin
LoginPlayer;
end;
if TimeFromMark(ProgTimer) > 40000 then
begin
Proggy;
MarkTime(ProgTimer)
end;
until(InvCount = 28) or (TimeFromMark(LoadTime) >= (Players[CurrentPlayer].Integers[2]*1000))
if InvCount = 28 then Writeln('Full load. Banking...')
else Writeln('Took too long to get full load. Banking...');
FishToBank;
OpenCathyBank;
Writeln('Fished this load: '+IntToStr(FishCount+CountInvDTM(Fish2)))
Fished:= Fished + FishCount + CountInvDTM(Fish2);
Writeln('Banking '+IntToStr(FishCount)+' SF and '+IntToStr(CountInvDTM(Fish2))+' tuna')
AddToReport('Tuna fished == '+IntToStr(TunaFished))
Case UserStats[CurrentPlayer].FishStr of
'Mackerel': MackerelFished:= MackerelFished + FishCount;
'Lobster': LobstersFished:= LobstersFished + FishCount;
'Tuna','Swordfish':
begin
TunaFished:= TunaFished + CountInvDTM(Fish2)
SwordfishFished:= SwordfishFished + FishCount;
end;
'Shark': SharksFished:= SharksFished + FishCount;
end;
IncEx(UserStats[CurrentPlayer].Fished,FishCount+CountInvDTM(Fish2))
Case UserStats[CurrentPlayer].FishStr of
'Mackerel': ReportVars[5]:= ReportVars[5] + FishCount;
'Lobster': ReportVars[1]:= ReportVars[1] + FishCount;
'Tuna','Swordfish':
begin
ReportVars[4]:= ReportVars[4] + CountInvDTM(Fish2)
ReportVars[3]:= ReportVars[3] + FishCount;
end;
'Shark': ReportVars[2]:= ReportVars[2] + FishCount;
end;
DepositItems;
ChangeEq;
SRLRandomsReport;
Proggy;
if Not LoggedIn then
begin
if PlayersActive = 0 then Break
else NextPlayer(False)
end;
until((UserStats[CurrentPlayer].Loads mod Players[CurrentPlayer].Integers[0])=0)
PlayerNum:= PlayerNum + 1;
if StopWhenLoadsDone then
begin
if PlayerNum >= HowManyPlayers then Break;
end;
if PlayersActive > 0 then
begin
if (HowManyPlayers=1) then
begin
Writeln('Performing Relog')
repeat
LogOut;
until(Not LoggedIn)
UserStats[CurrentPlayer].Time:= UserStats[CurrentPlayer].Time + TimeFromMark(CurrentPlayerTime);
Relog;
end else NextPlayer(True)
end;
Proggy;
until(PlayersActive = 0)
SRLRandomsReport;
Proggy;
end.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.