Simba Code:
program cFlax;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SPS/sps-osr.simba}
Const
Lagg = 2000; //Change To Adjust Wait Time To Make Up For Your Lag
FlaxPrice = 50; //Change To The Ammount You Will Be Selling The Flax For
FlaxCol = 15131288;
BankCol = 8229016;
AntiFreq = 20; //The Lower, the More Antiban
Version = '1.4';
var
MyLoc: TPoint;
PBox: TBox;
secs,mins,hours,Tot,x,y,rand,Inv,FlaxPicked : Integer ;
MonPerHour,MoneyMade :Extended;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Enter Username
Players[0].Pass :=''; //Enter Password
Players[0].Nick :=''; //Enter Nick
Players[0].Active:=True;
End;
Procedure BankItems;
var
x,y: integer;
begin
MakeCompass(0);
repeat
if FindObj(x, y, 'ank' , BankCol, 2) then
begin
MMouse(x,y,5,5);
ClickMouse(x,y,1);
wait(Lagg);
end;
until(BankScreen)
//writeln('We Have Found A Bank')
wait(Lagg/2);
DepositAll;
FlaxPicked := FlaxPicked + 28;
//writeln('We Have Finished Banking')
CloseBank;
end;
Procedure ToField;
begin
MakeCompass(180);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);
SetRun(True)
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
SPS_WalkPath([Point(2720, 2711), Point(2723, 2717), Point(2724, 2728), Point(2726, 2737), Point(2729, 2747), Point(2729, 2755), Point(2726, 2761), Point(2731, 2769), Point(2732, 2779), Point(2734, 2791), Point(2734, 2800), Point(2736, 2811), Point(2738, 2822), Point(2740, 2832), Point(2739, 2839), Point(2742, 2849), Point(2745, 2857), Point(2748, 2865), Point(2752, 2874), Point(2753, 2887), Point(2755, 2897), Point(2760, 2906), Point(2771, 2911), Point(2776, 2918), Point(2785, 2920), Point(2796, 2921), Point(2805, 2921), Point(2810, 2916), Point(2810, 2909), Point(2810, 2901), Point(2809, 2894), Point(2806, 2891), Point(2799, 2885), Point(2792, 2883), Point(2784, 2886), Point(2783, 2891), Point(2783, 2899), Point(2783, 2907), Point(2790, 2910), Point(2800, 2910), Point(2799, 2900), Point(2795, 2897), Point(2793, 2897), Point(2791, 2899), Point(2781, 2880)]);
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
end;
Procedure ToBank;
begin
MakeCompass(180);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);
SetRun(True)
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
SPS_WalkPath([Point(2781, 2880), Point(2791, 2899), Point(2793, 2897), Point(2795, 2897), Point(2799, 2900), Point(2800, 2910), Point(2790, 2910), Point(2783, 2907), Point(2783, 2899), Point(2783, 2891), Point(2784, 2886), Point(2792, 2883), Point(2799, 2885), Point(2806, 2891), Point(2809, 2894), Point(2810, 2901), Point(2810, 2909), Point(2810, 2916), Point(2805, 2921), Point(2796, 2921), Point(2785, 2920), Point(2776, 2918), Point(2771, 2911), Point(2760, 2906), Point(2755, 2897), Point(2753, 2887), Point(2752, 2874), Point(2748, 2865), Point(2745, 2857), Point(2742, 2849), Point(2739, 2839), Point(2740, 2832), Point(2738, 2822), Point(2736, 2811), Point(2734, 2800), Point(2734, 2791), Point(2732, 2779), Point(2731, 2769), Point(2726, 2761), Point(2729, 2755), Point(2729, 2747), Point(2726, 2737), Point(2724, 2728), Point(2723, 2717), Point(2720, 2711)]);
MyLoc := sps_getMyPos;
//Writeln('SPS returns ' + inttostr(myloc.x) + ',' + inttostr(myloc.y));
end;
function FindFlax(var fx, fy: Integer): Boolean;
var
arP: TPointArray;
ararP: T2DPointArray;
tmpCTS, i, arL: Integer;
P: TPoint;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.29, 0.85);
if not(FindColorsTolerance(arP, 6399256, MSX1, MSY1, MSX2, MSY2, 30)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('lax')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
Exit;
end;
GetMousePos(fx, fy);
end;
Function Antiban: Boolean;
begin
case random(2) of
//1: HoverSkill('strength', false);
1: MakeCompass(RandomRange(0,359));
end;
end;
procedure Proggy;
begin
ClearDebug;
ConvertTime(GetTimeRunning,hours,mins,secs);
MoneyMade := FlaxPicked * FlaxPrice / 1000;
MonPerHour := MoneyMade * 3600000 / GetTimeRunning;
WriteLn(' cFlax Version: '+Version);
WriteLn(' ');
WriteLn(' FlaxPicked: ' + intToStr(FlaxPicked));
WriteLn(' TimeRunning: ' + inttostr(hours)+ ' Hours, ' + inttostr(mins) + ' Minutes ' + inttostr(secs) + ' Seconds');
WriteLn(' Money Made: ' + floattoStr(MoneyMade) + 'K GP');
WriteLn(' Making: ' + floattoStr(Round(MonPerHour)) + 'K GP Per Hour');
end;
begin
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
wait(lagg);
MouseSpeed := 15;
PBox := IntToBox(220, 140, 300, 200);
SPS_AnyAngle := True;
SPS_Setup(runescape_surface, ['6_6', '6_7']);
if InvCount > 0 then
begin
ToBank;
BankItems;
end;
While(True) Do
begin
If not LoggedIn Then
Begin
LogInPlayer;
If FindNormalRandoms then
begin
Logout;
TerminateScript;
end;
end;
While(LoggedIn) do
begin
ToField;
repeat
FindFlax(x, y);
MMouse(x,y,3,3);
ClickMouse(x,y,1);
While (AveragePixelShift(PBox, 250, 500) > 100) do
begin;
wait(200);
rand := RandomRange(0,AntiFreq);
if rand = 1 then
begin
Antiban;
end;
end;
until(InvCount = 28)
writeln('We Have A Full Inv');
ToBank;
BankItems;
Proggy;
end;
end;
end.