SRL Archive - OSR Help

Expected semicolon instead of "end."


10wnu9

2012-03-19 22:40:54

How the hell do I fix this error, just made my first script and I get this : confused:

moved from previous section PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

NCDS

2012-03-19 22:56:34

From: 10wnu9
How the hell do I fix this error, just made my first script and I get this : confused:

moved from previous section PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


First off, the whole "PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!" etc. is obnoxious and unnecessary, so no need for that. ;)

Second, If you would like to post like code and the actual error, that would help people help you.

sahibjs

2012-03-19 22:59:47

You just made another thread about the same thing.
Try not to create multiple threads.

Sex

2012-03-19 23:00:51

From: sahibjs
You just made another thread about the same thing.
Try not to create multiple threads.


His other thread was in a different forum. He posted this one in the correct forum, though he should have reported the other thread to have it moved. I have already reported it :).

10wnu9

2012-03-19 23:03:55

Yes I know I understand, I'm Ultimately tired, you'd see me round the forum, i'm not usually like this, as for the other one, I shall delete it when Possible.

And Here is the Simba TAGS

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const

World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;




procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;

end;
Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(7873+Random(298));
Gametab(Tab_Inv);
MakeCompass('W');
Wait(9346+Random(222));
MakeCompass('E');
end;
1: PickUpMouse;
2:
begin
MakeCompass('S');
wait(222+random(1335));
MakeCompass('W');
wait(561+random(133));
MakeCompass('E');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TooLong, TreeCounter: integer;
begin
MarkTime(TooLong);
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3424846, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) then
repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then
Mouse(x,y,0,0,false);
ChooseOption('hop');
Wait(222+Random(122));

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

end;

Flag;
MarkTime(TreeCounter);

repeat
Wait(75+Random(286)); MakeCompass('W');
Wait(500+Random(122));
Wait(75+Random(133)); MakeCompass('E');
wait(400+random(250));
AntiBan;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ew') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin

LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];

If InvFull then

begin
FindNormalRandoms;
For I:=0 To 27 Do

Begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('Dro');
End;
End;

End;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;

repeat

ChopTree;
If Invfull then
DropLogs;
until(False);
End.


Bare In Mind This Is MY FIRST script ever and It's going okay, it's at the end. ^^^

I get the error it says— Error] (194:4): Identifier expected at line 193

Line 193 Being the part saying "End."

The end of the script, so thanks for you consideration.

10wnu9

2012-03-19 23:05:05

From: Sex
His other thread was in a different forum. He posted this one in the correct forum, though he should have reported the other thread to have it moved. I have already reported it :).


Thank you :D.

bolshak25

2012-03-19 23:07:42

please check the original thread where i posted you are missing an end;

Sex

2012-03-19 23:08:04

From: 10wnu9
Yes I know I understand, I'm Ultimately tired, you'd see me round the forum, i'm not usually like this, as for the other one, I shall delete it when Possible.

And Here is the Simba TAGS

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const

World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;




procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;

end;
Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(7873+Random(298));
Gametab(Tab_Inv);
MakeCompass('W');
Wait(9346+Random(222));
MakeCompass('E');
end;
1: PickUpMouse;
2:
begin
MakeCompass('S');
wait(222+random(1335));
MakeCompass('W');
wait(561+random(133));
MakeCompass('E');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TooLong, TreeCounter: integer;
begin
MarkTime(TooLong);
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3424846, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) then
repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then
Mouse(x,y,0,0,false);
ChooseOption('hop');
Wait(222+Random(122));

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

end;

Flag;
MarkTime(TreeCounter);

repeat
Wait(75+Random(286)); MakeCompass('W');
Wait(500+Random(122));
Wait(75+Random(133)); MakeCompass('E');
wait(400+random(250));
AntiBan;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ew') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin

LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];

If InvFull then

begin
FindNormalRandoms;
For I:=0 To 27 Do

Begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('Dro');
End;
End;

End;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;

repeat

ChopTree;
If Invfull then
DropLogs;
until(False);
End.


Bare In Mind This Is MY FIRST script ever and It's going okay, it's at the end. ^^^

I get the error it says— Error] (194:4): Identifier expected at line 193

Line 193 Being the part saying "End."

The end of the script, so thanks for you consideration.


Go to sleep :).

This is one of those reasons why proper formatting standards are important. Let me fix it up for you.

Edit: Nevermind, see above post.

10wnu9

2012-03-19 23:10:42

Seems easy enough, I have around 30 mins before I crash out, Just explain where end; goes and I will be extremely pleased. :D

10wnu9

2012-03-19 23:11:50

Hmm, How did I format It wrong, In standards Is this about the worst you can get?

bolshak25

2012-03-19 23:12:23

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin

LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];

If InvFull then

begin
FindNormalRandoms;
For I:=0 To 27 Do

Begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('Dro');
End;
End;
end;//////////////////////////////////////////here
End;

10wnu9

2012-03-19 23:12:51

From: 10wnu9
Hmm, How did I format It wrong, In standards Is this about the worst you can get?



I see YoHoJo Is Here, I say Let Him explain, I used His guide :f:

