Log in

View Full Version : [Error] (9:2): 'BEGIN' expected at line 8



slayer720
07-07-2012, 08:48 AM
hey does any one know whats the problem? what should i do i dont understand it says it expects 'begin' to be at line 8 so if any one knows a solution please post it. the error is at the title i used graperv2.0 laakerules it
could be found at runescape scripts,fighting this is the script:

program GrapePicker;
{$DEFINE SRL5}
{$DEFINE SMART}
{$i SRL/srl.simba}
{$i SRL/SRL/skill/fighting.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
{$i sps/sps.simba}
antileech (HERE IS THE ERROR)
/////////////////////////////////////
//start setup
///////////////////////////////////

const
RandAmount = 25;

antileech
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] Do
Begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
End;

End; antileech

///////////////////////////////////
///////////////////////////////////
///// end setup
///////////////////////////////////
///////////////////////////////////




procedure SetupChar;

begin

SetupSRL();
SetAngle(0);
ClickNorth(0);
end;


procedure MSI_RandomFKey;
var
i, randInt, randKey, currTab: Integer;
keys: array[0..4] of Word;
begin
currTab := GetCurrentTab(); // Get the current tab player is on

keys[0] := VK_F1;
keys[1] := VK_F2;
keys[2] := VK_F3;
keys[3] := VK_F4;
keys[4] := VK_F5;

randInt := Random(6);

case randInt of
0..4:
begin
KeyDown(keys[randInt]);
wait(35+random(85));
KeyUp(keys[randInt]);
end;

else
for i := 1 to 3 do
begin
randKey := Random(5);
KeyDown(keys[randKey]);
wait(35+random(85));
KeyUp(keys[randKey]);
end;
end;
wait(75+random(100));
GameTab(currTab); // Reset to starting tab
end;

//random antibans to use
procedure GAntiBan;
begin
writeln('Choosing random antiban');
case random(11) of
0 : begin
writeln('Random click selected');
RandomRClick;
end;
1 : begin
writeln('Random movement selected');
RandomMovement;
end;
2 : begin
writeln('Hover skill strength');
HoverSkill(skill_strength,false);
end;
3 : begin
writeln('Prayer tab selected');
GameTab(27);
Wait(randomrange(400,800));
end;
4 : begin
writeln('Random Angle selected');
end;
5 : begin
writeln('Random Fkey selected');
MSI_RandomFKey;
end;
6 : begin
writeln('Hover Skill (HP) selected');
HoverSkill(skill_hitpoints,false);
Wait(randomrange(300,600));
end;
7 : begin
writeln('Game Tab stats selected');
GameTab(23);
end;
8 : begin
writeln('Pickup Mouse selected');
PickUpMouse;
end;
9 : begin
writeln('Random wait selected');
Wait(randomrange(1000,2000));
end;
10 : begin
writeln('Hover Skill attack selected');
HoverSkill('attack',false);
end;
end;
Wait(randomrange(500,1000));
end;

Function GrapeFinder(Colors: TIntegerArray; TheUpText: TStringArray; midx, midy: integer): Boolean;
Var
T,i,X,Y,b: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
MarkTime(T);
Repeat
SetArrayLength(ATPA, Length(Colors));
for i := 0 to High(Colors) do
FindColorsSpiralTolerance(midx, midy, ATPA[i], Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
TPA := MergeATPA(ATPA);
ATPA := TPAtoATPAEx(TPA, 15, 15);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if (Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], x, y);

if (TimeFromMark(T) > 5000) then
Exit;

MMouse(x, y, 10, 10);
Wait(randomrange(100,150));
If(IsUpTextMultiCustom(TheUpText)) then
begin
ClickMouse2(False);
WaitOption('Grapes', 500);
if DidRedClick then
begin
Result := True;
Break;
end;
end;
Until(Result)
end;
Procedure ToBank;
begin
ClickNorth(0);
if ObjDTM_Walk('115:53:5:1:7:83:42:1:7:49:83:1:7:62:1 04:10:7:103:37:10:7:103:25', 0, 100, 80, True) then
begin

repeat
wait(100);
until(Not IsMoving);
end;
begin
ClickNorth(0);
if ObjDTM_Walk('79:53:11:1:7:49:67:10:7:69:62:10:7:70 :50:10:7:70:41:10:7:70:25:10:7:70:17:10:7:115:54:1 0:7:115:46:10:7:115:38:10:7:115:30:10:7:115:21', 0, 100, 80, True) then
begin

repeat
wait(100);
until(Not IsMoving);
end;
end;
end;

