SRL Archive - OSR Help

Run this, please


RISK

2011-12-22 08:29:29

Stand at Al-Kharid bank and please tell me if this walks you to the tanning shop and back properly.

program new;
{$DEFINE SMART}
{$i SRL/SRL.scar}
{$i SPS/SPS.simba}

const
WORLD = 35;
MEMBERS = False;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';

Active := True;
end;
end;

(* Start of core functions *)
procedure Write(T: string);
begin
WriteLn(TheTime + ': ' + PadR(T, 12));
end;

procedure SetCTS(Hue, Saturation: Extended);
begin
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hue, Saturation);
end;

procedure RevertCTS;
begin
SetColorSpeed2Modifiers(0.2, 0.2);
SetColorToleranceSpeed(1);
end;
(* End of core functions *)

(* Start of walking and position detection *)
function AtPosition(Position: string): Boolean;
var
P: TPoint;
begin
if (not(LoggedIn)) then
Exit;
FindNormalRandoms;

case Lowercase(Position) of
'bank' : P := Point(4888, 4032);
'shop' : P := Point(4919, 3859);
end;

Result := (SPS_PosOnMM(P));
end;

function WalkTo(Destination: string): Boolean;
var
Path: TPointArray;
begin
Result := False;

if (not(LoggedIn)) then
Exit;
FindNormalRandoms;

case Lowercase(Destination) of
'bank' : Path := [Point(4944, 3944), Point(4917, 3997)];
'shop' : Path := [Point(4943, 3962), Point(4940, 3900)];
end;

if (SPS_WalkPath(Path)) then
begin
while (IsMoving) do
begin
//AntiBan;
Wait(RandomRange(770, 1250));
end;

if (not(IsMoving)) then
Result := (AtPosition(Destination));
end;

if (Result) then
Write('We have walked to the ' + Destination + '.');
end;
(* End of walking and position detection *)

procedure MainLoop;
begin
end;

procedure Setup;
begin
SMART_Server := WORLD;
SMART_Members:= MEMBERS;

SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['12_9']);
DeclarePlayers;
LoginPlayer;
SetAngle(True);

if (WalkTo('shop')) then
if (WalkTo('bank')) then
Write('Success.');
end;

begin
Setup;
end.

Thank you in advance.

onilika

2011-12-22 08:50:14

I'm glad to say that it works :)
It runs from bank to the tanning shop, and after a few seconds returns to the bank!

~onilika

RISK

2011-12-22 08:57:23

Thank you for testing. For some reason it does not work for me.

+rep. :o

onilika

2011-12-22 09:26:13

How it doesn't? Worked fine for me o.o
That's weird…
You have it all updated? Safe mode? Newest Simba?

jakeyboy29

2011-12-22 09:59:55

http://runescape.wikia.com/wiki/Calculator:Crafting/Tanning

hmm, looks promising!

Hero

2011-12-22 13:26:49

@RISK when you try to run it on your end do you lag horribly or anything like that? Or does it just not run at all? I have an issue with SPS walking in a certain area myself and I was curious if to each his own lol

RISK

2011-12-24 13:36:13

@ onilika : Yeah, everything was updated properly. It finally worked after a while. I'm using a new walking method using SPS to look more human-like anyway now.

@ jakeyboy29 : :) Yeah, I'm going to release a members version and a lite version for the non-members. Just to try to preserve the prices of everything.

@ MrDerp :
It runs, but it will run off in to a different direction aimlessly until it finally stops about 4+ minimap lengths away from the shop for some reason.

SPS does not so much "Lag" but, here's my specs anyway:
i7-3930K CPU @ 3.20GHz
32gb of RAM,
Radeon 5870 (2gb)

cause

2011-12-25 21:27:01

About to compile, but one thing to consider is objectDTM walking by euphemism, very accurate walking with that.
EDIT: worked!