10wnu9

2012-03-19 23:15:39

Never Mind, Thank You Bolshak, And the rest-ofyou who helped, especially YoHoJo for His WoodCutting TUT that I clearly Made a Mess Of ;D.

Sex

2012-03-19 23:17:30

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

const
World = 103;
MEMBERS = True;
Stats_UserID = '';
Stats_Password = '';
AutoUpdate = True;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '10w';
Players[0].Active := True;
end;

function CheckAndClick(UpText, Option: string; X, Y: Integer; RClick: Boolean): Boolean;
begin
MMouse(x, y, 5, 5);
if WaitUptext(Uptext, 1500 + Random(500)) then
begin
Result := True;
GetMousePos(x, y);
if RClick then
begin
Mouse(x, y, 0, 0, False);
Result := WaitOption(Option, 1800);
if Result then
FFlag(0);
end
else
begin
Mouse(x, y, 0, 0, True);
Wait(100 + Random(50));
FFlag(0);
end;
end;
end;

procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Gametab(Tab_Stats) Hoverskill('Random', False);
Wait(7873 + Random(298));
Gametab(Tab_Inv);
MakeCompass('W');
Wait(9346 + Random(222));
MakeCompass('E');
end;
1: PickUpMouse;
2:
begin
MakeCompass('S');
wait(222 + random(1335));
MakeCompass('W');
wait(561 + random(133));
MakeCompass('E');
FindNormalRandoms;
end;
end;
end;

procedure ChopTree;
var
x, y, PlusOne, TooLong, TreeCounter: integer;
begin
MarkTime(TooLong);
PlusOne := InvCount + 1;
x := MSCX;
y := MSCY;
if FindObjTPA(x, y, 3424846, 5, 1, 15, 60, 600, ['Cho']) then
case Random(2) of
0: Mouse(x, y, 5, 5, True);
1:
begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
end;
end;
Flag;
MarkTime(TreeCounter);
if (TimeFromMark(TooLong) > 30000) then
repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22) then
Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198 + Random(128));
FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22) then
Mouse(x, y, 0, 0, false);
ChooseOption('hop');
Wait(222 + Random(122));
WriteLn('ANNIHILATING TREE!');
if InvCount = + 1 then
WriteLn('We Got the Yew log!!');
begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');
end;
Flag;
MarkTime(TreeCounter);
repeat
Wait(75 + Random(286));
MakeCompass('W');
Wait(500 + Random(122));
Wait(75 + Random(133));
MakeCompass('E');
wait(400 + random(250));
AntiBan;
if InvCount = PlusOne then
WriteLn('We ANNIHILATED another log!');
until not IsUpText('ew') or (InvFull);
until (InvFull);
end;

procedure DropLogs;
var
x, y, LogDTM, I: Integer;
SlotBox: TBox;
LogPattern: TIntegerArray;
begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern := [1, 5, 9, 13, 17, 21, 25, 29, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15, 19, 23, 27, 4, 8, 12, 16, 20, 16, 12, 8, 4];
if InvFull then
begin
FindNormalRandoms;
for I := 0 to 27 do
begin
FindNormalRandoms;
Status('Dropping Log:' + IntToStr(I));
SlotBox := InvBox(LogPattern[I]);
if FindDTm(LogDTM, x, y, Slotbox.x1, Slotbox.y1, SlotBox.x2, Slotbox.y2) then
begin
MouseItem(LogPattern[I], 1);
ChooseOption('Dro');
end;
end;
end;
end; // you were missing this
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
ChopTree;
if Invfull then
DropLogs;
until (False);
end.
Proper standards for you :).

By the way, you were missing the end; at the end of the DropLogs procedure.

10wnu9

2012-03-19 23:19:53

If I fix Up My script to General Good Use Standards How will I release It on the forums?

Sex

2012-03-19 23:22:09

From: 10wnu9
If I fix Up My script to General Good Use Standards How will I release It on the forums?


What do you mean?

10wnu9

2012-03-19 23:23:20

I Have No clue.

Right. Composure..3:22am Isn't easy on me.

Okay I mean, If I improve the standards of my script could I put it on the first scripts board etc?

Sex

2012-03-19 23:37:25

If you feel you're done with the script and it works fine, then sure you can post it in the First Script forum..still don't quite get your question. Standards are something you'll want to have no matter what :).

10wnu9

2012-03-20 12:01:27

Okay the script is working "Okay" But is Not complete, Is there a way to make the script change the camera angle until it finds acceptable colour/tree or is there the only MakeCompass('N'); Setting?

Thanks.

Wyn

2012-03-20 14:12:58

From: 10wnu9
Okay the script is working "Okay" But is Not complete, Is there a way to make the script change the camera angle until it finds acceptable colour/tree or is there the only MakeCompass('N'); Setting?

Thanks.


MakeCompass(0);

You can easily change the angle by adding whatever (Angle) if tree find failed.

10wnu9

2012-03-20 15:44:12

Sorry wyn I don't understand as I am New to scripting

do I put MakeCompass(0); and that's it?

Or MakeAngle?

