this is what it is ment to look like at the end of the script
hope this helpsSCAR Code:begin
SmartSetup('world137', True, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
SetupSRL;
LoadHooks;
LoadDTMs;
LoadPath;
DeclarePlayers;
~shut
Printable View
this is what it is ment to look like at the end of the script
hope this helpsSCAR Code:begin
SmartSetup('world137', True, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
SetupSRL;
LoadHooks;
LoadDTMs;
LoadPath;
DeclarePlayers;
~shut
hmm nop doesnt help me xD i dont understand it
Here is the script i got, modified at the end of it so it will start, but not pick flax :)
Can somone here put in that u said hooks;.. etc in it?
SCAR Code:program New;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Reflection/Reflection.scar}
Const
LoadsPerLog = 3;
Var
dtmFlax, FC, RoundTime, RoundMarker, Counter: Integer;
Var
FlaxPath: TPointArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
End;
Procedure LoadDTMs;
Begin
dtmFlax := DTMFromString('78DA637466626078C98002B8E3F9182481342' +
'310FF07024633A09AC70C6880118904D2B64035F708A801D9758B' +
'801A7FA09A3B04D47803D5BC405511BE732FDCCD6035EE40350F5' +
'1D544ECDE8FAAC616534DF4A163A86ACC816A9EA2AA893F7D1E45' +
'0D00693916D2');
End;
Procedure LoadPath;
Begin
SetArrayLength(FlaxPath, 7);
FlaxPath[0].x := 2726;
FlaxPath[0].y := 3492;
FlaxPath[1].x := 2726;
FlaxPath[1].y := 3484;
FlaxPath[2].x := 2727;
FlaxPath[2].y := 3473;
FlaxPath[3].x := 2727;
FlaxPath[3].y := 3463;
FlaxPath[4].x := 2729;
FlaxPath[4].y := 3453;
FlaxPath[5].x := 2734;
FlaxPath[5].y := 3443;
FlaxPath[6].x := 2740;
FlaxPath[6].y := 3443;
End;
Function n_FFlag(Dist: Integer): Boolean;
Var
FlagSafe: Integer;
Begin
FlagSafe := GetSystemTime;
While FlagDistance > Dist Do
If GetSystemTime - FlagSafe >= 20000 Then
Exit
Else
Wait(20);
Result := True;
End;
Function WalkTTile(TileX, TileY: Integer): Boolean;
Var
X, Y: Integer;
Begin
TileToMinimap(TileX, TileY, X, Y);
X := X - 2 + Random(4);
Y := Y - 2 + Random(4);
If InCircle(X, Y, MMCX, MMCY, 74) Then
Begin
MFNF(X, Y, 2, 2);
n_FFlag(8);
Result := True;
Wait(25);
End;
End;
Function WalkTo(Bank: Boolean): Boolean;
Var
I: Integer;
CS: String;
Begin
If GetMMLevels('run', CS) > 40 Then
SetRun(True);
If Bank Then
Begin
For I := High(FlaxPath)-1 DownTo 0 Do
Begin
If Not WalkTTile(FlaxPath[i].x, FlaxPath[i].y) Then
Exit;
End;
End Else
For I := 1 To High(FlaxPath) Do
If Not WalkTTile(FlaxPath[i].x, FlaxPath[i].y) Then
Exit;
Result := True;
End;
Function FindFlaxes: TPointArray;
Var
CTS: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, Result, 15328935, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
End;
Function ClickFlax: Boolean;
Var
TPA: TPointArray;
X, Y, Z: Integer;
Begin
TPA := FindFlaxes;
Result := IsUpText('lax');
While (z <= High(TPA)) and (Not(Result)) Do
Begin
MMouse(TPA[z].x, TPA[z].y, 2, 2);
Result := IsUpText('lax');
z := z + 1;
End;
If Result Then
Begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
If FlagPresent Then
Begin
Flag;
Wait(500 + Random(250));
End;
End;
End;
Function InBeeKeeper: Boolean;
Var
TPA: TPointArray;
B: TBox;
Begin
FindColorsTolerance(TPA, 0, 570, 35, 688, 129, 1);
B := GetTPABounds(TPA);
Result := GetArrayLength(TPA) = (B.x2 - B.x1) * (B.y2 - B.y1) + 200;
End;
Procedure PickingLoop;
Var
FlaxSafe, FailSafe, RT, RTimes, I: Integer;
Begin
FlaxSafe := GetSystemTime;
FailSafe := GetSystemTime
Repeat
If Not ClickFlax Then
I := I + 1
Else
Begin
I := 0;
FailSafe := GetSystemTime
Wait(200 + Random(400));
RT := GetSystemTime;
If InBeeKeeper Then
Begin
Logout;
Players[CurrentPlayer].Loc := 'Beekeeper';
Exit;
End;
If FindNormalRandoms Then
If Not LoggedIn Then
Begin
Writeln('*** Unsolvable random encountered. Breaking out of picking ***');
Break;
End Else
RTimes := RTimes + (GetSystemTime - RT);
End;
If I > 10 Then
Begin
Writeln('*** Over ten fails to find flax in a row, breaking out of picking ***');
Break;
End;
If InvFull Then
Begin
Writeln('*** Inventory full, heading to bank ***');
Break;
End;
If (GetSystemTime - FlaxSafe - RTimes) >= 90000 Then
Begin
Writeln('*** Time spent to picking and randoms exceeded 90 seconds ***');
Writeln(' - breaking out of picking.');
Break;
End;
If GetSystemTime - FailSafe >= 15000 Then
Begin
Writeln('*** Time from last flax picked exceeded 15 seconds ***');
Writeln(' - breaking out of picking.');
Break;
End;
Wait(100 + Random(200));
Until(Not(LoggedIn));
End;
Function FastFindBank: Boolean;
Var
X, Y: Integer;
Begin
X := MSCX;
Y := MSCY;
If FindObjTPA(X, Y, 3823205, 10, 2, 20, 20, 30, ['boot']) Then
Begin
Mouse(X, Y, 2, 2, False);
Result := ChooseOption('uickl');
If Result Then
n_FFlag(0);
End;
End;
Procedure BankWait; Forward;
Function OpenTheBank: Boolean;
Var
X: TIntegerArray;
Y, I: Integer;
Z: TPointArray;
Begin
X := [2724, 2727, 2728, 2729];
Y := 3494;
SetArrayLength(Z, 4);
For I := 0 To 3 Do
TileToMS(X[i], Y, 15, Z[i].x, Z[i].y);
SortTPAFrom(Z, Point(MSCX, MSCY));
For I := 0 To High(Z) Do
Begin
Mouse(Z[i].x, Z[i].y, 5, 5, False);
If ChooseOption('uickl') Then
Begin
Result := True;
BankWait;
Exit;
End;
End;
End;
Procedure BankWait;
Var
Safe: Integer;
Begin
Safe := GetSystemTime;
While GetColor(487, 42) <> 65536 Do
If GetSystemTime - Safe > 5000 Then
Break
Else
Wait(25);
End;
Procedure DepositFlax;
Var
X, Y: Integer;
Begin
If FindDTM(dtmFlax, X, Y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Mouse(X, Y, 2, 2, False);
ChooseOption('ll');
End;
Wait(800 + Random(400));
If InvCount > 0 Then
DepositAll;
End;
Procedure LocAndLoad(S: String);
Begin
Players[CurrentPlayer].Loc := S;
Logout;
End;
Procedure ShowStats;
Var
A, B, C: Integer;
S: String;
Begin
A := Players[CurrentPlayer].Integers[0];
B := FC;
C := Players[CurrentPlayer].Integers[1];
S := (IntToStr(B)+' / '+IntToStr(A)+'; Flax: '+IntToStr(C * 28));
Writeln('Player loc: ' + Players[CurrentPlayer].Loc);
Writeln(S);
Disguise(S);
RoundTime := RoundTime + (GetSystemTime - RoundMarker);
Try
Writeln('Average RoundTime: ' + IntToStr(RoundTime Div Counter Div 1000) + ' Seconds.');
Except
Writeln('Dodged a Divide By Zero.');
End;
End;
Procedure ScriptTerminate;
Begin
FreeDTM(DTMFlax);
End;
begin
SmartSetup('world137', True, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
SetupSRL;
LoadDTMs;
LoadPath;
DeclarePlayers;
Repeat
LoginPlayer;
SetChat('off', 2);
SetAngle(True);
Players[CurrentPlayer].Integers[0] := LoadsPerLog + Random(6);
FC := 0;
Repeat
RoundMarker := GetSystemTime;
If Not WalkTo(False) Then
Begin
LocAndLoad('Lost');
Break;
End;
Flag;
PickingLoop;
If Not LoggedIn Then Break;
If Not WalkTo(True) Then
Begin
LocAndLoad('Lost');
Break;
End;
Wait(2000 + Random(1000));
If Not OpenTheBank Then
Begin
LocAndLoad('BankFail');
Break;
End;
DepositFlax;
CloseBank;
FindNormalRandoms;
FC := FC + 1;
Inc(Players[CurrentPlayer].Integers[1]);
Counter := Counter + 1;
ShowStats;
Until(Not(LoggedIn)) or (FC > Players[CurrentPlayer].Integers[0]);
ShowStats;
NextPlayer(LoggedIn);
Until(False);
end.
Begin
SetupSRL;
SetupReflection; // this one is a must :)
// your script;
End.
well here is mine which works fine
hope this one worksSCAR Code:program New;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/Reflection.scar}
Const
LoadsPerLog = 1000;
Var
dtmFlax, FC, RoundTime, RoundMarker, Counter: Integer;
Var
FlaxPath: TPointArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'sern';
Players[0].Active := True;
End;
Procedure LoadDTMs;
Begin
dtmFlax := DTMFromString('78DA637466626078C98002B8E3F9182481342' +
'310FF07024633A09AC70C6880118904D2B64035F708A801D9758B' +
'801A7FA09A3B04D47803D5BC405511BE732FDCCD6035EE40350F5' +
'1D544ECDE8FAAC616534DF4A163A86ACC816A9EA2AA893F7D1E45' +
'0D00693916D2');
End;
Procedure LoadPath;
Begin
SetArrayLength(FlaxPath, 7);
FlaxPath[0].x := 2726;
FlaxPath[0].y := 3492;
FlaxPath[1].x := 2726;
FlaxPath[1].y := 3484;
FlaxPath[2].x := 2727;
FlaxPath[2].y := 3473;
FlaxPath[3].x := 2727;
FlaxPath[3].y := 3463;
FlaxPath[4].x := 2729;
FlaxPath[4].y := 3453;
FlaxPath[5].x := 2734;
FlaxPath[5].y := 3443;
FlaxPath[6].x := 2740;
FlaxPath[6].y := 3443;
End;
Function n_FFlag(Dist: Integer): Boolean;
Var
FlagSafe: Integer;
Begin
FlagSafe := GetSystemTime;
While FlagDistance > Dist Do
If GetSystemTime - FlagSafe >= 20000 Then
Exit
Else
Wait(20);
Result := True;
End;
Function WalkTTile(TileX, TileY: Integer): Boolean;
Var
X, Y: Integer;
Begin
TileToMinimap(TileX, TileY, X, Y);
X := X - 2 + Random(4);
Y := Y - 2 + Random(4);
If InCircle(X, Y, MMCX, MMCY, 74) Then
Begin
MFNF(X, Y, 2, 2);
n_FFlag(8);
Result := True;
Wait(25);
End;
End;
Function WalkTo(Bank: Boolean): Boolean;
Var
I: Integer;
CS: String;
Begin
If GetMMLevels('run', CS) > 40 Then
SetRun(True);
If Bank Then
Begin
For I := High(FlaxPath)-1 DownTo 0 Do
Begin
If Not WalkTTile(FlaxPath[i].x, FlaxPath[i].y) Then
Exit;
End;
End Else
For I := 1 To High(FlaxPath) Do
If Not WalkTTile(FlaxPath[i].x, FlaxPath[i].y) Then
Exit;
Result := True;
End;
Function FindFlaxes: TPointArray;
Var
CTS: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, Result, 15328935, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
End;
Function ClickFlax: Boolean;
Var
TPA: TPointArray;
X, Y, Z: Integer;
Begin
TPA := FindFlaxes;
Result := IsUpText('lax');
While (z <= High(TPA)) and (Not(Result)) Do
Begin
MMouse(TPA[z].x, TPA[z].y, 2, 2);
Result := IsUpText('lax');
z := z + 1;
End;
If Result Then
Begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
If FlagPresent Then
Begin
Flag;
Wait(500 + Random(250));
End;
End;
End;
Function InBeeKeeper: Boolean;
Var
TPA: TPointArray;
B: TBox;
Begin
FindColorsTolerance(TPA, 0, 570, 35, 688, 129, 1);
B := GetTPABounds(TPA);
Result := GetArrayLength(TPA) = (B.x2 - B.x1) * (B.y2 - B.y1) + 200;
End;
Procedure PickingLoop;
Var
FlaxSafe, FailSafe, RT, RTimes, I: Integer;
Begin
FlaxSafe := GetSystemTime;
FailSafe := GetSystemTime
Repeat
If Not ClickFlax Then
I := I + 1
Else
Begin
I := 0;
FailSafe := GetSystemTime
Wait(200 + Random(400));
RT := GetSystemTime;
If InBeeKeeper Then
Begin
Logout;
Players[CurrentPlayer].Loc := 'Beekeeper';
Exit;
End;
If FindNormalRandoms Then
If Not LoggedIn Then
Begin
Writeln('*** Unsolvable random encountered. Breaking out of picking ***');
Break;
End Else
RTimes := RTimes + (GetSystemTime - RT);
End;
If I > 10 Then
Begin
Writeln('*** Over ten fails to find flax in a row, breaking out of picking ***');
Break;
End;
If InvFull Then
Begin
Writeln('*** Inventory full, heading to bank ***');
Break;
End;
If (GetSystemTime - FlaxSafe - RTimes) >= 90000 Then
Begin
Writeln('*** Time spent to picking and randoms exceeded 90 seconds ***');
Writeln(' - breaking out of picking.');
Break;
End;
If GetSystemTime - FailSafe >= 15000 Then
Begin
Writeln('*** Time from last flax picked exceeded 15 seconds ***');
Writeln(' - breaking out of picking.');
Break;
End;
Wait(100 + Random(200));
Until(Not(LoggedIn));
End;
Function FastFindBank: Boolean;
Var
X, Y: Integer;
Begin
X := MSCX;
Y := MSCY;
If FindObjTPA(X, Y, 3823205, 10, 2, 20, 20, 30, ['boot']) Then
Begin
Mouse(X, Y, 2, 2, False);
Result := ChooseOption('uickl');
If Result Then
n_FFlag(0);
End;
End;
Procedure BankWait; Forward;
Function OpenTheBank: Boolean;
Var
X: TIntegerArray;
Y, I: Integer;
Z: TPointArray;
Begin
X := [2724, 2727, 2728, 2729];
Y := 3494;
SetArrayLength(Z, 4);
For I := 0 To 3 Do
TileToMS(X[i], Y, 15, Z[i].x, Z[i].y);
SortTPAFrom(Z, Point(MSCX, MSCY));
For I := 0 To High(Z) Do
Begin
Mouse(Z[i].x, Z[i].y, 5, 5, False);
If ChooseOption('uickl') Then
Begin
Result := True;
BankWait;
Exit;
End;
End;
End;
Procedure BankWait;
Var
Safe: Integer;
Begin
Safe := GetSystemTime;
While GetColor(487, 42) <> 65536 Do
If GetSystemTime - Safe > 5000 Then
Break
Else
Wait(25);
End;
Procedure DepositFlax;
Var
X, Y: Integer;
Begin
If FindDTM(dtmFlax, X, Y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Mouse(X, Y, 2, 2, False);
ChooseOption('ll');
End;
Wait(800 + Random(400));
If InvCount > 0 Then
DepositAll;
End;
Procedure LocAndLoad(S: String);
Begin
Players[CurrentPlayer].Loc := S;
Logout;
End;
Procedure ShowStats;
Var
A, B, C: Integer;
S: String;
Begin
A := Players[CurrentPlayer].Integers[0];
B := FC;
C := Players[CurrentPlayer].Integers[1];
S := (IntToStr(B)+' / '+IntToStr(A)+'; Flax: '+IntToStr(C * 28));
Writeln('Player loc: ' + Players[CurrentPlayer].Loc);
Writeln(S);
Disguise(S);
RoundTime := RoundTime + (GetSystemTime - RoundMarker);
Try
Writeln('Average RoundTime: ' + IntToStr(RoundTime Div Counter Div 1000) + ' Seconds.');
Except
Writeln('Dodged a Divide By Zero.');
End;
End;
Procedure ScriptTerminate;
Begin
FreeDTM(DTMFlax);
End;
begin
SmartSetup('world137', True, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
SetupSRL;
LoadHooks;
LoadDTMs;
LoadPath;
DeclarePlayers;
Repeat
LoginPlayer;
SetChat('off', 2);
SetAngle(True);
Players[CurrentPlayer].Integers[0] := LoadsPerLog + Random(6);
FC := 0;
Repeat
RoundMarker := GetSystemTime;
If Not WalkTo(False) Then
Begin
LocAndLoad('Lost');
Break;
End;
Flag;
PickingLoop;
If Not LoggedIn Then Break;
If Not WalkTo(True) Then
Begin
LocAndLoad('Lost');
Break;
End;
Wait(2000 + Random(1000));
If Not OpenTheBank Then
Begin
LocAndLoad('BankFail');
Break;
End;
DepositFlax;
CloseBank;
FindNormalRandoms;
FC := FC + 1;
Inc(Players[CurrentPlayer].Integers[1]);
Counter := Counter + 1;
ShowStats;
Until(Not(LoggedIn)) or (FC > Players[CurrentPlayer].Integers[0]);
ShowStats;
NextPlayer(LoggedIn);
Until(False);
end.
~shut
Im running it right now, ill let you know if anything goes wrong, but the only thing funny about it. As far as getting banned goes, when it goes to the feild and first gets there. It starts looking for the flax and the mouse jumps all over the screen really fast. Not to human like, but when the first plant runs out it finds the next one nicely.
Is this normal?
That's what you call a fast finder ;) It starts the finding when it's still moving, you can add a Flag; in start of PickingLoop if you want to.Quote:
Im running it right now, ill let you know if anything goes wrong, but the only thing funny about it. As far as getting banned goes, when it goes to the feild and first gets there. It starts looking for the flax and the mouse jumps all over the screen really fast. Not to human like, but when the first plant runs out it finds the next one nicely.
Is this normal?
Now this will be moved to Collecting.
Successfully compiled (2509 ms)
File access error
File access error
SRL Compiled in 6672 msec
Welcome to Runescape.
*****my name*******
Creating the NickTPA.
Player loc: Lost
0 / 18; Flax: 0
Dodged a Divide By Zero.
NextPlayer
i don't understand did everything right and i'm at seers bank...
it logs it self out wile it's creating nick TPA
make sure you use this tutorial for setting up the reflection files http://www.srl-forums.com/forum/setu...on-t36169.html and use this versioni hope i have helped you as wellSCAR Code:program New;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Reflection/Reflection.scar}
Const
LoadsPerLog = 1000;
Var
dtmFlax, FC, RoundTime, RoundMarker, Counter: Integer;
Var
FlaxPath: TPointArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'sern';
Players[0].Active := True;
End;
Procedure LoadDTMs;
Begin
dtmFlax := DTMFromString('78DA637466626078C98002B8E3F9182481342' +
'310FF07024633A09AC70C6880118904D2B64035F708A801D9758B' +
'801A7FA09A3B04D47803D5BC405511BE732FDCCD6035EE40350F5' +
'1D544ECDE8FAAC616534DF4A163A86ACC816A9EA2AA893F7D1E45' +
'0D00693916D2');
End;
Procedure LoadPath;
Begin
SetArrayLength(FlaxPath, 7);
FlaxPath[0].x := 2726;
FlaxPath[0].y := 3492;
FlaxPath[1].x := 2726;
FlaxPath[1].y := 3484;
FlaxPath[2].x := 2727;
FlaxPath[2].y := 3473;
FlaxPath[3].x := 2727;
FlaxPath[3].y := 3463;
FlaxPath[4].x := 2729;
FlaxPath[4].y := 3453;
FlaxPath[5].x := 2734;
FlaxPath[5].y := 3443;
FlaxPath[6].x := 2740;
FlaxPath[6].y := 3443;
End;
Function n_FFlag(Dist: Integer): Boolean;
Var
FlagSafe: Integer;
Begin
FlagSafe := GetSystemTime;
While FlagDistance > Dist Do
If GetSystemTime - FlagSafe >= 20000 Then
Exit
Else
Wait(20);
Result := True;
End;
Function WalkTTile(TileX, TileY: Integer): Boolean;
Var
X, Y: Integer;
Begin
TileToMinimap(TileX, TileY, X, Y);
X := X - 2 + Random(4);
Y := Y - 2 + Random(4);
If InCircle(X, Y, MMCX, MMCY, 74) Then
Begin
MFNF(X, Y, 2, 2);
n_FFlag(8);
Result := True;
Wait(25);
End;
End;
Function WalkTo(Bank: Boolean): Boolean;
Var
I: Integer;
CS: String;
Begin
If GetMMLevels('run', CS) > 40 Then
SetRun(True);
If Bank Then
Begin
For I := High(FlaxPath)-1 DownTo 0 Do
Begin
If Not WalkTTile(FlaxPath[i].x, FlaxPath[i].y) Then
Exit;
End;
End Else
For I := 1 To High(FlaxPath) Do
If Not WalkTTile(FlaxPath[i].x, FlaxPath[i].y) Then
Exit;
Result := True;
End;
Function FindFlaxes: TPointArray;
Var
CTS: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, Result, 15328935, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
End;
Function ClickFlax: Boolean;
Var
TPA: TPointArray;
X, Y, Z: Integer;
Begin
TPA := FindFlaxes;
Result := IsUpText('lax');
While (z <= High(TPA)) and (Not(Result)) Do
Begin
MMouse(TPA[z].x, TPA[z].y, 2, 2);
Result := IsUpText('lax');
z := z + 1;
End;
If Result Then
Begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
If FlagPresent Then
Begin
Flag;
Wait(500 + Random(250));
End;
End;
End;
Function InBeeKeeper: Boolean;
Var
TPA: TPointArray;
B: TBox;
Begin
FindColorsTolerance(TPA, 0, 570, 35, 688, 129, 1);
B := GetTPABounds(TPA);
Result := GetArrayLength(TPA) = (B.x2 - B.x1) * (B.y2 - B.y1) + 200;
End;
Procedure PickingLoop;
Var
FlaxSafe, FailSafe, RT, RTimes, I: Integer;
Begin
FlaxSafe := GetSystemTime;
FailSafe := GetSystemTime
Repeat
If Not ClickFlax Then
I := I + 1
Else
Begin
I := 0;
FailSafe := GetSystemTime
Wait(200 + Random(400));
RT := GetSystemTime;
If InBeeKeeper Then
Begin
Logout;
Players[CurrentPlayer].Loc := 'Beekeeper';
Exit;
End;
If FindNormalRandoms Then
If Not LoggedIn Then
Begin
Writeln('*** Unsolvable random encountered. Breaking out of picking ***');
Break;
End Else
RTimes := RTimes + (GetSystemTime - RT);
End;
If I > 10 Then
Begin
Writeln('*** Over ten fails to find flax in a row, breaking out of picking ***');
Break;
End;
If InvFull Then
Begin
Writeln('*** Inventory full, heading to bank ***');
Break;
End;
If (GetSystemTime - FlaxSafe - RTimes) >= 90000 Then
Begin
Writeln('*** Time spent to picking and randoms exceeded 90 seconds ***');
Writeln(' - breaking out of picking.');
Break;
End;
If GetSystemTime - FailSafe >= 15000 Then
Begin
Writeln('*** Time from last flax picked exceeded 15 seconds ***');
Writeln(' - breaking out of picking.');
Break;
End;
Wait(100 + Random(200));
Until(Not(LoggedIn));
End;
Function FastFindBank: Boolean;
Var
X, Y: Integer;
Begin
X := MSCX;
Y := MSCY;
If FindObjTPA(X, Y, 3823205, 10, 2, 20, 20, 30, ['boot']) Then
Begin
Mouse(X, Y, 2, 2, False);
Result := ChooseOption('uickl');
If Result Then
n_FFlag(0);
End;
End;
Procedure BankWait; Forward;
Function OpenTheBank: Boolean;
Var
X: TIntegerArray;
Y, I: Integer;
Z: TPointArray;
Begin
X := [2724, 2727, 2728, 2729];
Y := 3494;
SetArrayLength(Z, 4);
For I := 0 To 3 Do
TileToMS(X[i], Y, 15, Z[i].x, Z[i].y);
SortTPAFrom(Z, Point(MSCX, MSCY));
For I := 0 To High(Z) Do
Begin
Mouse(Z[i].x, Z[i].y, 5, 5, False);
If ChooseOption('uickl') Then
Begin
Result := True;
BankWait;
Exit;
End;
End;
End;
Procedure BankWait;
Var
Safe: Integer;
Begin
Safe := GetSystemTime;
While GetColor(487, 42) <> 65536 Do
If GetSystemTime - Safe > 5000 Then
Break
Else
Wait(25);
End;
Procedure DepositFlax;
Var
X, Y: Integer;
Begin
If FindDTM(dtmFlax, X, Y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Mouse(X, Y, 2, 2, False);
ChooseOption('ll');
End;
Wait(800 + Random(400));
If InvCount > 0 Then
DepositAll;
End;
Procedure LocAndLoad(S: String);
Begin
Players[CurrentPlayer].Loc := S;
Logout;
End;
Procedure ShowStats;
Var
A, B, C: Integer;
S: String;
Begin
A := Players[CurrentPlayer].Integers[0];
B := FC;
C := Players[CurrentPlayer].Integers[1];
S := (IntToStr(B)+' / '+IntToStr(A)+'; Flax: '+IntToStr(C * 28));
Writeln('Player loc: ' + Players[CurrentPlayer].Loc);
Writeln(S);
Disguise(S);
RoundTime := RoundTime + (GetSystemTime - RoundMarker);
Try
Writeln('Average RoundTime: ' + IntToStr(RoundTime Div Counter Div 1000) + ' Seconds.');
Except
Writeln('Dodged a Divide By Zero.');
End;
End;
Procedure ScriptTerminate;
Begin
FreeDTM(DTMFlax);
End;
begin
SmartSetup('world137', True, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
SetupSRL;
LoadHooks;
LoadDTMs;
LoadPath;
DeclarePlayers;
Repeat
LoginPlayer;
SetChat('off', 2);
SetAngle(True);
Players[CurrentPlayer].Integers[0] := LoadsPerLog + Random(6);
FC := 0;
Repeat
RoundMarker := GetSystemTime;
If Not WalkTo(False) Then
Begin
LocAndLoad('Lost');
Break;
End;
Flag;
PickingLoop;
If Not LoggedIn Then Break;
If Not WalkTo(True) Then
Begin
LocAndLoad('Lost');
Break;
End;
Wait(2000 + Random(1000));
If Not OpenTheBank Then
Begin
LocAndLoad('BankFail');
Break;
End;
DepositFlax;
CloseBank;
FindNormalRandoms;
FC := FC + 1;
Inc(Players[CurrentPlayer].Integers[1]);
Counter := Counter + 1;
ShowStats;
Until(Not(LoggedIn)) or (FC > Players[CurrentPlayer].Integers[0]);
ShowStats;
NextPlayer(LoggedIn);
Until(False);
end.
~shut
i did the reflections thing both copy and past and tortoise way.. thought maybe i messed up is that the same as the attached one?
Shuttleu, your forgot to change the reflection including ;)
oh shoot so i did
i have changed it now
~shut
finaly youres shuttleu works for me :) tyvm
To get it 2 work after u have downlaoded reflection.
CHANGE
SCAR Code:program New;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Mics/Reflection.scar}
to the beautifull
SCAR Code:program New;
{.include SRL/SRL/Misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Reflection/Reflection.scar}
got it 2 work, but loggs out after 3-4 rouns say cannot find player xD and its still there :D
hmm ok so i deleted the proggy but it ran quite nicely and picked i think 648 flax however i stopped it because i was bored but i was just wondering does reflection solve all the randoms or do we need the scripts for it? (like rsbot)
it just logs in than logs out for me
Successfully compiled (4631 ms)
SRL Compiled in 8578 msec
Welcome to Runescape.
Creating the NickTPA.
Player loc: Lost
0 / 3; Flax: 0
Dodged a Divide By Zero.
NextPlayer
Successfully compiled (3653 ms)
File access error
File access error
SRL Compiled in 5032 msec
Creating the NickTPA.
Successfully executed
Successfully compiled (3081 ms)
File access error
SRL Compiled in 5032 msec
Creating the NickTPA.
Player loc: Lost
0 / 18; Flax: 0
Dodged a Divide By Zero.
NextPlayer
read my post a few posts up
this one http://www.srl-forums.com/forum/show...5&postcount=47
~shut
I love this script!
Made 82 runs w/o a problem, stopped it manually. Forgot to save proggy though. :(
Works amazing :)
I just need 230k flax and I'm all set :p
One thing maybe is add in bank pin support
I don't know why, but I have some kind of natural hate sense about typing InPin(..) in there, and making a failsafe for it :pQuote:
Works amazing
I just need 230k flax and I'm all set
One thing maybe is add in bank pin support
Thanks :)
Lazy :p
SCAR Code:Procedure DepositFlax;
Var
X, Y: Integer;
Begin
if pinScreen then inPin(Players[CurrentPlayer].pin);
wait(100+random(80));
If FindDTM(dtmFlax, X, Y, MIX1, MIY1, MIX2, MIY2) Then
Begin
Mouse(X, Y, 2, 2, False);
ChooseOption('ll');
End;
Wait(800 + Random(400));
If InvCount > 0 Then
DepositAll;
End;
That is working for me.
SCAR Code:if pinScreen then inPin(Players[CurrentPlayer].pin);
If I do that then I have to do If InPin Else AndThisIsWhereItStartsAAARGH.
:p
Include file C:\SCAR 3.15\includes\SRL\SRL\Misc\Reflection.scar does not exist i get this error but ive downloaded and installed reflection using masterkills guide.. can u help me out please?
*** Inventory full, heading to bank ***
Player loc: BankFail
86 / 1004; Flax: 2408
Average RoundTime: 130 Seconds.
NextPlayer
ugh... read this... http://www.srl-forums.com/forum/show...5&postcount=47
~shut
omg this is one wierd script :P hehe
*** Inventory full, heading to bank ***
Player loc: Lost
2 / 11; Flax: 56
Average RoundTime: 180 Seconds.
NextPlayer
Then it just loggs out on the way to bank xD
Read in your report...
"Player loc: Lost"
I've had that problem too, I've gotten 8 loads max then it got lost... and it keeps getting lost. I don't understand it.
Also for those who don't understand how to add reflection into srl... extract this file in the "Includes" folder in SCAR.
http://mihd.net/v06kby3
Weird, shouldn't get lost, doesn't for me and apparently not this guy either, thank you very much :)
didnt get lost for me either
sorry i ran the script and my little brother pulled the plug out so i didnt get the proggy but it did around 60 runs
~shut
Well my does like 3-4 round, then pick a full load and goes to bank half way loggs out and say cant fint player
Still no problems. :)..stopped manually.
Code:Player loc:
66 / 1001; Flax: 1848
Average RoundTime: 135 Seconds.
*** Inventory full, heading to bank ***
Successfully executed
tell you what
i will run it with my brothers account and then i will post the proggy in the morning
~shut
EDIT: oh and mabey you could half the speed of the flax picking?
The problem is that when they started doing all kinds of graphical improvement shit, they made the flax picking animation slower, it's like the new bone burying animation so it's no use to click the flax faster...Quote:
EDIT: oh and mabey you could half the speed of the flax picking?
what i mean by halfing the speed it instead of it clicking the flax every 0.5 seconds mabey you could make it click the flax every 0.75 or mabey every 1 second because imo it clicks the flax too fast
oh and i found out something
when i put SetupReflection; then script only runs for about 5-10 loads but if i put LoadHooks; then it will run for as long as it can until it gets a random
dunno why but it just does :s
~shut
Ran the script overnight and lost the proggy. It was at the bank with a full invent of flax. Had 4.5k flax when I checked bank. So thats like 5 hours?
I tried running it again today and.....After it logs in, it just clicks the "run" button and then it clicks the "log out" button.