Procedure ToGaurds;
begin
ClickNorth(0);
if ObjDTM_Walk('53:111:11:0:7:83:40:10:7:71:92:10:7:7 0:71:10:7:70:63:10:7:70:55:10:7:70:47:10:7:115:75: 10:7:115:67:10:7:115:51:10:7:115:43:10:7:115:83', 0, 100, 80, True) then
begin

repeat
wait(100);
until(Not IsMoving);
end;
end;


Function FindNPC(Colors: TIntegerArray; TheUpText: TStringArray; midx, midy: integer): Boolean;
Var
T,i,X,Y: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
Begin
MarkTime(T);
Repeat
SetArrayLength(ATPA, Length(Colors));
for i := 0 to High(Colors) do
FindColorsSpiralTolerance(midx, midy, ATPA[i], Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
TPA := MergeATPA(ATPA);
ATPA := TPAtoATPAEx(TPA, 15, 15);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
if (Length(ATPA) = 0) then
Exit;

MiddleTPAEx(ATPA[0], x, y);

if (TimeFromMark(T) > 5000) then
Exit;

MMouse(x, y, 10, 10);
Wait(randomrange(115,225));
If(IsUpTextMultiCustom(TheUpText)) then
begin
ClickMouse2(True);
if DidRedClick then
begin
Result := True;
Break;
end;
end;
Until(Result)
end;

procedure GetOutF;
begin
case random(2) of
0 : begin
KeyDown(VK_Tab);
wait(35+random(100));

wait(35+random(100));
KeyUp(VK_antileechTab);
wait(25+random(70));

wait(35+random(100));
end;
1 : begin
ExamineInv;
end;
end;
end;

procedure GMoveMouse;
begin
case random(4) of
0 : begin
mMouse(5,25,10,20);
end;
1 : begin
mMouse(250,150,40,40);
end;
2 : begin
mMouse(505,350,50,50);
end;
3 : begin antileech
mMouse(30,315,20,40);
end;
end;
end;
//laakes
Procedure RAntiBan;
begin
Wait(randomrange(200,400));
case random(RandAmount) of
0 : begin
wrantileechiteln('Random Wait AntiBan');
Wait(randomrange(1100,2500));
end;
1 : begin
GAntiBan;
end;
2 : begin
writeln('pickup mouse / GMoveMouse');
PickUpMouse;
Wait(randomrange(25,100));
GMoveMouse;
Wait(randomrange(250,300));
end;
3 : begin
writeln('Double GMoveMouse');
GMoveMouse;
Wait(randomrange(45,100));
GMoveMouse;
end;
end;
end;

Function Eat(What:antileech String): Boolean;
var
I: Integer;
begin
Result := False;
If Not LoggedIn then Exit;
if (HPPercent < 70) then
If InvEmpty then Logout
else
for i := 1 to 28 do
begin
InvMouse(I, 3);
if IsUpText(What) then
begin
ClickMouse2(True);
Wait(RandomRange(350, 525));
Result := True;
Exit;
end;
end;
end;
//laake's

procedure KillGaurd;
var
sX,sY: Integer;
label
fighting;
AntiLeech;
begin
if findNPC([1473691, 3244445, 3116439, 4307667], ['ttack','uard'], MSCX, MSCY) then
writeln('Gaurd is bieng killed!');
fighting:
While IsMoving do
wait(1);
FindNormalRandoms;
wait(randomrange(1400,2000));
if FindBlackChatMessage('omeone else is fighting') then
begin
writeln('Someone else may be doing the same as you!');
case random(4) of
0 : begin
sX := MSX1;
sY := MSY1;
end;
1 : begin
sX := MSX1;
sY := MSY2;
end;
2 : begin
sX := MSX2;
sY := MSY1;
end;
3 : begin
sX := MSX2;
sY := MSY2;
end;
end;
if findNPC([1473691, 3244445, 3116439, 4307667], ['ttack','uard'], MSCX, MSCY) then
GetOutF;
goto fighting;
end else
begin
if InFight then
begin
repeat
FindNormalRandoms;
writeln('Destroying');
Eat('Eat');
RAntiBan;
until (not InFight) or (not OthersInFight) or (not LoggedIn)
end;
wait(randomrange(200,400));
end;
end;

procedure Startup;
begin
Smart_Server := 69;
Smart_Members:= true;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
ObjDTM_Setup;
DeclarePlayers;
LogInPlayer;
AntiLeech := here;
MouseSpeed := 200;
wait(100+random(100));
end;
Function PickupGrapes:Boolean;
Var
X, Y: Integer;
begin
FindNormalRandoms;
If GrapeFinder([7875208, 8727694, 3544130, 8399497, 7545972], ['Take'], MSCX, MSCY) then
Begin
writeln('You have found the some grapes!');
While IsMoving do
Wait(50);
FindNormalRandoms;
Wait(RandomRange(500,750));
End;
end;

begin
Startup;
SetupChar;
repeat
repeat
KillGaurd;
PickupGrapes;
PickupGrapes;
PickupGrapes;
PickupGrapes;
PickupGrapes;
PickupGrapes;
PickupGrapes;
until InvFull or (hppercent < 50);
begin
ToBank;
OpenBankNPC;
if BankScreen then
begin
DepositAll;
wait(50 + Random(250));
Withdraw(0, 0, 10);
wait(50 + Random(250));
CloseBank;
wait(50 + Random(250));
end;
begin
ToGaurds;
end;
end;
FindNormalRandoms;
until not LoggedIn
writeln('stopping script');
TerminateScript;
end.


ps: the line that says here is the error is line 8

kevin33
07-07-2012, 08:56 AM
Cmon dude its so easy. We cant tell you how to fix it because its ANTI LEECH. Read a beginner tutorial and you will know whats wrong. Common sense could be used but if need be read a tut.
Hint** Poof gone.

Ezio Auditore da Firenze
07-07-2012, 09:02 AM
Please use [/ simba] tags (no space between . Like kevin said simple antileech.

slayer720
07-07-2012, 09:32 AM
Ok but how is it simple that error comes out every time I run the script

kevin33
07-07-2012, 09:33 AM
Because you have to do something in order to get rid of the error.

slayer720
07-07-2012, 09:41 AM
like what?

slayer720
07-07-2012, 09:48 AM
ok i will do something to fix the error but i need a solution because i dont wanna mess the script up

riwu
07-07-2012, 10:37 AM
Wow thats a whole tons of antileeches.
Hint: get rid of them, literally.
(only 1 of them need to be replaced by something that is shown a few lines before it)

slayer720
07-07-2012, 11:02 AM
any buddy knows a solution please post it i am desperatly in need of solution

riwu
07-07-2012, 11:11 AM
The purpose of antileech is to encourage ppl to learn and solve it themselves, not for leechers to request others to help them solve it! No one will help u if u dont want to help urself.

slayer720
07-07-2012, 11:13 AM
which one?

CephaXz
07-07-2012, 11:15 AM
which one?

You never care to read, don't you?

slayer720
07-07-2012, 11:27 AM
Yes I do care

Daniel
07-07-2012, 11:31 AM
Read this: http://villavu.com/forum/showthread.php?t=58935 (http://villavu.com/forum/showthread.php?t=58935) and make a first, basic script.

Then after that, tell me why this does not work:

program New;
identifier
begin
Writeln(identifier);
end.

No more talking until you have done that.

slayer720
07-07-2012, 12:34 PM
Please I have had enough please if any one knows a solution say it don't just post useless threads

Daniel
07-07-2012, 12:39 PM
Please I have had enough please if any one knows a solution say it don't just post useless threads

Useless? Far from it. Trying to help so you won't ever run into any problems again in the future.

Hint, here's another site for you that will help: http://www.learn-programming.za.net/programming_pascal_learn03.html

Now, if you do not want to help yourself and you keep posting useless threads, I will ban you. The person who wrote the script obviously does not want people like you using it. And by people like you, I mean people who do not want to learn and help themselves.

I will not go against the wishes of the script creator.

Good day.

slayer720
07-07-2012, 12:54 PM
Daniel thanks for the site you really helped me much thanks

Daniel
07-07-2012, 12:56 PM
Daniel thanks for the site you really helped me much thanks

What did you have to do to fix your script?

slayer720
07-07-2012, 05:48 PM
any other solutions?

NKN
07-07-2012, 05:51 PM
Wow.

Thanks for the site, any other solutions?

Kid, it's antiLEECH. You have to SOLVE IT YOURSELF.

Jesus, learn to read.

Sin
07-07-2012, 05:52 PM
If stupidity was a crime you'd be public enemy #1.

Becks
07-07-2012, 05:56 PM
Please I have had enough please if any one knows a solution say it don't just post useless threads

Do you not understand? The point is for you to gain a general knowledge about scripting before you can use scripts with antileech.. If you cannot do that use a different script.


@Shay on the real.. face palm to the extreme.


http://benisawesome.files.wordpress.com/2011/05/dirty-funny-photos-21.jpg

slayer720
07-07-2012, 06:04 PM
Ok thanks for the solution guys trying know

slayer720
07-07-2012, 07:07 PM
ok guys i solved the problem thanks god i am so dumb
any way i thank all of you guys really thanks