Sorry Just give me and example, can you make it just spin around a random angle until it finds a tree?

Meh.

Abu

2012-03-20 15:52:26

You could use CompassMovement(0, 360, false) which would move the camera to a random angle between 0 and 360 degrees.

You could set it at the start of your function, then repeat the function until it finds a tree.

10wnu9

2012-03-20 17:11:55

How long is the average beginner script in lines

100-500?

Mines 205 atm.

Nebula

2012-03-20 17:16:18

CompassMovement(0, 360, false); or MakeCompass(RandomRange(-180, 180)); to move the compass to a random angle. It would look something like this:


if (FindTree = False) then
repeat
CompassMovement(0, 360, False);
until(FindTree = True);

Average first script length varies.. But would be 50 - 300 imo.

10wnu9

2012-03-20 17:24:50

Abu That helped a ton dude :D, Now I seriously think my only problem is this!

If I get this fixed it will work completely.

Okay so what happens is instead of dropping it left clicks on logs and not right clicks :\ I'll post the dropping part of the script

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];

If InvFull then

begin
FindNormalRandoms;
For I:=0 To 27 Do

Begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

begin
MouseItem(LogPattern[I],1);
ChooseOption('rop');
End;
End;
End;
End;

There whats wrong?

Nebula

2012-03-20 17:26:53

MouseItem(LogPattern,2);

10wnu9

2012-03-20 17:32:48

How come I think I have done everything now I get this, It Keeps clicking Tree even after INVO full???

Erh!!

Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(30000+Random(298));
Gametab(Tab_Inv);
MakeCompass('0');
Wait(22000+Random(222));
MakeCompass('0');
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(2000+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TooLong, TreeCounter: integer;
begin
CompassMovement(0, 360, false);
MarkTime(TooLong);
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3424846, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) then
repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then
Mouse(x,y,0,0,false);
ChooseOption('hop');
Wait(222+Random(122));

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

end;

Flag;
MarkTime(TreeCounter);

repeat
Wait(75+Random(286));
CompassMovement(0, 360, false);
Wait(2000+Random(122));
CompassMovement(0, 360, false);
wait(2000+random(250));
AntiBan;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ew') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
Begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];

If InvFull then

begin
FindNormalRandoms;
For I:=0 To 27 Do

Begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

begin
MouseItem(LogPattern[I],2);
ChooseOption('rop');
End;
End;
End;
End;




begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;

repeat

ChopTree;
If Invfull then
DropLogs;
until(False);

End.

Nebula

2012-03-20 17:41:05

Because you have the script click the tree 3 times before using InvFull…


