SCAR Code:
{=========================================================================]
[ Rimmington Willow Killer V0.5 ]
[ ]
[ NAME : Rimmington Willow Killer V0.5 ]
[ WRITER : Born2Code ]
[ CATEGORY : Woodcutting ]
[ DESCRIPTION : Chops willows in the Rimmington and can sell, ]
[ drop, and/or turn them into fire. ]
[ USAGE : Start at Willows ]
[ PROGGIES : Post at TravDev.freehostia.com ]
[ AUTOCOLOR : Yes ]
[ ]
[ You must post your proggie at ]
[ TravDev.freehostia.com ]
[=========================================================================]
[ SETUP ]
[=========================================================================]
[ 1. USE Runescape with Low Detail, Very Bright. ]
[ 2. Set your Screen to 32 bit TRUE color. ]
[ 3. Set Playernames and Passwords in the form by clicking SetupPlayers. ]
[ 4. Start script Logged Out / Logged in ]
[ 5. Go to TravDev.freehostia.com and register! (required to use script) ]
[=========================================================================]
[ Credits to : ]
[ Lorax/Sumilion --> For Description Block (this) ]
[ JAD --> ENT ]
[=========================================================================}
program RimmingtonWillowKiller;
{.include srl/srl.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
const
AOL= 50;//Amount of loads per player
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'USER';
Players[0].Pass := 'PW';
Players[0].Nick := 'NN';
Players[0].Active := True;
Players[0].Boolean2 := False; //Is axe equipped?
end;
var
BrokenAxeDTM, AxeDTM: Integer;
BrokenAxe: Boolean;
Tries, ENTs, Talked, WillowDTM, TotalTime, CurrentCuttingTime, CutTime, Loads, TLoads: integer;
{...><> ENT Procedures <><...}
procedure LoadDTMs;
begin
Status('Loading all DTMs');
AxeDTM := DTMFromString('78DA633CCEC4C0D0CBC800021012C2E247E23' +
'39E02AA994840CD11A09A7904D45C07AAE926A0E602504D2B0135' +
'97F1ABF90F04002C1A0CA1');
end;
///////////////////////////////////////////////////
////// My Ent checker/handler //////
/////////////////////////////////////////////////
function CheckForEnt: Boolean;
var TPA: TPointArray;
begin
if(not(LoggedIn))then
Exit;
if(FindColorTolerance(x,y,55255,6,6,117,27,10))or
(FindColorTolerance(x,y,976101,6,6,117,27,10))then
begin
if(not(IsUpText('op'))) and (not(IsUpText('own')))then
Exit;
wait(1);
FindColorsSpiralTolerance(x,y,TPA,55255,6,6,117,27,10);
if(GetArrayLength(TPA) - 1 > 4)then
begin
Result := True;
Writeln('We found an ent!! Trying to avoid now..');
Mouse(648,84,3,3,true);
FFlag(0);
FTWait(60+random(5));
if(Players[CurrentPlayer].Boolean2)then
GameTab(5) else
GameTab(4);
Result := FindDTM(x,y,AxeDTM,MIX1,MIY1,MIX2,MIY2);
if(Result)then
begin
Writeln('Whew! We avoided the ent.. Carrying on with chopping');
Ents := Ents + 1;
Exit;
end else
begin
if(FindDTM(x,y,BrokenAxeDTM,MIX1,MIY1,MIX2,MIY2))then
begin
Writeln('Oh darn.. We broke an axe :( going to check if you have extras in the bank');
BrokenAxe := True;
Exit;
end;
end;
end;
Result := False;
end;
end;
{...><> Sig and Proggie Procedures <><...}
procedure Signature;
begin
ChangeReportWidth(220);
Status('Starting Up....');
WriteLn(' __________________ ');
Wait(250);
WriteLn(' | | __ ');
Wait(250);
WriteLn(' |_______ ______| |__| ');
Wait(250);
WriteLn(' | |__ _______ __ _____ _________ ');
Wait(250);
WriteLn(' | | |/__\ \ \ / / |/ ______/ ');
Wait(250);
WriteLn(' | | / ___ \ \ / /| | \______ ');
Wait(250);
WriteLn(' | | | | | \ \/ / | |\_____ \ ');
Wait(250);
WriteLn(' | | | |___| \ / | |______/ / ');
Wait(250);
WriteLn(' |_____|__|________/\__\__/ |__|\_______/ ');
Wait(250);
WriteLn(' Rimmington Willow Killer | Version V0.1 ');
Wait(6000);
end;
procedure Proggie;
begin
Writeln('//==================Progress Report==================\\');
Writeln('Thank you for using Rimmington Willow Killer!');
Writeln('Cut for ' + IntToStr(TotalTime/60000/60000) + ' minutes!');
Writeln('Cut approx. ' + IntToStr(TLoads*28) + ' logs!');
Writeln('Sold '+ IntToStr(TLoads) + ' time(s)!');
Writeln('Chatted '+ IntToStr(Talked) + ' time(s)!');
Writeln('Avoided '+ IntToStr(ENTs) + ' ENTs!');
Writeln('Visit me at www.travdev.freehostia.com!');
Writeln('Please post this proggie at http://travdev.freehostia.com!');
Writeln('\\=================End Progress Report================//');
Writeln('Script by: Travis AKA born2code!');
end;
procedure LoadDTMs1;
begin
WillowDTM := DTMFromString('78DA633CCCC4C0B09591011984FBC933FC07D' +
'220D1FF40C07804A8E610AA1A882C8C04D217806AF61250B307A8' +
'E6280135DB806A0E1250B31DA866230135207FAD27A0E60C50CD6' +
'6026A4E03D51C20A0660B50CD76026A36110E1F000AE51642');
end;
{...><> Randoms Procedures <><...}
procedure Nothing;
begin
end;
procedure AD;
begin
if(not(LoggedIn))then
Exit;
Talked:=Talked+1
case random(19) of
0: TypeSend('*yawns*');
1: TypeSend('Wc lvls?');
2: TypeSend('Bored...');
3: TypeSend('Tired...');
4: TypeSend('Wc is boring.');
5: TypeSend('Noobs');
6: TypeSend('Nubs');
7: TypeSend('Cocoon means Noob');
8: TypeSend('Travis Rocks!');
9: TypeSend('I need a break.');
10: TypeSend('I need to sleep.');
11: TypeSend('This game is addictive.');
12: TypeSend('I liked Runescape Classic better...');
13: TypeSend('Runescape 2 isnt that good.');
14: TypeSend('I dont like the new Varrock.');
15: TypeSend('Im sleepy.');
16: TypeSend('This is boring.');
17: TypeSend('Jagex is smart.');
18: TypeSend('This kid named Travis is amazing!');
end;
end;
function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i := 1 to 16 do
begin
case I of
1: CloseWindow;
2: if FindTalk then
Result := True;
3: if FindDead then
Result := True;
4: if FindMod then
Result := True;
5: if FindMime then
Result := True;
6: if FindMaze then
Result := True;
7: if FindQuiz then
Result := True;
8: if FindDemon then
Result := True;
9: if FindScapeRune then
Result := True;
10: if FindTalk then // Call it twice
Result := True;
11: if FindLamp('Woodcutting') then // Maybe we missed it?
Result := True;
12: if (FindNewBox) then
begin
Result := True;
if (UseBoxSolver) then
SolveBox
else
GambleNewBox;
end;
13: if FindTrade then
Result := True;
14:
begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
15: SaveToChatLog;
16: if RC then
Result := True;
end;
Wait(1);
end;
end;
procedure AntiBaning;
begin
if(not(LoggedIn))then
Exit;
case Random(12) of
0,9,10,11: begin
HoverSkill('random', false);
wait(1000+random(750));
GameTab(4);
end;
3: PickUpMouse;
4: MouseBox(MMX1,MMY1,MMX2,MMY2,3);
5: SleepAndMoveMouse(5000+random(6000));
6: begin
GameTab(2 + Random(12));
wait(2000+random(1500));
GameTab(4);
end;
7: begin
GameTab(6 + Random(12));
wait(1500+random(700));
GameTab(4);
end;
8: begin
HoverSkill('Defence', false);
wait(4000+random(550));
GameTab(4);
end;
end;
end;
procedure Randoms;
begin
if(not(LoggedIn)) then Exit;
CheckForEnt;
FindFastRandoms;
FindNormalRandoms;
if (FindFight) then
begin
Status('Running....')
RunAwayDirection('E');
Wait(8500 + random(3500));
RunBack;
end;
case Random(8) of
0,2,4,6: begin
Nothing;
end;
1,5,7: begin
AntiBaning;
end;
3: begin
AD;
end;
end;
end;
{...><> Chopping Procedures <><...}
procedure ChopWillows;
begin
repeat
if(not(LoggedIn)) then Exit;
HighestAngle;
MakeCompass('N');
if(not(FindObj(x,y,'illow',4280416,5))) then
begin
Tries:=0
repeat
Wait(250+random(634));
if(Tries=20) then
begin
Writeln('Couldnt find Willows!');
Logout;
end;
Tries := Tries + 1
until FindObj(x,y,'illow',4280416,5);
end;
Mouse(x,y,3,4,true)
Wait(9000+random(2580));
Randoms;
until(InvFull) or (TimeFromMark(CutTime) >= 15*60000+random(60700));
end;
{...><> Dropping Procedures <><...}
procedure Drop;
begin
Dropto(3, 28);
end;
{...><> Walking Willow Procedures <><...}
procedure WalkWillows;
begin
if(not(LoggedIn)) then Exit;
HighestAngle;
MakeCompass('N');
if(not(FindSymbol(x,y,'water'))) then
begin
Tries:=0
repeat
Wait(500+random(500));
if(Tries=30) then
begin
Logout;
end;
Tries:=Tries+1
until FindSymbol(x,y,'water');
end;
Mouse(x,y,2,2,true);
Wait(550+random(550));
RadialWalk(FindRoadColor,180,90,70,2,2);
FFlag(0);
if(not(FindSymbol(x,y,'quest'))) then
begin
Tries:=0
repeat
Wait(500+random(500));
if(Tries=30) then
begin
Logout;
end;
Tries:=Tries+1
until FindSymbol(x,y,'quest');
end;
Mouse(x,y,2,2,true);
Wait(550+random(550));
FFlag(0);
RadialWalk(FindWaterColor,180,160,70,2,2);
FFlag(0);
end;
{...><> Selling Procedures <><...}
procedure WalkGeneralStore;
begin
if(not(LoggedIn)) then Exit;
HighestAngle;
MakeCompass('N');
if(not(FindSymbol(x,y,'quest'))) then
begin
Tries:=0
repeat
Wait(500+random(500));
if(Tries=30) then
begin
Logout;
end;
Tries:=Tries+1
until FindSymbol(x,y,'quest');
end;
Mouse(x,y,2,2,true);
Wait(550+random(550));
RadialWalk(FindRoadColor,290,330,70,2,2);
Flag;
if(not(FindSymbol(x,y,'store'))) then
begin
Tries:=0
repeat
Wait(500+random(500));
if(Tries=30) then
begin
Logout;
end;
Tries:=Tries+1
until FindSymbol(x,y,'store');
end;
Mouse(x,y,2,2,true);
Wait(550+random(550));
FFlag(0);
end;
procedure ShopKeeper;
begin
if(not(LoggedIn)) then Exit;
LowestAngle;
MakeCompass('N');
if(not(FindObj(x,y,'hop',12174018,20))) then
begin
Tries:=0
repeat
Wait(250+random(634));
if(Tries=20) then
begin
Writeln('Couldnt find Shop Keeper!');
Logout;
end;
Tries := Tries + 1
until FindObj(x,y,'hop',12174018,20);
end;
Mouse(x,y,0,0,False);
wait(500+random(250));
ChooseOption(x, y, 'rade');
end;
procedure SellWillows;
var
CBBM, CBx, CBy: Integer;
begin
if(not(LoggedIn)) then Exit;
repeat
if (FindDTM(WillowDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
Mouse(x,y,2,2,false);
Wait(200+random(95));
case Random(3) of
0: begin
ChooseOption(x,y,'Sell 10');
end;
1: begin
ChooseOption(x,y,'Sell 5');
end;
2: begin
ChooseOption(x,y,'Sell 1');
end;
end;
Wait(800+random(550));
until(Not (FindDTM(WillowDTM, x, y, MIX1, MIY1, MIX2, MIY2)));
CBBM := BitmapFromString(4, 3, 'z78DA3330000243030CD2C' +
'CC4D4DC848008320900F6350DC1');
if FindBitmapToleranceIn(CBBM, CBx, CBy, 450, 30, 500, 50, 50) then
begin
MMouse(CBx, CBy, 4, 4);
GetMousePos(CBx, CBy);
Mouse(CBx, CBy, 0, 0, True);
end;
FreeBitmap(CBBM);
end;
procedure Sell;
begin
WalkGeneralStore;
Wait(1500+random(250));
ShopKeeper;
Wait(12000 + random(3750));
SellWillows;
WalkWillows;
end;
{...><> Loop/Extra Procedures <><...}
procedure DropOrSell;
begin
case Random(4) of
0: begin
Drop;
end;
1,2,3: begin
Sell;
end;
end;
end;
procedure Loop;
begin
if(not(LoggedIn)) then Exit;
repeat
if(not(LoggedIn)) then Exit;
SetChat('hide', 1);
SetChat('off', 2);
SetChat('on', 3);
HighestAngle;
MakeCompass('N');
MarkTime(CutTime);
MarkTime(CurrentCuttingTime);
repeat
ChopWillows;
until(InvFull) or (TimeFromMark(CurrentCuttingTime) >= 15*60000+random(60700));
DropOrSell;
Loads:=Loads+1
Tloads:=Tloads+1
Proggie;
Until (Loads=AOL);
NextPlayer(True);
Loads:=0;
Exit;
end;
begin
MarkTime(TotalTime);
ClearReport;
ClearDebug;
SetupSRL;
LoadDTMs1;
LoadDTMs;
Signature;
ActivateClient;
DeclarePlayers;
if(not(LoggedIn)) then LoginPlayer;
repeat
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
If(not(LoggedIn))then NextPlayer(False);
Loop;
Until (False);
end.