Footy
08-07-2012, 06:58 PM
Im trying to get my script to walk from the tanner to the bank in al-kharid, but there are a few issues
1: When the script goes to click the second point, it clicks horribly off since my person is running
2: Script sometimes skips points and just stops walking in the middle of my path
3: Since script missclicks, it clicks behind the bankers, and gets stuck since the flag never leaves
http://i0.simplest-image-hosting.net/picture/untitled195.png#REMEMBER-TO-LINK-SIMPLEST-IMAGE-HOSTING.NET-WHEN-HOTLINKING
Any way to fix any of these errors? Heres the script so far, its unfinished, all it does so far is walk from the tanner to the bank, then open the bank.
program SPSS;
{$i srl/srl.simba}
{$i sps/sps.simba}
var
MyPath:TPointarray;
Counter, X, Y, Bankfails:Integer;
procedure getmyposition;
var
P: TPoint;
begin
P := SPS_GetMyPos;
writeln('Point'+ToStr(P));
end;
Function CustomBank:boolean;
begin
if Bankfails > 2 then
begin
writeln('We cant find the bank! Logging off!');
Logout;
Terminatescript;
end;
if findcolorspiraltolerance(x, y, 10801140, 148, 140, 190, 244, 10) then
begin
Mouse(x, y, 5, 5, mouse_right);
waitoption('Bank Bank', 1000);
Marktime(Counter);
repeat
wait(randomrange(100, 200));
if timefrommark(counter) > 10000 then
begin
writeln('We cant find the bank, Likely missclicked! We will try again.)');
inc(BankFails);
Result := False;
exit;
end;
until(Bankscreen);
Writeln('Bank sucessfully found!');
end else
begin
Writeln('We couldnt find the Bank! Color not found! We will try again!');
inc(bankfails);
Result := False;
Exit;
end;
Result := True;
Bankfails := 0
end;
Procedure Setupstuff;
begin
SetupSRL;
Activateclient;
wait(randomrange(100, 200));
SPS_Setup(RUNESCAPE_SURFACE,['12_10','12_9']);
myPath := [(Point(4943, 3947)), (Point(4935, 3983)), (Point(4923, 3971)), (Point(4911, 3991))];
end;
Procedure WalkingToBank;
begin
SPS_WalkPath(Mypath);
flagex(5, false);
wait(randomrange(50, 250));
end;
begin
Setupstuff;
WalkingToBank;
repeat
CustomBank;
until(BankScreen);
//getmyposition;
end.
1: When the script goes to click the second point, it clicks horribly off since my person is running
2: Script sometimes skips points and just stops walking in the middle of my path
3: Since script missclicks, it clicks behind the bankers, and gets stuck since the flag never leaves
http://i0.simplest-image-hosting.net/picture/untitled195.png#REMEMBER-TO-LINK-SIMPLEST-IMAGE-HOSTING.NET-WHEN-HOTLINKING
Any way to fix any of these errors? Heres the script so far, its unfinished, all it does so far is walk from the tanner to the bank, then open the bank.
program SPSS;
{$i srl/srl.simba}
{$i sps/sps.simba}
var
MyPath:TPointarray;
Counter, X, Y, Bankfails:Integer;
procedure getmyposition;
var
P: TPoint;
begin
P := SPS_GetMyPos;
writeln('Point'+ToStr(P));
end;
Function CustomBank:boolean;
begin
if Bankfails > 2 then
begin
writeln('We cant find the bank! Logging off!');
Logout;
Terminatescript;
end;
if findcolorspiraltolerance(x, y, 10801140, 148, 140, 190, 244, 10) then
begin
Mouse(x, y, 5, 5, mouse_right);
waitoption('Bank Bank', 1000);
Marktime(Counter);
repeat
wait(randomrange(100, 200));
if timefrommark(counter) > 10000 then
begin
writeln('We cant find the bank, Likely missclicked! We will try again.)');
inc(BankFails);
Result := False;
exit;
end;
until(Bankscreen);
Writeln('Bank sucessfully found!');
end else
begin
Writeln('We couldnt find the Bank! Color not found! We will try again!');
inc(bankfails);
Result := False;
Exit;
end;
Result := True;
Bankfails := 0
end;
Procedure Setupstuff;
begin
SetupSRL;
Activateclient;
wait(randomrange(100, 200));
SPS_Setup(RUNESCAPE_SURFACE,['12_10','12_9']);
myPath := [(Point(4943, 3947)), (Point(4935, 3983)), (Point(4923, 3971)), (Point(4911, 3991))];
end;
Procedure WalkingToBank;
begin
SPS_WalkPath(Mypath);
flagex(5, false);
wait(randomrange(50, 250));
end;
begin
Setupstuff;
WalkingToBank;
repeat
CustomBank;
until(BankScreen);
//getmyposition;
end.