dallas574
2008-08-15 12:54:54
What is wrong with this script?
I get this error
Line 103: [Error] (301:31): Unknown identifier 'LoggedIn' in script C:\Program Files\SCAR 3.15b2\includes\SRL\SRL\Reflection\Core.Scar
I get this error
Line 103: [Error] (301:31): Unknown identifier 'LoggedIn' in script C:\Program Files\SCAR 3.15b2\includes\SRL\SRL\Reflection\Core.Scar
////////////////////////////////////////////////////////////////////////////////
///////////// Varrock East Oak Cut And Bank /////////////
///////////// Made by : Dallas574 /////////////
///////////// 1. Start in Varrock West Bank WITH the axe in the /////////////
///////////// first slot of your players inv. Fill in the /////////////
///////////// const and player forms and start script.... /////////////
////////////////////////////////////////////////////////////////////////////////
program VEOCB;
{.Include SRL\SRL\Reflection\Reflection.Scar}
{.Include SRL\SRL\Misc\Smart.Scar}
{.include SRL/SRL.Scar}
{.include SRL/SRL/Skill/Woodcutting.Scar}
Var
X, y, Chopped : Integer;
Banked : Integer;
Axe : String;
const
SRLStatsID = ''; // Your SRL Stats ID
SRLStatsPW = ''; // Your SRL Stats Password
VersionNow = '1'; // Do NOT change this!
Procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name := 'username'; //UserName
Players[0].Pass := 'password'; //Password
Players[0].Nick := 'ser'; //Nickname
Players[0].Active := True; //Active
Players[0].PIN := '0000';
Players[0].integers[0]:= 10; // Loads to do
WriteLn('Using ' +IntToStr(HowManyPlayers) + ' Players');
end;
procedure AntiRandoms;
begin
if (not (LoggedIn)) then
Exit;
FindNormalRandoms;
if (FindFight) then
RunAway('N', False, 1, 5000);
end;
function FindOakTree(var x, y: Integer; Color, Tolerance: Integer; Text: TStringArray) : Boolean;
var
OakP: TPoint;
OakTPA: TPointArray;
OakATPA: T2DPointArray;
CTS, i: Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
x := MSCX;
y := MSCY;
FindColorsSpiralTolerance(x, y, OakTPA, Color, MSX1, MSY1, MSX2, MSY2, Tolerance);
OakATPA := TPAtoATPAEx(OakTPA, 25, 25);
for i := 0 To Length(OakATPA)-1 do
begin
OakP := MiddleTPA(OakATPA[i]);
x := 0;
y := 0;
MMouse(OakP.x, OakP.y, 5, 5);
Wait(250);
if (IsUpTextMultiCustom(Text)) then
begin
x := OakP.x;
y := OakP.y;
Result := True;
Exit;
end
else
begin
Writeln('Current player failed to find an Oak tree.');
end;
end;
end;
procedure Search;
var
f, e : integer;
begin
if (not (LoggedIn)) then
Exit;
MMouse(645, -14, 1, 1)
MMouse(727, -10, 1, 1)
e := 5 + Random(6); //Of Almost Logout credits to Yakman :)
for f := 0 to e do
begin
case Random(3) of
1: MMouse(727 - Random(200), 90 + Random(200), 0, 0);
2: IdleTime(300 + Random(300), 500, 0.5);
end;
FTWait(500 + Random(750));
end;
end;
procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;
case (Random(57)) of
1: PickUpMouse;
4: GameTab(1 + Random(11));
12: Search;
17: MMouse(Random(MSX2), Random(MSY2), 15, 15);
21: begin
HoverSkill('Mining',false);
Gametab(4);
MMouse(Random(MSY1), Random(MSX1), 15, 15);
end;
28: begin
GameTab(1 + Random(13));
Wait(1000+ random(600));
Gametab(4);
end;
34: begin
HoverSkill('Woodcutting', False);
gametab(4);
end;
39: begin
case (Random(6)) of
1: Typesend('...');
2: Typesend('Yawn');
4: Typesend('bored');
5: Typesend('cut cut cut...');
6: Typesend('LoL');
end;
end;
end;
end;
function CheckAxe : Boolean;
begin
if (not (LoggedIn)) then
Exit;
MMouseItem(1);
Axe := 'No';
Wait(800+Random(200));
begin
if (IsUpText('ronze')) then
Axe := 'Bronze';
if (IsUpText('ron')) then
Axe := 'Iron';
if (IsUpText('eel')) then
Axe := 'Steel';
if (IsUpText('ith')) then
Axe := 'Mithril';
if (IsUpText('dam')) then
Axe := 'Addy';
if (IsUpText('une')) then
Axe := 'Rune';
end;
try;
Result := True;
WriteLn('Found ' +Axe+ ' Axe.');
Exit;
finally;
if (Axe = 'No') then
begin
WriteLn('Please Have An Axe In your Inventory!');
Result := False;
GetApplication.BringToFront;
TerminateScript;
end;
end;
end;
procedure WaitWhileChop;
var
IMark: Integer;
begin
MarkTime(IMark);
if (not (LoggedIn)) then
Exit;
repeat
FindEnt(x, y, True);
AntiRandoms;
if (InvFull) then
Break;
if (InvFull) then
Break;
AntiBan;
if (FindDead) then
Break;
until (TimeFromMark(IMark) >= (6500 + Random(8000))) or (InvFull);
end;
procedure ChopDownOak;
begin
if (not (LoggedIn)) then
Exit;
repeat
if (FindOakTree(x, y, 6398099, 10, ['ak', 'Oa', 'Oak'])) then
begin
case (Random(1)) of
0: Mouse(x, y, 1, 1, True);
1: begin
Mouse(x, y, 1, 1, False);
Wait(150 + Random(50));
ChooseOption('hop');
end;
end;
WaitWhileChop;
end;
until (InvFull);
Chopped := Chopped + 27;
end;
procedure RandomMovementX;
begin
if (not (LoggedIn)) then
Exit;
case (Random(15)) of
1: begin
MMouse(727 - Random(200), 90 + Random(200), 0, 0);
IdleTime(300 + Random(300), 500, 0.5);
end;
2: begin
MMouse(227 - Random(200), 290 + Random(200), 0, 0);
IdleTime(300 + Random(300), 500, 0.5);
end;
3: begin
GameTab(1+Random(14))
Wait(1200 + Random(750));
GameTab(4);
end;
4: Wait(2000+Random(200))
end;
end;
procedure WalkAntiBan;
begin
if (not (LoggedIn)) then
Exit;
AntiRandoms;
case (Random(10)) of
1: begin
case (Random(10)) of
0: TypeSend('stoopib walkin');
6: Typesend('...');
9: Typesend('wtf');
end;
Exit;
end;
3: begin
GameTab(1+Random(14))
Wait(500 + Random(250))
GameTab(4)
end;
5: MMouse(Random(MSCX), Random(MSCY), 600, 600);
7: RandomMovementX;
end;
end;
function SearchRoadColor: Integer; //ACA Credits - :)//
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
Wait(650 + Random(425));
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.38, 0.07);
FindColorsSpiralTolerance(MMCX, MMCY, arP, 7501948, MMX1, MMY1, MMX2, MMY2, 8);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 103) and (R <= 145) and (G >= 100) and (G <= 142) and (B >= 94) and (B <= 134) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 12.41) and (X <= 25.28) and (Y >= 13.06) and (Y <= 26.69) and (Z >= 12.67) and (Z <= 26.02) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = (arL + 1)) then
Writeln('AutoColor failed in finding the color.');
end;
function ToOaks: TPointArray;
begin
SetLength(oak, 2);
oak[0] := Point(2648, 3556);
oak[1] := Point(2661, 3556);
end;
function ToBank: TPointArray;
begin
SetLength(bank, 2);
bank[0] := Point(2650, 3556);
bank[1] := Point(2636, 3547);
end;
Procedure WalkToOak;
Var
I: Integer;
Path: TPointArray;
Begin
If Not Loggedin then Exit;
Path := ToOaks; //You know how Sum's Path maker returns a TPA?
for i := 0 to High(Path) do //For each Point in the TPA of the path do
WalkToTile(Path[i], 3, 0); //WalkToTile Path[The iteration), randomness, FFlag distance.
end;
Procedure WalkToBank;
Var
I: Integer;
Path: TPointArray;
Begin
If Not Loggedin then Exit;
Path := ToBank;
for i := 0 to High(Path) do
WalkToTile(Path[i], 3, 0);
end;
Procedure Bank;
begin
MakeCompass('N');
SetAngle(True);
OpenBankQuiet('veb');
Deposit(2,28,True)
Wait(800 + Random(200));
CloseBank;
Banked := Banked + 1;
end;
end;
end;
procedure Proggie;
begin
WriteLn('| =================================');
WriteLn('| Varrock East Chopper + Banker ');
WriteLn('| =================================');
WriteLn('| Dallas574 ');
WriteLn('|-----------------------------------');
WriteLn('|> Worked '+(TimeRunning));
WriteLn('|> Chopped '+IntToStr(Chopped)+' Logs! ');
WriteLn('|> Banked '+IntToStr(Banked)+' Loads! ');
WriteLn('| =================================');
WriteLn('Using ' +IntToStr(HowManyPlayers) + ' Players');
end;
begin
SmartSetup('world63', True, True, False);
SetTargetDC(SmartGetDC);
SetupSRL;
SetupReflection;
ActivateClient;
Wait(2000 + Random(500));
DeclarePlayers;
begin
if (not (LoggedIn)) then
LoginPlayer;
GetApplication.Minimize;
repeat
repeat
WalkToOak;
ChopDownOak;
Proggie;
WalkToBank;
Proggie;
until (Banked >= (Players[CurrentPlayer].Integers[0])) or (not (LoggedIn));
if (not (LoggedIn)) then
NextPlayer(False);
until (False);
end;
end.