if FindObj(x, y, 'hop', 3424846, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

FindNormalRandoms;
if FindObj(x, y, 'hop', 3424846, 22)

then
Mouse(x,y,0,0,false);
ChooseOption('hop');
Wait(222+Random(122));

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

10wnu9

2012-03-20 17:42:12

So what do you mean, do I delete something, can you show in SIMBA tags what to delete please?

Nebula

2012-03-20 17:47:27

No, I'm not just going to spoon-feed you your script.
This is how your scripts logic works:

repeat
ClickTree
If the time is 30 seconds from a mark that you just marked then...
Repeat
ClickTree 3 times
Repeat
Antiban
until the UpText is gone or InvFull
until InvFull
until False

Your issue lies in the above.

10wnu9

2012-03-20 17:49:04

What the fudge.

Okay I need Help….Nevermind I will Try But I have no Experience in scripting.

10wnu9

2012-03-20 17:51:28

I see that I have FindObj 2-3 times, so I deleted one….

But I still don't understand why It won't drop after INVfull…

Nebula

2012-03-20 17:56:10

Look. I'll eventually tell you how to fix your script if you can't figure it out yourself. You would gain nothing if I just fixed it for you and gave you the new procedure.

I'll tell you your issue starts with this line:

MarkTime(TooLong);

10wnu9

2012-03-20 18:03:42

The Thing that annoys me is I am trying my hardest and seem to be back pedalling….

Don't tell me but This Is getting me to breaking point.

10wnu9

2012-03-20 18:16:38

I have physically had the worst day of my life now I feel like I have wrecked my SCRIPT GOD DAMNIT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I am seriously annoyed.

Most people like gucci got their first script done in 1 day, i've spent 2 and a bit on mine, sad.

Nebula

2012-03-20 18:22:35

Mine took a week.

Abu

2012-03-20 18:28:00

Mine took like 2 days… then a week to get the mainloop working :p


Oh and you haven't put DropLogs in your mainloop? - Yes, yes you have

10wnu9

2012-03-20 18:30:43

Ergggg….I'm really confused, I'm trying it, If I don't have it done soon I swear I'm going to shove my head down my toilet.

Abu

2012-03-20 18:31:46

Try this in your second half of main loop:


repeat
repeat
ChopTree;
until InvFull;
DropLogs;
until False;
end.

10wnu9

2012-03-20 18:38:51

Right just doing a few little mods to some scruffy writing.

I'll update you guys with what happens in 5-15 mins

10wnu9

2012-03-20 18:41:47

Abu, Done what you said with the little edit on Until InvFull but I got error on Until False After that.

10wnu9

2012-03-21 12:16:49

Meh, The weird thing is, I've done everything and when I watch my script and it gets 28 logs at the bottom of the script panel it says dropping logs 1-27 really fast..And It never done anything….I'm looking into it, if I cannot Find an answer could somebody maybe help me?

10wnu9

2012-03-21 12:32:37

I wrote Dropper := Dropper + 1;

and It has and error on it….Why? Any help please?

Sex

2012-03-21 13:04:34

From: 10wnu9
I wrote Dropper := Dropper + 1;

and It has and error on it….Why? Any help please?


You will need to post the error in order for us to help you.

Edit: You will also have to post the complete script as I see no problems that line itself would give you. If Dropper was not an integer type however, it would give you Type Mismatch.

10wnu9

2012-03-21 13:12:09

Right Sex, Thanks But now never mind that, I Have Solved a problem and have started another…It cannot go on like this, But I do think I will be sorted if I Iron out this error.

Here is the script

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//Run The script anywhere where there is many
//Trees or Oaks, Works anywhere, recommended spot:-
//West Of Cooking Guild Grand Exchange!


//Any Problems found, Pm Me Or Leave an Issue on
//Thread!



//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const

World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;




procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;

end;
Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Wait(22000+Random(387));
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(30000+Random(298));
Gametab(Tab_Inv);
CompassMovement(-180, 180, False);
Wait(22000+Random(222));
CompassMovement(-180, 180, False);
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(2000+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TooLong, TreeCounter: integer;
begin

PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3688533, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
CompassMovement(180, -180, false);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);

repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3688533, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

end;

Flag;
MarkTime(TreeCounter);

repeat
Wait(75+Random(286));
CompassMovement(0, 360, false);
Wait(1222+Random(122));
CompassMovement(0, 360, false);
wait(1286+random(250));
AntiBan;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ree') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;


Begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
For I:=2 To 28 Do
begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MouseItem(LogPattern[I], false);
ChooseOption('rop');
End;
End;
End;




begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
Repeat
ChopTree;
If InvFull Then
DropLogs;
until (false);

End.

The error is with "MouseItem(LogPattern, false);"

Somebody said Put 2 instead of False but that does not rightclick.

I get type Mismatch, And I really want to give a shout out to Abu, Nebula and Sex for being such great support, along with gucci on another thread!!!!!!

10wnu9

2012-03-21 13:29:32

:o Hope I can get a fix for that then My script should run properly :D, Maybe not smooth but I don't plan on any major errors.

10wnu9

2012-03-21 16:06:04

Any help please?

Nebula

2012-03-21 16:13:33

Your original code should have worked fine. It doesn't take 30 seconds to find a tree so it never stopped finding a tree to chop.

10wnu9

2012-03-21 16:15:20

OMFG I left username and password in!

And Also, I cannot understand what about 30 second wait, it's not that, It won't drop them it hovers over every log :\

Nebula

2012-03-21 17:54:43

Read what I posted before…

From: Nebula
MouseItem(LogPattern,2);

10wnu9

2012-03-21 18:01:08

I tried this?

It doesn't work, I tried it ages ago, (False) Makes it right click no? Number 2 does not, it compiles with number 2 but doesn't drop with number 2 sorry.

Nebula

2012-03-21 18:05:20

then use InvMouse instead.

Abu

2012-03-21 18:14:23

Try this as your DropLogs procedure:

Begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
For I:=2 To 28 Do
begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MMouse(x, y, 2, 2);
Mouse(x, y, 0, 0, False);
ChooseOption('rop');
End;
End;
End;

10wnu9

2012-03-21 18:32:45

Am I angry, upset or annoyed? Maybe puzzled.

Nothing is working, it just keeps clicking tree even at invo full.

Sex

2012-03-21 18:36:31

From: 10wnu9
Right Sex, Thanks But now never mind that, I Have Solved a problem and have started another…It cannot go on like this, But I do think I will be sorted if I Iron out this error.

Here is the script

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//Run The script anywhere where there is many
//Trees or Oaks, Works anywhere, recommended spot:-
//West Of Cooking Guild Grand Exchange!


//Any Problems found, Pm Me Or Leave an Issue on
//Thread!



//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const

World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;




procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;

end;
Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Wait(22000+Random(387));
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(30000+Random(298));
Gametab(Tab_Inv);
CompassMovement(-180, 180, False);
Wait(22000+Random(222));
CompassMovement(-180, 180, False);
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(2000+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TooLong, TreeCounter: integer;
begin

PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3688533, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
CompassMovement(180, -180, false);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);

repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3688533, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

end;

Flag;
MarkTime(TreeCounter);

repeat
Wait(75+Random(286));
CompassMovement(0, 360, false);
Wait(1222+Random(122));
CompassMovement(0, 360, false);
wait(1286+random(250));
AntiBan;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ree') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;


Begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
For I:=2 To 28 Do
begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MouseItem(LogPattern[I], false);
ChooseOption('rop');
End;
End;
End;




begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
Repeat
ChopTree;
If InvFull Then
DropLogs;
until (false);

End.

The error is with "MouseItem(LogPattern, false);"

Somebody said Put 2 instead of False but that does not rightclick.

I get type Mismatch, And I really want to give a shout out to Abu, Nebula and Sex for being such great support, along with gucci on another thread!!!!!!

Use either MOUSE_LEFT, MOUSE_RIGHT, or MOUSE_MIDDLE instead of False.

Nebula

2012-03-21 18:38:04

Yeah I made a mistake. I just checked and Right click is 0, not 2. try 0.

Sex

2012-03-21 18:39:23

From: Nebula
Yeah I made a mistake. I just checked and Right click is 0, not 2. try 0.


The constants exist for a reason. Do not use 0, use MOUSE_RIGHT.

10wnu9

2012-03-21 18:43:13

I'm Trying what SEX said then Nebula, In the meantime, I say homework Is Waaaay More Important, so I'm off to do my english homework, sex/nebula/abu your all getting a rep for helping when possible thanks.

10wnu9

2012-03-21 19:10:34

And still, dropping process does not work, it just clicks on surrounding trees….WTF!

Abu

2012-03-21 19:15:14

Did you try the process I posted?

10wnu9

2012-03-21 19:23:03

Yes abu, never worked, It won't drop, none of them in this thread drop…..ARGH.

Abu

2012-03-21 19:27:28

Well then I am certain the problem lies in your chopping trees procedure.

Where did you learn the procedure from? Go back to the tutorial that helped you write it and make sure you have followed it correctly.


That's all I can say really.

Sex

2012-03-21 19:31:15

Are you certain the Log DTM in your drop procedure is correct?

bolshak25

2012-03-21 19:40:59

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//Run The script anywhere where there is many
//Trees or Oaks, Works anywhere, recommended spot:-
//West Of Cooking Guild Grand Exchange!


//Any Problems found, Pm Me Or Leave an Issue on
//Thread!



//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const

World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;




procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;

end;
Function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
Begin
MMouse(x,y,5,5);
If WaitUptext(Uptext, 1500+Random(500)) Then
Begin
Result:= True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;




procedure AntiBan;

begin

if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Wait(22000+Random(387));
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(30000+Random(298));
Gametab(Tab_Inv);
CompassMovement(-180, 180, False);
Wait(22000+Random(222));
CompassMovement(-180, 180, False);
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(2000+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var x, y, PlusOne, TooLong, TreeCounter, Inv: integer;
begin

PlusOne:= Inv + 1;
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, 3688533, 5, 1, 15, 60, 600, ['Cho'])then

Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
CompassMovement(180, -180, false);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);

