Log in

View Full Version : Login.scar--Out of Range?



Skys Shadow
12-18-2006, 02:56 AM
Ok here is my script--{
~~~~~~~~~~Skys~~~~~~~~~~
~~~~~~~~~~~§§~~~~~~~~~~~
~~~~~~~~~Shadow~~~~~~~~~
~~~~~~~~~~~§§~~~~~~~~~~~
~~~~~~~~Presents~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~

~ The Skys Shadow Edgeville Yew Cutter!
~ Made by me, Skys Shadow.
~ Credits to all the SRL team for the wonderful SRL include.
~ Setup line 41 and 45-92


Instructions:
Setup Account
Stand in Edgeville bank in the southmost booth
Watch it once to make sure that all is well
Enjoy!

Update Info:
Alpha: Just cut and bank
Beta: Added Login
V 1.0: Added Antirandoms, Antiban, and fixed bugs
V 1.1: Took away WelcomeScreen include
V 1.2: Added Progress Report, changed some procedures
}


program Skys_Shadow_Edgeville_Yew_Cutter;

{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}
{.include SRL\SRL\extended\xAntiBan.scar}

var
Trips:integer;


///////Set Wieldaxe! Don't Touch Version #//////
const //
WieldAxe = 2; //1 for wielding, 2 for no //
VersionNumber = ' 1.2'; //Don't Touch! //
/////////////////////////////
Procedure DeclarePlayers; //
begin //
HowManyPlayers :=6; // Set Number of Players here. //
NumberOfPlayers(HowManyPlayers); // Leave alone //
CurrentPlayer:=0; // The blue # of the player wanted/
//
Players[0].Name :=''; // Your RS Name //
Players[0].Pass :=''; // Your RS Password //
Players[0].Nick :=''; // The first 3 lowercase letters of your name //
// eg. If your name is Zezima, put in ezi. //
Players[0].Loc :='Loc1'; //Not needed //
Players[0].Skill:=''; //Not needed //
Players[0].Active:=True; //Leave at true //
//
Players[1].Name :=''; //
Players[1].Pass :=''; //
Players[1].Nick :=''; //
Players[1].Loc :='Loc1'; //
Players[1].Skill:=''; //
Players[1].Active:=True; //
//
Players[2].Name :=''; //
Players[2].Pass :=''; //
Players[2].Nick :=''; //
Players[2].Loc :='Loc1'; //
Players[2].Skill:=''; //
Players[2].Active:=True; //
//
Players[3].Name :=''; //
Players[3].Pass :=''; //
Players[3].Nick :=''; //
Players[3].Loc :='Loc1'; //
Players[3].Skill:=''; //
Players[3].Active:=True; //
//
Players[4].Name :=''; //
Players[4].Pass :=''; //
Players[4].Nick :=''; //
Players[4].Loc :='Loc1'; //
Players[4].Skill:=''; //
Players[4].Active:=True; //
//
Players[5].Name :=''; //
Players[5].Pass :=''; //
Players[5].Nick :=''; //
Players[5].Loc :='Loc1'; //
Players[5].Skill:=''; //
Players[5].Active:=True; //
//
//
//
writeln(inttostr(HowManyPlayers)+' Players'); //
///////////////////////////////////////////////////////////////////////////
end;

function IsWelcomeScreen: Boolean;
begin
if(GetColor(271, 292) = 8356779)and
(GetColor(499, 292) = 8356779)and
(GetColor(271, 381) = 8356779)then
Result := True;
end;

procedure WelcomeScreen;
begin
if(not(IsWelcomeScreen))then Exit;
MouseBox(275, 296, 495, 377, 1);
end;
//-----------------------------------------------//

Procedure Setup;
begin
SetupSRL;
ActivateClient;
ChatsOff;
If (LoggedIn) then
begin
HighestAngle;
MakeCompass('n');
end;
If (not(LoggedIn)) then
LoginPlayer;
WelcomeScreen;
HighestAngle;
MakeCompass('n');
end;
//-----------------------------------------------//

Procedure ProgReport;
begin
ClearReport;
Writeln('===============================')
Writeln('= You Are Using =');
Writeln('= =');
Writeln('= The Skys Shadow Edgeville =');
Writeln('= =');
Writeln('= YEW CUTTER! =');
Writeln('= =');
WriteLn('= Version ' + VersionNumber + ' =');
Writeln('= =');
Writeln('= ' + inttostr(Trips) + ' Trips done =');
Writeln('= =');
Writeln('= Happy Cutting =');
Writeln('===============================');
end;
//-----------------------------------------------//

Procedure WalktoTrees;
begin
If (FindSymbol(x,y, 'rare trees')) then
begin
SetRun(true)
Mouse(x,y,1,1,true)
wait(10000)
end
If (not(FindSymbol(x,y, 'rare trees')))then
begin
SetRun(true)
Mouse(747,280,1,1,true)
wait(5000)
If (FindSymbol(x,y, 'rare trees')) then
begin
Mouse(x,y,1,1,true)
wait(10000)
end
end
end;

//-----------------------------------------------//

Procedure ChoptheTrees;
begin
repeat
if (FindMSColorTol(x,y,3438704,50))then
MMouse(x,y,1,1)
If IsUpText('Chop') then
Mouse(x,y,1,1,true)
wait(5000+Random(5000)+Random(5000)+Random(5000))
until (invfull = true)
if (invfull = true) then
Trips := Trips + 1;
end;
//-----------------------------------------------//

Procedure WalktoBank;
begin
If (FindSymbol(x,y,'bank'))then
begin
MMouse(x,y,1,1)
Mouse(x,y,1,1,true)
end
If (not(FindSymbol(x,y,'bank')))then
begin
Mouse(789,173,1,1,true)
wait(10000);
If (FindSymbol(x,y,'bank'))then
begin
MMouse(x,y,1,1)
Mouse(x,y,1,1,true)
end
end
end;
//-----------------------------------------------//

Procedure BanktheLogs;
begin
OpenBank;
If WieldAxe = 1 then
begin
DepositAll;
end
If WieldAxe = 2 then
begin
Deposit(2,28,2);
end
end;
//-----------------------------------------------//

Procedure AntiRandomsandAntiBan;
begin
SRLRandomsReport;
FindNormalRandoms;
FindAxeHeadColor;
AttachHead;
DontBanMe(2);
If (FindEnt (3438704)) then
begin
Logout;
Wait(30000)
LoginPlayer;
end
end;
//-----------------------------------------------//

begin
Setup;
repeat
ProgReport;
WalktoTrees;
ChoptheTrees;
WalktoBank;
BanktheLogs;
AntiRandomsandAntiBan;
until (false)
end.


And When I run it, It clicks the login button on the RS screen, then stops and it says Out of Range in Line 107 of Login.scar

Know why?

Dankness
12-18-2006, 03:15 AM
because u didnt setupsrl...

Skys Shadow
12-18-2006, 08:44 PM
ya i did...its in the setup procedure

and i found out that i didn't have declareplayers in my loop