SCAR Code:
{//////////////////////////////////////////////////////////////////////////////} program
Flax0r_Kthx;
{.include SRL/SRL.scar}
{//////////////////////////////////////////////////////////////////////////////
Setup
//////////////////////////////////////////////////////////////////////////////}
const
HowTrips = 120 ; // How Many Trips ?
UserName = 'username' ; //RS UserName
PassWord = 'password' ; //RS PassWord
Treesym = 86529; //Color of the tree symbol
Flaxcol = 407832; //Color of the flax on the mini
FlaxMSC = 1666639; //Color of the flax on the MainScreen
BankSym = 4636122; // BankSym Color in Bank House (MiniMap)
{//////////////////////////////////////////////////////////////////////////////
Script Procedures
//////////////////////////////////////////////////////////////////////////////}
var
trips, PerHours: integer;
i: integer;
blarg: integer;
procedure Randoms;
begin
FindNormalRandoms;
// if(FindFight)then RunAway;
end;
procedure RandomWait(waittime, randtime: integer);
begin
if(randtime = waittime)then
begin
randtime := waittime + 2;
end;
wait(100 * waittime + random(100 * randtime));
end;
procedure NotFind(Col: string);
begin
Logout;
Writeln('Could not find the ' + col);
Writeln('Restart the script please.');
Terminatescript;
end;
procedure WalkFlax;
var
x, y: integer;
begin
x := 647;
y := 77;
if(FindColorSpiraltolerance(x, y, BankSym, 581, 15, 738, 132,50))then
begin
Mouse(x, y + 17, 2, 2, True);
end else
begin
NotFind('bank symbol');
end;
RandomWait(3, 5);
HumanFlag(10);
x := 650;
y := 121;
if(FindColorSpiraltolerance(x, y, Treesym, 563, 78, 721, 162,20))then
begin
Mouse(x - 12, y + 27, 3, 2, True);
end else
begin
NotFind('tree symbol(First Step)');
end;
SetRun(True);
GameTab(4);
RandomWait(3, 5);
flag;
x := 653;
y := 121;
if(FindColorSpiraltolerance(x, y, Treesym, 565, 114, 744, 163,10))then
begin
Mouse(x + 11, y + 19, 2, 2, True);
end else
begin
NotFind('tree symbol(Second step)');
end;
RandomWait(3, 5);
HumanFlag(10);
x := 638;
y := 49;
if(FindColorSpiraltolerance(x, y, Treesym, 595, 48, 668, 107,10))then
begin
Mouse(x + 50, y + 41, 4, 4, True);
end else
begin
NotFind('tree symbol(Third step)');
end;
RandomWait(3, 5);
flag;
x := 648;
y := 83;
if(FindColorSpiraltolerance(x, y, Flaxcol, 648, 101, 797, 145,10))then
begin
Mouse(x, y, 1, 2, True);
end else
begin
Writeln('Could Not Find Flax Color... Using Coords')
wait(245+random(589))
Mouse(674,112,1,1,true)
flag;
end;
RandomWait(3, 5);
HumanFlag(10);
end;
procedure WalkBank;
var
x, y, i: integer;
begin
While(not(Findcolor(x, y, Treesym, 576, 44, 654, 89)) and (i < 5))do
begin
Mouse(614, 74, 5, 5, True);
if(Trips < 4 + random(3))then
SetRun(False);
HumanFlag(5);
i := i + 1;
end;
x := 541;
y := 87;
if(FindColorSpiraltolerance(x, y, Treesym, 566, 36, 711, 138,20))then
begin
Mouse(x + 47, y - 18, 2, 2, True);
end else
begin
NotFind('tree symbol(To bank)');
end;
RandomWait(3, 5);
flag;
x := 631;
y := 80;
if(FindColorSpiraltolerance(x, y, Treesym, 588, 50, 646, 97,10))then
begin
Mouse(x + 7, y - 36, 2, 2, True);
end else
begin
NotFind('tree symbol(Step two towards the bank)');
end;
RandomWait(3, 5);
flag;
x := 647;
y := 43;
if(FindColorSpiraltolerance(x, y, Treesym, 607, 26, 715, 103,10))then
begin
Mouse(x - 15, y - 12, 2, 2, True);
end else
begin
NotFind('tree symbol(Step three towards the bank)');
end;
begin
If(FindColorSpiraltolerance(x, y, BankSym, 547, 8, 733, 61,10))then
Mouse(x,y,1,1,true)
flag;
end;
end;
procedure PickingFlax;
var
x, y :integer;
begin
randoms;
repeat
if(findobj(x,y,'Pick',FlaxMSC,15))then
mouse(x,y,1,1,true)
Flag;
wait(250+random(186))
until(InvFull)or(IsChatMessage('carry'))
randoms;
end;
procedure Bank;
var
x, y: integer;
begin
if(Findcolortolerance(x, y, BankSym, 619, 40, 680, 117,10))then
begin
flag;
OpenBankColor(10328990)
RandomWait(2, 5);
DepositAll;
RandomWait(2, 5);
CloseWindow;
RandomWait(1, 3);
end else
if(FindColortolerance(x, y, BankSym, 558, 12, 743, 115,10))then
begin
Mouse(x, y, 3, 3, True);
Flag;
OpenBankColor(10328990)
RandomWait(2, 5);
DepositAll;
RandomWait(2, 5);
CloseWindow;
RandomWait(1, 3);
end else
begin
Writeln('You'#39're not in the bank!');
LogOut;
TerminateScript;
end;
end;
procedure ProgressReport;
begin
PerHours := (Trips * 28) / ScriptTime(2) * 60;
ClearDebug;
Writeln(' ');
Writeln(' Pwnd'#39's Flax0r, kthx.');
Writeln(' ');
Writeln('You'#39've picked ' + inttostr(Trips * 28) + ' flax!');
Writeln('Travelled '+inttostr(Trips)+'/'+inttostr(HowTrips)+' Trips To Flax Field ')
Writeln('Script has been running for ' + ScriptTime2(2));
Writeln('That is roughly ' + inttostr(PerHours) + ' per hour.');
end;
procedure StartTehScriptPlocks;
begin
if((UserName = '') and (PassWord = ''))then
begin
Writeln('Please, Put your UserName And Password On correct lines');
Writeln('Fix this and restart the script please.');
LogOut;
TerminateScript;
end else
if((not(UserName = '')) and (not(PassWord = '')))then
begin
Cleardebug;
Writeln('Thanks to Pwnd Because of this awsome Script.. I tried to update it to SRL..')
Writeln('Hello ' + UserName);
Writeln('Welcome and have fun!');
Writeln('The Flax0r will begin soon, kthx!');
Wait(2000 + random(1000));
Writeln('Now!');
end;
end;
begin
//Tih := 0;
Trips := 0;
SetupSRL;
StartTehScriptPlocks;
if(FindColortolerance(x, y, BankSym, 550, 6, 738, 149,10))then
begin
repeat
WalkFlax;
PickingFlax;
Walkbank;
Bank;
Trips := Trips + 1;
ProgressReport;
until(Trips >=HowTrips);
Writeln('Done')
logout;
end else
if(FindColor(x, y, FlaxMSC, 5, 5, 545, 340))then
begin
blarg:=1;
repeat
if(isfunctionkeydown(1)) then
blarg:=0
PickingFlax;
WalkBank;
Bank;
WalkFlax;
Trips := Trips + 1;
ProgressReport;
Writeln(' pmg you have picked 27 more flax !');
until (false)
end;
end.