repeat
FindNormalRandoms;
If InvFull Then
exit;
if FindObj(x, y, 'hop', 3688533, 22)

then Mouse(x, y, 2, 2, false);
ChooseOption('hop');
Wait(198+Random(128));

WriteLn ('ANNIHILATING TREE!');
Inv:=InvCount;
if InvCount=PlusOne then
WriteLn('We Got the Yew log!!');

begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');

end;

Flag;
MarkTime(TreeCounter);

repeat
If InvFull Then
exit;
Wait(75+Random(286));
CompassMovement(0, 360, false);
Wait(1222+Random(122));
CompassMovement(0, 360, false);
wait(1286+random(250));
AntiBan;
Inv:=InvCount;
If InvCount=PlusOne Then
WriteLn('We ANNIHILATED another log!');
Until not IsUpText('ree') or (InvFull);
until(InvFull);

End;

Procedure DropLogs;
Var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;


Begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
For I:=2 To 28 Do
begin
writeln('Dropping');
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MouseItem(LogPattern[I], 0);
ChooseOption('rop');
End;
End;
FreeDTM(LogDTM);
End;




begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
Repeat
ChopTree;
If InvFull Then
DropLogs;
until (false);

End.

try that

Nebula

2012-03-21 19:45:43

Sex is correct, your DTM has no tolerance on the main point. Try using this:

:= DTMFromString('mbQAAAHicY2VgYBACYlkg5mWAAGYgZgJiRiDmA2IuqLiDgQxUBoF1gaQIGmbEgsEAAFteAXY=');

10wnu9

2012-03-22 03:55:27

Guys you've done alot to help me, but the thing is It Doesn't even go to the logs it just keeps saying Ima cut the tree.

I swear….It does the antiban sits beside a tree doesn't think about dropping a full invo.

10wnu9

2012-03-22 03:56:49

If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then

I'm getting an error on this….Wtf.

Sex

2012-03-22 04:06:12

  1. Do you have LogDTM declared as an integer?
  2. Are you loading the DTM?
  3. Do you have x and y declared as integers?
  4. Do you have Slotbox declared as a TBox?
Again, you need to give us the error in order for us to help you.

masterBB

2012-03-22 04:50:29

Sorry for not reading the whole thread. Fixed some standards and some unwanted behavior.

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//Run The script anywhere where there is many
//Trees or Oaks, Works anywhere, recommended spot:-
//West Of Cooking Guild Grand Exchange!


