Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program HarpoonSupplier;
- {$DEFINE SMART}
- {$i SRL/SRL.simba}
- var
- StartDTM : Integer;
- const
- SRLStats_Username = '';
- SRLStats_Password = '';
- Server = 0;
- Debug = True;
- Version = 1.0;
- procedure DeclarePlayers;
- begin
- HowManyPlayers := 1;
- NumberOfPlayers(HowManyPlayers);
- CurrentPlayer := 0;
- Players[0].Name := '';
- Players[0].Pass := '';
- Players[0].Nick := '';
- Players[0].Pin := '';
- Players[0].Active := True;
- end;
- procedure DebugSupplier(message: String);
- begin
- if (Debug) then
- WriteLn('[DEBUG]: ' + message);
- end;
- procedure LoadSDTMs;
- begin
- StartDTM := DTMFromString('mlwAAAHicY2dgYEhnZmCwBmIbIM4G4hogrgDiQCCeCZQvBOI9QLyJAcLPBOIYIP7//z9DpL8xQ1FpIxhH28uCcWiQP8N/oDw/DsyIB0MBADQyEO0=');
- end;
- procedure FreeSDTMs;
- begin
- FreeDTM(StartDTM);
- end;
- procedure SetupSupplier;
- var
- x, y : Integer;
- tmp : Extended;
- begin
- Smart_Server := Server;
- Smart_Signed := True;
- SetupSRL;
- SetupSRLStats(575, SRLStats_Username, SRLStats_Password);
- DeclarePlayers;
- ClearDebug;
- LoadSDTMs;
- if (not(LoggedIn)) then
- LoginPlayer;
- Wait(3000);
- DebugSupplier('Waiting 3 seconds.');
- // TODO: Shorten up this crap.
- if (FindDTMRotated(StartDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, tmp)) then
- begin
- DebugSupplier('Correct starting location.');
- end else
- begin
- DebugSupplier('Invalid starting location.');
- end;
- FreeSDTMs;
- end;
- procedure RestPlayer;
- begin
- if (not(LoggedIn)) then
- Exit;
- FindNormalRandoms;
- DidRedClick;
- if (not(RunEnergy(30 + Random(20)))) then
- begin
- SetRest;
- RestUntil(70 + Random(25));
- end;
- end;
- function OpenBankScreen: Boolean;
- begin
- // Banking stuff.
- Result := WaitFunc(@BankScreen, 10 + Random(5), 4000);
- end;
- procedure HandleDoor;
- var
- DoorTPA : TPointArray;
- DoorPoint : Tpoint;
- x, y, i : Integer;
- begin
- if (FindColorsTolerance(DoorTPA, 2110521, MSX1, MSY1, MSX2, MSY2, 10)) then
- begin
- if (Length(DoorTPA) = 0) then FindColorsTolerance(DoorTPA, 2308414, MSX1, MSY1, MSX2, MSY2, 10);
- for i := 0 to High(DoorTPA) do
- begin
- DoorPoint := DoorTPA[i];
- MMouse(DoorPoint.x, DoorPoint.y, 2, 2);
- if (IsUpTextMultiCustom(['pen', 'Open'])) then
- begin
- GetMousePos(x, y);
- Mouse(x, y, 1, 1, False);
- ChooseOption('pen');
- Wait(500 + Random(350));
- Exit;
- end;
- end;
- end;
- end;
- function Walk_Shop: Boolean;
- var
- ShopPath : TIntegerArray;
- tmp : Extended;
- i, h, x, y, DoorDTM : Integer;
- begin
- {SetLength(ShopPath, 3);
- ShopPath[0] := DTMFromString('mlwAAAHicY2dgYNBmZmCwAmInIA4G4lAgjgTicCC+AJRfA8SfgPgVEO8C4gkMEPEweymGsEADhpzSWjB2txRk8A/0AdP/gfL8ODAjHgwFAKQrDz4=');
- ShopPath[1] := DTMFromString('mggAAAHicY2NgYNjNzMBwBIivAfFzIL4OxGuB+CFQbj4QnwDiF0D8HYhXA3FinDaDf6APg7ulIENOaS1DmL0UQ2maCcN/oBw/FsyIA0MAAKFBEH4=');
- ShopPath[2] := DTMFromString('mlwAAAHicY2dgYPBkZmAwA+IcIPYDYn8gngHEwUD8GSj/AYh/APFNIGZnZGB4BaSXA3FgaCBDZKIug4eNKENtvg2Yn1fZxJAeY8TwHyjPjwMz4sFQAAAAlBAx');
- h := High(ShopPath);
- for i := 0 to h do
- if (FindDTMRotated(ShopPath[i], x, y, MMX1, MMY1, MMX2, MMY2, -Pi/2.0, Pi/2.0, Pi/8, tmp)) then
- begin
- MouseFlag(x, y, 2, 2, 2);
- DebugSupplier('Walking...');
- end else
- Exit;
- Result := True;
- for i := 0 to h do
- FreeDTM(ShopPath[i]);} // Commented out for testing purposes.
- SetAngle(SRL_ANGLE_HIGH);
- MakeCompass('S');
- HandleDoor;
- end;
- procedure Walk_Bank;
- begin
- end;
- begin
- SetupSupplier;
- Walk_Shop;
- end.
Add Comment
Please, Sign In to add comment