I have a new problem. I'm now getting an Identifier Expected error where the "end." is
SCAR Code:
program New;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
const {
'feb' (Falador East Bank)
'fwb' (Falador West Bank)
'veb' (Varrock East Bank)
'vwb' (Varrock West Bank)
'db' (Draynor Bank)
'akb' (Al-Kharid Bank) }
bankloc = 'vwb';
Procedure DeclarePlayers;
Begin
HowManyPlayers:= 1; // How many players are you using
CurrentPlayer:= 0; //
NumberOfPlayers(HowManyPlayers); //
Players[0].Name := ''; // Username.
Players[0].Pass := 'whoa forgot this'; // Password.
Players[0].Nick := ''; // 2-4 letters of Username (that are not capital letters or numbers).
Players[0].Active := True;
End;
var
timestarted:Integer;
Procedure WaitAndAntiban;
begin
case Random(30) of
0..20: wait(5000 + random(10000));
21: begin
randommovement;
MakeCompass('N');
SetAngle(true);
wait(random(5000));
end;
22,24: begin
GameTab(2 + random(10));
Wait(1000+random(5000));
GameTab(4);
wait(random(5000));
end;
23,25: SleepAndMoveMouse(1232+random(857));
26..30: begin
wait(random(5000));
HoverSkill('cooking', False);
wait(random(5000));
end;
end;
begin
SMARTSetupEx(133, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
Wait(100);
until (SmartGetColor(253, 233) <> 1118604);
SetUpSRL;
DeclarePlayers;
WriteLn('Logging in...');
LoginPlayer;
repeat
WriteLn('Opening bank...');
OpenBankFast(bankloc);
DepositAll;
FixBank;
FixBankTab;
WriteLn('Withdrawing 14 of column 1 row 1...');
Withdraw(1, 1, 14);
WriteLn('Withdrawing 14 of column 2 row 1...');
Withdraw(2, 1, 14);
CloseBank();
//Use items with eachother
MouseItem(1 + random(10), False);
ChooseOption('Use');
MouseItem(15 + random(10), True);
Mouse(235, 398, 50, 50, False); //Center of chat screen where the Make Item window is
ChooseOption('Make All');
MarkTime(timestarted);
repeat
WaitAndAntiban;
until (TimeFromMark(timestarted) > 17000);
until(not LoggedIn);
end.
Old first post for archival:
I'm trying to write a first script. I have this so far:
SCAR Code:
program New;
{.include srl/srl/misc/smart.scar}
{.include srl/srl/core/bank.scar}
{.include srl/srl.scar}
const {
'feb' (Falador East Bank)
'fwb' (Falador West Bank)
'veb' (Varrock East Bank)
'vwb' (Varrock West Bank)
'db' (Draynor Bank)
'akb' (Al-Kharid Bank) }
bankloc = 'vwb'
Procedure DeclarePlayers;
Begin
HowManyPlayers:= 1; // How many players are you using
CurrentPlayer:= 0; //
NumberOfPlayers(HowManyPlayers); //
Players[0].Name := 'srl'; // Username.
Players[0].Pass := 'srl'; // Password.
Players[0].Nick := 'srl'; // 2-4 letters of Username (that are not capital letters or numbers).
Players[0].Active := True;
End;
begin
end.
But since I included the bank include, i get this error when running:
Code:
Line 39: [Error] (148:11): Unknown identifier 'FindTextTPA' in script C:\Program Files\SCAR 3.20\includes\srl/srl/core/bank.scar
and line 39 of bank.scar is:
SCAR Code:
Result := FindTextTPA(4106994, 20, 20, 22, 400, 45, 'Bank', upchars, Nothing);