//Any Problems found, Pm Me Or Leave an Issue on
//Thread!



//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const
World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;
end;

function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
begin
MMouse(x,y,5,5);
if WaitUptext(Uptext, 1500+Random(500)) then
begin
Result:= True;
GetMousePos(x, y);
if RClick then
begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
if Result then
FFlag(0);
end else
begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
end;
end;
end;

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Wait(22000+Random(387));
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(30000+Random(298));
Gametab(Tab_Inv);
CompassMovement(-180, 180, False);
Wait(22000+Random(222));
CompassMovement(-180, 180, False);
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(2000+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var
x, y, PlusOne, TooLong, TreeCounter: integer;
begin
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
if FindObjTPA(x, y, 3688533, 5, 1, 15, 60, 600, ['Cho'])then
case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
CompassMovement(180, -180, false);
end;
end;
Flag;
MarkTime(TreeCounter);
if (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);

repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3688533, 22) then
Mouse(x, y, 2, 2, false);

ChooseOption('hop'); //this will be run no matter if it found the tree or not
Wait(198+Random(128));
WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the Yew log!!');

Mouse(x, y, 2, 2, false);
ChooseOption('hop');

Flag;
MarkTime(TreeCounter);

repeat
Wait(75+Random(286));
CompassMovement(0, 360, false);
Wait(1222+Random(122));
CompassMovement(0, 360, false);
wait(1286+random(250));
AntiBan;
if InvCount=PlusOne then
WriteLn('We ANNIHILATED another log!');
until not IsUpText('ree') or (InvFull);
until(InvFull);
end;

procedure DropLogs;
var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
for I:=2 to 28 do
begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MouseItem(LogPattern[I], 0); //instead of 0 you can also use mouse_Right
ChooseOption('rop');
end;
end;
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
If InvFull Then
DropLogs
else
ChopTree;
until (false);
end.

10wnu9

2012-03-22 11:53:30

Lol Sorry I had just woke up and was finishing my english essay.

I'll do error report now.

Abu

2012-03-22 12:10:43

Try inputting an if..then in your main loop after chopping trees but before Dropping the logs. Then we can see which procedure is going wrong. For example:

if ChopTrees then
Wrtieln('this works fine? Lets see if I can locate my logs');
DropLogs;

If the Writeln hasn't been written, then the procedure hasn't finished and it means your having a problem getting the chopping procedure to finish

10wnu9

2012-03-22 14:10:46

Never mind guys :DDDD It drops about 23 logs?

Good enough for BETA I would say!

I will release it soon but I never seen the dropping procedure, was watching the simpsons.

10wnu9

2012-03-22 16:02:37

Okay so It drops, great.

But I am by NO WAY satisfied, how can I make it drop without spamming the trees first?
The chances of ban with this script will be waay too high.

Abu

2012-03-22 16:27:16

There is clearly something wrong with your ChopTree procedure.

I swear your searching for the TreeTPA and then searching for the TreeDTM, why don't you stick to one.

And also, I think this is where you're messing up the procedure:
repeat
Wait(75+Random(286));
CompassMovement(0, 360, false);
Wait(1222+Random(122));
CompassMovement(0, 360, false);
wait(1286+random(250));
AntiBan;
if InvCount=PlusOne then
WriteLn('We ANNIHILATED another log!');
until not IsUpText('ree') or (InvFull);

If I'm correct the procedure keeps repeating that which is why you cannot end the procedure quick enough.

Well I think so… anyway I don't think that code is even necessary, you should remove it

Nebula

2012-03-22 16:27:45

Would you mind posting the entire script as you have it right now? You keep changing the script and asking for help with issues that we can't even see.

You should also try to fix some of these issues by yourself instead of just posting on here whenever you have an easily fixable issue/error.

10wnu9

2012-03-22 17:54:01

Nebula, These guys are doing brilliant and the world of good, I am trying to do what I can That is why I get these errors, do you realise this is my first script, share some consideration please.

I change It Because I see things where I think they could be altered yet I change nothing other than what you say.

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//Run The script anywhere where there is many
//Trees or Oaks, Works anywhere, recommended spot:-
// Lumbridge castle orWest Of Cooking Guild Grand Exchange!


//Any Problems found, Pm Me Or Leave an Issue on
//Thread!



//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const
World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := ''; // 3 letters of your username (not the first letter)
Players[0].Active := True;
end;

