jannu22
01-14-2012, 08:05 PM
I got following error when trying to compile: "Semicolon (';') expected at line 54".
Compiling failed.
program Miner;
{$DEFINE SRL5}
{$Define Smart}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
TempCTS, C, HiNPC, II, I :Integer;
x, y: integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 87;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;
procedure Antiban;
begin
case Random(100) of
10: BoredHuman;
20: HoverSkill('random', False);
30: HoverSkill('mining', False);
40: PickUpMouse;
50: RandomRClick;
60: RandomMovement;
70: SleepAndMoveMouse(200 + Random(50));
90: ExamineInv;
end;
end;
Procedure WalkToMine
Var
ToMine1:TPointArray;
ToMine2:TPointArray;
begin
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE,['9_8','10_8','10_7',']);
ToMine1 := [Point(3888, 3230), Point(3897, 3201), Point(3925, 3207), Point(3956, 3224), Point(3986, 3216), Point(4009, 3208), Point(4008, 3183), Point(4027, 3176), Point(4068, 3172), Point(4079, 3162), Point(4079, 3144)];
SPS_WalkPath(ToMine1);
if FindObj(x, y, 'tairs', 3428957, 1) then
Mouse(x, y, 0, 0, false);
ChooseOption('tairs');
Wait(RandomRange(200, 300))
SPS_Setup(RUNESCAPE_SURFACE,['1_0','0_0',']);
ToMine2 := [Point(411, 350), Point(385, 338), Point(354, 343), Point(344, 355)];
SPS_WalkPath(ToMine2);
end;
Procedure WalkToBank
var
ToBank1:TPointArray;
ToBank2:TPointArray;
begin
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE,['1_0','0_0',']);
ToBank1 := [Point(347, 351), Point(372, 344), Point(406, 348), Point(420, 349)];
SPS_WalkPath(ToBank1);
if FindObj(x, y, 'tairs', 3231321, 1) then
Mouse(x, y, 0, 0, false);
ChooseOption('tairs');
Wait(RandomRange(200, 300))
SPS_Setup(RUNESCAPE_SURFACE,['10_7','10_8','9_8',']);
ToBank2 := [Point(4078, 3168), Point(4040, 3179), Point(4011, 3184), Point(4010, 3213), Point(3978, 3221), Point(3944, 3217), Point(3901, 3203), Point(3892, 3233)];
end;
Procedure Banking
var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
TempCTS, C, HiNPC, II, I :Integer;
begin
Result := False;
Result := (BankScreen) or (PinScreen);
If Result then Exit;
NPCArray := GetMinimapDots('NPC');
HiNPC := High(NPCArray);
If Length(NPCArray) = 0 then Exit;
SortTPAFrom(NPCArray, Point(MMCX, MMCY));
for I := 0 to HiNPC do
begin
NPCPoint := MMToMS(NPCArray[I])
If NPCPoint = Point(-1, -1) then Continue;
NPCBox := IntToBox(NPCPoint.X - 40, NPCPoint.Y - 40, NPCPoint.X + 40, NPCPoint.Y + 40)
If PixelShift(NPCBox, 200) > 500 then Continue;
TempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 1.52);
FindColorsTolerance(Colors, 6067652, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 13);
ATPA := TPAToATPAEx(Colors, 15, 20);
SortATPASize(ATPA, True);
for II := 0 to High(ATPA) do
begin
MSNPC := MiddleTPA(ATPA[II]);
MMouse(MSNPC.X, MSNPC.Y, 3, 3);
If WaitUpTextMulti(['ooth', 'anker'], 200) then
begin
Mouse(MSNPC.X, MSNPC.Y, 1, 1, False);
If WaitOptionMulti(['ank B', 'quick'], 300) then
MarkTime(c);
Repeat
Wait(RandomRange(50, 100));
Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
If Result then
begin
ColorToleranceSpeed(TempCTS);
DepositAll;
CloseBank;
exit;
end
end;
end;
end;
end;
Procedure Mining
begin
repeat
if FindObj(x, y, 'ocks', 2964840, 1) or FindObj (x,y, 'ocks',3425912,1)then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('ew');
end;
repeat
AntiBan;
Until not IsUpText('ocks') or (InvFull);
Until (InvFull)
writeLn('Going To Bank');
end;
begin
ClearDebug;
SetupLogin;
SetupSRL;
DeclarePlayers;
ActivateClient;
repeat
WalkToMine;
Mining
WalkToBank;
Banking;
until(false);
end.
Compiling failed.
program Miner;
{$DEFINE SRL5}
{$Define Smart}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
TempCTS, C, HiNPC, II, I :Integer;
x, y: integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 87;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;
procedure Antiban;
begin
case Random(100) of
10: BoredHuman;
20: HoverSkill('random', False);
30: HoverSkill('mining', False);
40: PickUpMouse;
50: RandomRClick;
60: RandomMovement;
70: SleepAndMoveMouse(200 + Random(50));
90: ExamineInv;
end;
end;
Procedure WalkToMine
Var
ToMine1:TPointArray;
ToMine2:TPointArray;
begin
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE,['9_8','10_8','10_7',']);
ToMine1 := [Point(3888, 3230), Point(3897, 3201), Point(3925, 3207), Point(3956, 3224), Point(3986, 3216), Point(4009, 3208), Point(4008, 3183), Point(4027, 3176), Point(4068, 3172), Point(4079, 3162), Point(4079, 3144)];
SPS_WalkPath(ToMine1);
if FindObj(x, y, 'tairs', 3428957, 1) then
Mouse(x, y, 0, 0, false);
ChooseOption('tairs');
Wait(RandomRange(200, 300))
SPS_Setup(RUNESCAPE_SURFACE,['1_0','0_0',']);
ToMine2 := [Point(411, 350), Point(385, 338), Point(354, 343), Point(344, 355)];
SPS_WalkPath(ToMine2);
end;
Procedure WalkToBank
var
ToBank1:TPointArray;
ToBank2:TPointArray;
begin
ClickNorth(SRL_ANGLE_HIGH);
SPS_Setup(RUNESCAPE_SURFACE,['1_0','0_0',']);
ToBank1 := [Point(347, 351), Point(372, 344), Point(406, 348), Point(420, 349)];
SPS_WalkPath(ToBank1);
if FindObj(x, y, 'tairs', 3231321, 1) then
Mouse(x, y, 0, 0, false);
ChooseOption('tairs');
Wait(RandomRange(200, 300))
SPS_Setup(RUNESCAPE_SURFACE,['10_7','10_8','9_8',']);
ToBank2 := [Point(4078, 3168), Point(4040, 3179), Point(4011, 3184), Point(4010, 3213), Point(3978, 3221), Point(3944, 3217), Point(3901, 3203), Point(3892, 3233)];
end;
Procedure Banking
var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
TempCTS, C, HiNPC, II, I :Integer;
begin
Result := False;
Result := (BankScreen) or (PinScreen);
If Result then Exit;
NPCArray := GetMinimapDots('NPC');
HiNPC := High(NPCArray);
If Length(NPCArray) = 0 then Exit;
SortTPAFrom(NPCArray, Point(MMCX, MMCY));
for I := 0 to HiNPC do
begin
NPCPoint := MMToMS(NPCArray[I])
If NPCPoint = Point(-1, -1) then Continue;
NPCBox := IntToBox(NPCPoint.X - 40, NPCPoint.Y - 40, NPCPoint.X + 40, NPCPoint.Y + 40)
If PixelShift(NPCBox, 200) > 500 then Continue;
TempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 1.52);
FindColorsTolerance(Colors, 6067652, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 13);
ATPA := TPAToATPAEx(Colors, 15, 20);
SortATPASize(ATPA, True);
for II := 0 to High(ATPA) do
begin
MSNPC := MiddleTPA(ATPA[II]);
MMouse(MSNPC.X, MSNPC.Y, 3, 3);
If WaitUpTextMulti(['ooth', 'anker'], 200) then
begin
Mouse(MSNPC.X, MSNPC.Y, 1, 1, False);
If WaitOptionMulti(['ank B', 'quick'], 300) then
MarkTime(c);
Repeat
Wait(RandomRange(50, 100));
Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
If Result then
begin
ColorToleranceSpeed(TempCTS);
DepositAll;
CloseBank;
exit;
end
end;
end;
end;
end;
Procedure Mining
begin
repeat
if FindObj(x, y, 'ocks', 2964840, 1) or FindObj (x,y, 'ocks',3425912,1)then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('ew');
end;
repeat
AntiBan;
Until not IsUpText('ocks') or (InvFull);
Until (InvFull)
writeLn('Going To Bank');
end;
begin
ClearDebug;
SetupLogin;
SetupSRL;
DeclarePlayers;
ActivateClient;
repeat
WalkToMine;
Mining
WalkToBank;
Banking;
until(false);
end.