SCAR Code:
{
##### ###### ####### ## ## #####
## ## ###### ####### ## ## ## ## |
## ## ### ## ## ## ## |
#### ##### ### ## ## ##### |
## ## ### ## ## ## |
## ## ###### ### ######## ## |/
##### ###### ### ###### ## Is Below!
CREDITS:
Thanks to Kaitnieks for making scar!!!
Thanks to the person who made SRL >_>
Oh if you use this code in any of your scar programs,
Please give me credit =]
/**Settings/Requirements**
/** 1. SRL 3.70 installed
/** 2. RS V-Bright
/** 3. Dont worry about facing north >_>
/** 4. Equip Axe!!!
/** 5. Have nothing but willows in your first inven slot.
/*************************
1. Drag the Crosshair symbol onto RS.
2. Start logged in or logged out.
3. Modify Lines 22-31.
4. Press the green arrow or hold CTRL+ALT+R
5. HAVE FUN!
NOTE** This is still in testing, it works fine it just takes a while to get the willows.
}
program MrGibbletsWillowBanker;
{.include srl/srl.scar}
{.include srl/srl/skill/woodcutting.scar}
{.include srl/srl/skill/fighting.scar}
const
treecolor1 = 4550760;
treecolor2 = 3838080;
treecolor3 = 926752;
BCHM = 5299181; //Bank Symbol Color
BCDB1 = 5658720; // Bank Booth Color 1
BCDB2 = 5994116; // Bank Booth Color 2
WLC = 4221042; // Willow Log color in inven
Buckle = 2269660; //Buckle color for inven
BuckleSel = 2829182; //Selected RED for the buckle (dont change this)
var x,y:integer;
var cutting:Boolean;
var wx,wy:Integer;
var MouseFindFlag
function BankOpen:Boolean;
// We use this because BankScreen Dosent work...
var BankTextX,BankTextY:Integer;
begin
if(findcolor(BankTextX,BankTextY,2070783,178,29,337,51)) then
begin
Result:=true;
end else
begin
Result:=false;
end;
end;
function InvenOpen:Boolean;
var InvenCheckX,InvenCheckY:Integer;
begin
if(findcolor(InvenCheckX,InvenCheckY,BuckleSel,626,167,700,200)) then
begin
Result := true;
end else
begin
Result := false;
end;
end;
procedure OpenInven;
begin
if(not InvenOpen) then
begin
if(findcolor(x,y,Buckle,626,167,700,200)) then
begin
Mouse(x,y,1,1,true);
end;
end;
end;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name := 'headcase25';
Players[0].Pass := 'killer';
Players[0].Nick := 'ead'; //3 Lowercase Letters of your username
Players[0].Active := True;
End;
procedure pie;
begin
MouseFindFlag(648 + 40,83,5,5);
SetRun(true);
OpenInven;
OutFight;
MouseFindFlag(648 - 40,83,5,5);
Flag;
Wait(100 + Random(100));
end;
procedure GoBackToTrees;
begin
MouseFindFlag(621,111,5,5);
Flag;
ChopWillows;
end;
procedure Bank;
begin
if(findcolortolerance(x,y,BCHM,595,7,707,140,5)) then
begin
Mouse(x,y,4,4,true);
writeln('Found Bank, Clicking.');
Flag;
writeln('In Bank, looking for booth.');
end;
if(findcolortolerance(x,y,BCDB1,4,4,536,444,1) or
findcolortolerance(x,y,BCDB2,4,4,536,444,1) and not BankOpen) then
begin
MMouse(x,y,2,2);
if(isuptextmulti('se Bank','e Bank','Use Bank')) then
begin
writeln('Found Booth, opening bank');
Mouse(x,y,2,2,false);
ChooseOption(x,y,'quickly');
Flag;
repeat
wait(100);
writeln('Waiting for bank to open...');
until(BankOpen);
if(BankOpen) then
begin
writeln('In Bank! Depositing');
if(findcolor(x,y,WLC,560,210,735,457) and BankOpen) then
begin
Mouse(x,y,1,1,false);
ChooseOption(x,y,'All');
writeln('Deposited!');
GoBackToTrees;
end;
end;
end else
begin
Mouse((515/2)+20,338/2,1,1,true);
Bank;
end;
end;
end;
procedure ChopWillows;
begin
if(not InFight) then
begin
if(not ExistsItem(28)) then
begin
if(findcolortolerance(x,y,treecolor1,4,4,516,338,5) or
findcolortolerance(x,y,treecolor2,4,4,516,338,5) or
findcolortolerance(x,y,treecolor3,4,4,516,338,5)) then
begin
MMouse(x,y,4,4);
wx:=x;
wy:=y;
if(IsUpText('Will') or IsUpText('llow') or IsUpText('wn Wi')) then
begin
if(cutting=false) then
begin
clickmouse(x,y,true);
if(IsChatBlackTextAnyLine('You swing your axe at the tree.')) then
begin
cutting:=true;
writeln('Found Text...');
end;
wait(15000);
end else
begin
clickmouse(x,y,true);
wait(45000);
end;
end;
end;
end else
begin
Bank;
writeln('ITEM FOUND AT SLOT 28!!');
DragItem(2,25);
end;
end else
begin
RunAway;
end;
if((cutting=true) and (not findcolortolerance(x,y,treecolor1,wx,wy,wx,wy,5)
or findcolortolerance(x,y,treecolor2,wx,wy,wx,wy,5) or
findcolortolerance(x,y,treecolor3,wx,wy,wx,wy,5))) then
begin
cutting:=false;
writeln('turned off cutting');
end;
end;
procedure Run;
begin
if(LoggedIn) then
begin
MakeCompass('N');
wait(50+random(50));
HighestAngle;
repeat
ChopWillows;
until(false);
end;
end;
procedure Start;
begin
SetupSRL;
Mouse(0,0,4,4,true);
DeclarePlayers;
LoginPlayer;
end;
begin
Start;
Run;
RunAway;
end.