SCAR Code:
{==============================================================================]
[ [SRL]4 ]
[ ]
[ ]
[ NAME : Destiful Woodcutter ]
[ WRITER : The Man ]
[ CATEGORY : Woodcutting ]
[ DESCRIPTION : ]
[ ]
[==============================================================================]
[ Instructions: Please check the forums for details. ]
[==============================================================================}
{=========================Records & Vars DONT TOUCH!===========================}
program simplecutter;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
const
Rockcolour = 379494;
StartPlayer = 0;
var
x, y, RockDTM, LevelUps:integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := 'rumb'; //3-4 consecutive letters of your user
Players[0].Strings[0] := 'willow'; // Tree to chop: willow.
Players[0].Active := True; //use this player
end;
function LevelUp : Boolean; //Thanks Wizzup?
var
Lev : Integer;
begin
Result := FindNPCChatText('gratu', Nothing) or
FindNPCChatText('atio', Nothing);
if Result then
begin
while ClickContinue(True, True) do
Wait(500 + Random(250));
WriteLn(Players[CurrentPlayer].Name + ' leveled up');
Lev:= GetSkillInfo('woodcutting', False);
WriteLn(Players[CurrentPlayer].Name + '''s woodcutting level is now ' + IntToStr(Lev));
LevelUps:= LevelUps + 1;
end;
end;
procedure AntiRandom;
begin
FindNormalRandoms;
end;
procedure Proggy;
begin
writeln('Auto cutter and banker');
writeln('Ran For: '+TimeRunning+'!');
end;
Procedure Towillows;
begin
if (not(loggedin)) then exit;
GameTab(4);
RockDTM := DTMFromString('78DA633CCBC4C020CAC8800C224383C1344C9' +
'4F11C508D30AA1A370F0354351730CDF10EB2C3344702558D4F98' +
'09AA9AD340359268EEC95645557312A8461C558DB3AB0EAA9A534' +
'03522A86A1C1CAC485603004BED0DB8');
writeln('to willows');
wait(100);
if (not(loggedin)) then exit;
SetRun(True);
if (FindColorSpiralTolerance(x, y, Rockcolour, 5, 5, MMX2, MMY2, 5)) then
Mouse(x, y, 5, 5, True);
if FindDTM(RockDTM, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 0, 0, True);
end;
FindnormalRandoms;
wait(100);
end;
function walktobank: Boolean;
var
I, R, G, B, Len, TestColor: Integer;
H, S, L, X, Y, Z: Extended;
P: TPointArray;
begin
Result := False;
FFlag(0);
FindColorsTolerance(P, 13135419, MMX1, MMY1, MMX2, MMY2, 60);
Len := High(P);
for I := 0 to Len do
if RS_OnMinimap(P[I].X, P[I].Y) then
begin
TestColor := GetColor(P[I].X, P[I].Y);
ColorToRGB(TestColor, R, G, B);
if InRange(R - B, -161, -121) then
if InRange(R - G, -71, -31) then
if InRange(G - B, -110, -70) then
begin
ColorToHSL(TestColor, H, S, L);
if InRange(Round(H - L), -5, 25) then
if InRange(Round(S - H), -19, 11) then
if InRange(Round(S - L), -10, 20) then
begin
ColorToXYZ(TestColor, X, Y, Z);
if InRange(Round(X - Y), -5, 9) then
if InRange(Round(Y - Z), -48, -34) then
begin
Mouse(P[I].X, P[I].Y, 6, 6, True);
Result := True;
Exit;
end;
end;
end;
end;
WriteLn('Autocolor did not find the bank');
end;
Procedure SetVar;
Begin
Players[CurrentPlayer].Strings[0] := Lowercase(Players[CurrentPlayer].Strings[0]);
End;
function Findwillow: Boolean;
var
Colors: TIntegerArray;
X, Y, I, A, M, curCTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result := False;
if (not(LoggedIn)) then exit;
curCTS := GetColorToleranceSpeed;
Colors := [7919760, 8446096];
for I := 0 to 1 do
begin
ColorToleranceSpeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[I], MSX1, MSY1, MSX2, MSY2, 5);
if Length(TPA) = 0 then Continue;
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 10, 10);
M := High(ATPA);
for A := 0 to M do
if MiddleTPAEx(ATPA[A], X, Y) then
begin
MMouse(X, Y, 6, 6);
Wait(100 + Random(50));
if Pos('Willow', RS_GetUpText) > 0 then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, True);
Result := True;
ColorToleranceSpeed(curCTS);
Exit;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;
procedure Responder;
var
HiChats, NoobChats, AutoChats, HiChatR, NoobChatR, AutoChatR, UpChats,
UpChatR, LevelChats, YesChats : TStringArray;
I, RL, R : Integer;
begin
if (not(LoggedIn)) then
begin
Players[CurrentPlayer].Active:= False;
Exit;
end;
HiChats:= ['hi', 'yo', 'sup', 'ello', 'wassup', 'll right', 'hey', 'hai'];
HiChatR:= ['hi', 'hello there', 'sup', 'yo', 'hello', 'hey', 'howdy', 'hai'];
NoobChats:= ['noob', 'froob', 'neeb', 'choob', 'loser', 'you are a'];
NoobChatR:= ['u are', 'you r', 'u r', 'i aint', 'how am i??', 'looked in the mirror lately?'];
AutoChats:= ['autoer', 'bot', 'auto', 'cheater', 'autoing', 'cheat'];
AutoChatR:= ['no im not', 'im not a bot', 'i dont cheat!', 'me?!', 'r u serious?!', 'bots can talk??'];
UpChats:= ['gratz', 'well done', 'congratulations', 'grats', 'congratz'];
UpChatR:= ['thanks', 'ty', 'thank you', 'thx', 'thanx'];
LevelChats:= ['wc lv', 'wcing lv', 'woodcutting lev', 'wc lev'];
YesChats:= ['Yes', 'Ye', 'Yeah', 'Yea', 'Yup', 'Uh huh', 'Yep'];
for I:= 0 to High(HiChats) do
begin
if InChat(HiChats[i]) then
TypeSend(HiChatR[i]);
R:= R + 1;
end;
for I:= 0 to High(NoobChats) do
begin
if InChat(NoobChats[i]) then
TypeSend(NoobChatR[i]);
R:= R + 1;
end;
for I:= 0 to High(AutoChats) do
begin
if InChat(AutoChats[i]) then
TypeSend(AutoChatR[i]);
R:= R + 1;
end;
if LevelUp then
begin
for I:= 0 to High(UpChats) do
begin
if InChat(UpChats[i]) then
TypeSend(UpChatR[i]);
R:= R + 1;
end;
end;
for I:= 0 to High(LevelChats) do
begin
if InChat(LevelChats[i]) then
begin
R:= R + 1;
RL:= GetSkillInfo('woodcutting', False);
case Random(10) of
0: TypeSend(IntToStr(RL));
1: TypeSend('lvl '+IntToStr(RL));
2: TypeSend(IntToStr(RL) + ' over here');
3: TypeSend('level '+IntToStr(RL));
4: TypeSend('I''m ' + IntToStr(RL) + ' smithin');
5: TypeSend('only ' + IntToStr(RL));
6: TypeSend('meh, only ' + IntToStr(RL));
7: begin
case Random(5) of
0: TypeSend('onky ' + IntToStr(RL));
1: TypeSend('omly ' + IntToStr(RL));
2: TypeSend('inly ' + IntToStr(RL));
3: TypeSend('onlu ' + IntToStr(RL));
4: TypeSend('om;y ' + IntToStr(RL));
end;
case Random(5) of
0: TypeSend('only*');
1: TypeSend('*only');
2: TypeSend('Sorry, *only');
3: TypeSend('I meant "only"');
4: TypeSend('*only ' + IntToStr(RL));
end;
end;
8: case Random(3) of
0: TypeSend('My wcing is ' + IntToStr(RL));
1: TypeSend('My woodcutting is ' + IntToStr(RL) + '...8-)');
2: TypeSend('It''s ' + IntToStr(RL));
end;
9: begin
TypeSend('Me?');
Wait(2500 + Random(1500));
for I:= 0 to High(YesChats) do
if InChat(YesChats[i]) then
TypeSend(IntToStr(RL));
end;
end;
end;
end;
end;
Procedure isfull;
Var
Logs, X, Y, I : Integer;
Box : TBox;
Begin
Logs := DTMFromString('78DA63DCC8C4C0F08A010D30229140FA2450C' +
'D4D026AB601D5DC25A0E61450CD23026ACE01D5BC26A0663750CD' +
'47FC6A00BF630A00');
IncEx(Players[CurrentPlayer].Integers[2], CountItemsIn('inv', 'dtm', Logs, []));
IncEx(ReportVars[1], CountItemsIn('inv', 'dtm', Logs, []));
For I := 1 To 28 Do
Begin
Box := InvBox(I);
If FindDTM(Logs, X, Y, Box.X1, Box.Y1, Box.X2, Box.Y2) Then
Begin
walktobank;
End;
End;
FreeDTM(Logs);
Players[CurrentPlayer].Loc := 'dropped logs';
End;
Procedure Depositwillows;
var InvItems : boolean;
I : integer;
begin
for I := 1 to 28 do
if ExistsItem(i) then
begin
InvItems := true;
break;
end;
if InvItems then
MouseBox(381, 298,410, 318,1);
end;
procedure AntiBanage;
begin
case Random(10) of
0:
begin
HoverSkill('mining', false);
end;
1:
begin
MakeCompass('random');
end;
2:
begin
Wait(1000 + Random(200));
end;
3:
begin
RandomMovement;
end;
4:
begin
RandomRClick;
end;
5:
begin
HoverSkill('random', false);
end;
6:
begin
GameTab(3);
end;
end;
end;
procedure setupScript;
begin
cleardebug;
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
setupsrl;
ScriptID := '1058';
mousespeed := 13; // to fast. 13 is better
declareplayers;
activateclient;
wait(500);
end;
begin
setupScript;
SMARTSetupEx(29, False, True, False);
SetTargetDC(SMARTGetDC);
if (not (LoggedIn)) then
begin
Loginplayer;
setangle(true);
Wait(500 + random(30))
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
end;
repeat
if not (loggedIn) then
begin
nextplayer(false);
LoginPlayer;
end;
//end;
begin
logout;
if howManyPlayers = 1 then
wait(random(600000));
nextplayer(true);
LoginPlayer;
end;
Towillows;
Findwillow;
isfull;
walktobank;
Depositwillows;
until (false);
end.