function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
begin
MMouse(x,y,5,5);
if WaitUptext(Uptext, 1500+Random(500)) then
begin
Result:= True;
GetMousePos(x, y);
if RClick then
begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
if Result then
FFlag(0);
end else
begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
end;
end;
end;

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Wait(16000+Random(387));
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(3000+Random(298));
Gametab(Tab_Inv);
CompassMovement(-180, 180, False);
Wait(4500+Random(222));
CompassMovement(-180, 180, False);
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(2000+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;



procedure ChopTree;
var
x, y, PlusOne, TooLong, TreeCounter: integer;
begin
PlusOne:= InvCount + 1;
x:=MSCX;
y:=MSCY;
if FindObjTPA(x, y, 3162184, 5, 1, 15, 60, 600, ['Cho'])then
case Random(2) of
0: Mouse(x, y, 4, 4, True);
1: begin
Mouse(x, y, 4, 4, False);
WaitOption('Chop', 500);
CompassMovement(180, -180, false);
end;
end;
Flag;
MarkTime(TreeCounter);
if (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);

repeat
FindNormalRandoms;
if FindObj(x, y, 'hop', 3162184, 22) then
Mouse(x, y, 2, 2, false);

ChooseOption('hop'); //this will be run no matter if it found the tree or not
Wait(19+Random(12));
WriteLn ('ANNIHILATING TREE!');
if InvCount=+1 then
WriteLn('We Got the log!!');

Mouse(x, y, 2, 2, false);
ChooseOption('hop');

Flag;
MarkTime(TreeCounter);
until(InvFull);
end;

procedure DropLogs;
var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
begin
LogDTM := DTMFromString('mbQAAAHicY2VgYHBlYmAwA2JjIHYA4gAgfgIUfwTEb4D4AxA/BmIHAxkgyYSGUcF/IGbEgsEAABw/B2s=');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
for I:=2 to 28 do
begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MouseItem(LogPattern[I], 0); //instead of 0 you can also use mouse_Right
ChooseOption('rop');
end;
end;
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
ChopTree;
If InvFull Then
WriteLn('OMFG DROPPING THE BITCHES!!!');
DropLogs;
until(false);
end.

Abu

2012-03-22 18:19:59

Wow I just tested it and it has REAL trouble finding the Trees.

Might I suggest you use AutoColor Aid: http://villavu.com/forum/showthread.php?t=26944&highlight=AutoColorAid
It will do all the work for you and can be quite accurate if you spend some time getting the right colors.

If you want to know howto use it: http://www.youtube.com/watch?v=98wVrr6GwyU&feature=plcp&context=C4daf551VDvjVQa1PpcFM5uOco5gU7FD6rmUltnlYn07Mm809Bbqg%3D


EDIT: You also need to use PixelShift: http://villavu.com/forum/showthread.php?t=74090&highlight=PixelShift
This stops it from searching for other trees while its still chopping the current one.

Nebula

2012-03-22 18:26:34

Sorry for coming off as inconsiderate, I didn't mean to sound that way. I was just saying that you will learn more if you try fixing things yourself.

Anyways, here's a re-written version of your ChopTree procedure. I tried to keep as much of your original code as possible. It should work, but I didn't test it and made it rather quickly so you might find an issue.


procedure ChopTree;
var
x, y, PlusOne, TooLong, TreeFindFailsafe, TreeWaitFailsafe: integer;
begin
PlusOne:= InvCount;
x:=MSCX;
y:=MSCY;
MarkTime(TooLong);
MarkTime(TreeFindFailsafe);
repeat
repeat
if FindObjTPA(x, y, 3162184, 5, 1, 15, 60, 600, ['Cho'])then
begin
case Random(2) of
0: Mouse(x, y, 4, 4, True);
1: begin
Mouse(x, y, 4, 4, False);
WaitOption('Chop', 500);
end;
end;
Flag;
Break;
end;
if (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);
until(TimeFromMark(TreeFindFailsafe) > 60000);
if (TimeFromMark(TreeFindFailsafe) > 60000) then
begin
writeln('Couldnt find tree');
Logout;
TerminateScript;
end else
begin
wait(RandomRange(300, 600));
if InvCount > PlusOne then
begin
WriteLn('We Got the log!!');
break;
end else
begin
MarkTime(TreeWaitFailsafe);
repeat
wait(RandomRange(50, 150));
until(InvCount > PlusOne) or (TimeFromMark(TreeWaitFailsafe) > RandomRange(5000, 10000));
if (TimeFromMark(TreeWaitFailsafe) > 5000) then
begin
writeln('Log wasnt cut');
break;
end else
begin
writeln('Log was Cut! :)');
break;
end;
end;
end;
until(False);
end;

Abu

2012-03-22 18:49:49

Nebula you've definitely improved it, but it still has issues with the tree color.

Takes too long to find the next tree

10wnu9

2012-03-23 17:30:42

Ehh I changed colours, I was using like 3667892 or something and was fine (That was a guess, I am Not updating or doing anything tonight, I have the weekend for that…But I'm at my dads so I will come on here to get the script, night.

10wnu9

2012-03-24 05:32:37

Yeah abu I know, I switched the colours for evergreens as I thought an evergreen powerchopper would be brilliant as there are LOADS of them, though it's hard to find the colours, and I will give that ACA a go.

10wnu9

2012-03-24 06:50:03

Once again, I am having great trouble with dropping!!

I used ACA and It's going well but it keeps clicking the tree and won't drop I'm really getting sick and tired of asking people.

program New;
{$DEFINE SMART}
{$i srl/srl.simba}
{$DEFINE SRL5}

//Run The script anywhere where there is many
//Trees or Oaks, Works anywhere, recommended spot:-
// Lumbridge castle orWest Of Cooking Guild Grand Exchange!


//Any Problems found, Pm Me Or Leave an Issue on
//Thread!



//This Is My very First Script, If You
//Are Using It Please Leave Constructive Critiscism!

Const
World = 103; //May not Work As of Yet.
MEMBERS = True;

Stats_UserID = '';
Stats_Password = '';

AutoUpdate = True;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := '10w'; // 3 letters of your username (not the first letter)
Players[0].Active := True;
end;

function CheckAndClick(UpText, Option:String; X,Y:Integer;RClick:Boolean) :Boolean;
begin
MMouse(x,y,5,5);
if WaitUptext(Uptext, 1500+Random(500)) then
begin
Result:= True;
GetMousePos(x, y);
if RClick then
begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option,1800);
if Result then
FFlag(0);
end else
begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
end;
end;
end;

procedure AntiBan;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
case Random(2) of
0:
begin
Wait(16000+Random(387));
Gametab(Tab_Stats) Hoverskill ('Random',False);
Wait(305+Random(298));
Gametab(Tab_Inv);
CompassMovement(-180, 180, False);
Wait(4500+Random(222));
CompassMovement(-180, 180, False);
end;
1: PickUpMouse;
2:
begin
MakeCompass('0');
wait(1743+random(1335));
MakeCompass('0');
wait(561+random(133));
MakeCompass('0');
FindNormalRandoms;
end;
end;
end;


function TreeColour: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.93, 0.79);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 1910309, MSX1, MSY1, MSX2, MSY2, 2);
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
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 1.34) and (X <= 2.07) and (Y >= 1.47) and (Y <= 2.33) and (Z >= 1.17) and (Z <= 1.80) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;


procedure ChopTree;
var
x, y, PlusOne, TooLong, TreeFindFailsafe, TreeWaitFailsafe: integer;
begin
PlusOne:= InvCount;
x:=MSCX;
y:=MSCY;
MarkTime(TooLong);
MarkTime(TreeFindFailsafe);
repeat
repeat
if FindObjTPA(x, y, TreeColour, 5, 1, 15, 60, 600, ['Cho'])then
begin
case Random(2) of
0: Mouse(x, y, 4, 4, True);
1: begin
Mouse(x, y, 4, 4, False);
WaitOption('Chop', 500);
end;
end;
Flag;
Break;
end;
if (TimeFromMark(TooLong) > 30000) then
CompassMovement(-180, 180, false);
until(TimeFromMark(TreeFindFailsafe) > 60000);
if (TimeFromMark(TreeFindFailsafe) > 60000) then
begin
writeln('Couldnt find tree');
Logout;
TerminateScript;
end else
begin
wait(RandomRange(300, 600));
if InvCount > PlusOne then
begin
WriteLn('We Got the log!!');
break;
end else
begin
MarkTime(TreeWaitFailsafe);
repeat
wait(RandomRange(50, 150));
until(InvCount > PlusOne) or (TimeFromMark(TreeWaitFailsafe) > RandomRange(5000, 10000));
if (TimeFromMark(TreeWaitFailsafe) > 5000) then
begin
writeln('Log wasnt cut');
break;
end else
begin
writeln('Log was Cut! :)');
break;
end;
end;
end;
until(False);
end;


procedure DropLogs;
var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
begin
LogDTM:= DTMFromString('mbQAAAHicY2VgYIhlYmAIAuJgIE4A4gwg7mGE4BlAPB2Iu4HY0VIEqJqJwUBBAUxDMCZgxILBAADLpQW6');
LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];
for I:=2 to 28 do
begin
FindNormalRandoms;
Status('Dropping Log:'+ IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,x,y,Slotbox.x1,Slotbox.y1, SlotBox.x2, Slotbox.y2) Then
begin
MouseItem(LogPattern[I], 0); //instead of 0 you can also use mouse_Right
ChooseOption('rop');
end;
end;
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
repeat
ChopTree;
If InvFull Then
WriteLn('Dropping!');
DropLogs;
until(false);
end.

There is the script, I don't care about trying myself, I've been trying for ages now even while you awesome helpers have been giving advice, please I just want a fix now for god sake.

EDIT:- ALSO GET THIS ** Warning in InvBox: Incorrect index: 29 ** while running.

Abu

2012-03-24 08:38:28

I guess you could just post this in the first scripts section and hope that someone will come along and find the error.

For your other problem, I think you're forgetting the use of the Search Button:
http://villavu.com/forum/showthread.php?t=31960&highlight=Warning+InvBox

masterBB

2012-03-24 08:44:40

LogPattern:=[1,5,9,13,17,21,25,29,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,16,12,8,4];

You got 29 in that array, but there are only 28 inventory spots…

edit: and you got an infinity loop in your tree cut procedure.

10wnu9

2013-12-13 08:14:21

Has the code completely changed since I left this thread? I might retry this script unless it is completely dead.

Rich

2013-12-13 13:26:22

From: 10wnu9
Has the code completely changed since I left this thread? I might retry this script unless it is completely dead.
I'd be lying if I said a lot hasn't change. With the release of SRL 6 a lot of code was altered. Saying that, it shouldn't take too much catching up if you're still interested!