Dark Arcana
2009-05-17 08:56:23
3 Years
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
My brother (Joseph Pogi3)
What is your general programming knowledge?
A bit of Visual Basic and Scar
Are you a member of any other communities?
- Rs-hacking.com
- RsBot.org
- Freddy1990.com
Tell us about yourself…
From: Dark Arcana
I am 12 years old, I like playing sport, and love learning new things.
Please show us one (or multiple) of your wonderful scripts.
program DA_Willow_Crusher;
{$DEFINE SMART }
{$IFDEF SMART }
{.Include SRL/SRL/Misc/Smart.Scar}
{$ENDIF}
{.Include SRL/SRL.Scar}
{.Include SRL/SRL/Misc/Users.Scar}
{.Include SRL/SRL/Misc/Trade.Scar}
{.Include SRL/SRL/Skill/Magic.Scar}
var
DASRLID, DASRLPassword: string;
x, y, Lvls, TotalLoads, TotalWillows, Responded, AntiBans,
Trades, NestsFound, LoadsDone, WcSkill, Bank, JoinChat: Integer;
const
ScriptVersion = ' V.4';
SkillLamp = 'woodcutting';
procedure Sig;
begin
ClearDebug;
Writeln('________ ____ _____ ');
Wait(500);
Writeln('\______ \ _____ _______| | __ / _ \_______ ____ _____ ____ _____ ');
Wait(500);
Writeln(' | | \\__ \\_ __ \ |/ / / /_\ \_ __ \_/ ___\\__ \ / \\__ \ ');
Wait(500);
Writeln(' | ` \/ __ \| | \/ < / | \ | \/\ \___ / __ \| | \/ __ \');
wait(500);
Writeln('/_______ (____ /__| |__|_ \ \____|__ /__| \___ >____ /___| (___ /');
Wait(500);
Writeln(' \/ \/ \/ \/ \/ \/ \/ \/ ');
Wait(500);
Writeln(' Da Willow Crusher' + (ScriptVersion));
Wait(500);
end;
procedure CheckWcLvl;
var
WoodCuttingLevel: Integer;
begin
if not loggedin then
Exit;
WoodCuttingLevel := GetSkillInfo('Woodcutting', False);
WriteLn('Players Woodcutting level is ' + IntToStr(WoodCuttingLevel));
if (WoodCuttingLevel < 30) then
begin
Writeln('You need atleast 30 woodcutting to chop willows');
NextPlayer(False);
end;
end;
function DAFindDirtRoadColor: Integer;
var
II, CTS: Integer;
TPA: TPointArray;
TIA: TIntegerArray;
begin
Result := 0;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.63, 0.28);
if (FindColorsTolerance(TPA, 2183262, MMX1, MMY1, MMX2, MMY2, 10)) then
begin
FilterPointsPie(TPA, 0.0, 360.0, 0.0, 76.0, MMCX, MMCY);
SortTPAFrom(TPA, Point(MMCX, MMCY));
TIA := GetColors(TPA);
for II := 0 to High(TIA) do
if (CountColor(TIA[II], MMX1, MMY1, MMX2, MMY2) > 300) then
begin
Result := TIA[II];
Break;
end;
if (Result > 0) then
WriteLn('Dirt Road Color = ' + IntToStr(Result))
else
WriteLn('Could not find Dirt Road Color!');
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
end;
end;
procedure LoadAxeDTMs;
var
AxeDTM, Axe, Dragon: Integer;
begin
Axe := DTMFromString('78DA633CCCC4C0E0CAC8800CCCBC431874804' +
'220D1FF40C0B80DA8261A550D44164602E97D40358E04D46C07AA' +
'0926A06637A67B30D49C04AA71C1AF0600AAD30B51');
// Credits to ZephyrsFury for this dragon axe DTM
Dragon := DTMFromString('78DA63F4676460B800C448205C989B810B488' +
'344FF0301A30790751A550D44164602696720EB2201355E40D655' +
'026A6C81AC2704D404035937F1AB01006E8F0B4B');
AxeDTM := Dragon and Axe;
end;
function CheckForAxe: string;
var
Axe: array[0..8] of string;
i, AxeDTM: Integer;
begin
if not loggedin then
Exit;
Axe[0] := 'Dragon hatchet';
Axe[1] := 'Rune hatchet';
Axe[2] := 'Adamant hatchet';
Axe[3] := 'Mithril hatchet';
Axe[4] := 'Black hatchet';
Axe[5] := 'Steel hatchet';
Axe[6] := 'Iron hatchet';
Axe[7] := 'Bronze hatchet';
if (Players[CurrentPlayer].Booleans[0] = True) then
begin
GameTab(5);
end else
GameTab(4);
LoadAxeDTMs;
if DTMRotated(AxeDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
Wait(100 + Random(100));
end;
for I := 0 to 8 do
begin
if IsUpText(Axe[I]) then
Result := Axe[I];
end;
begin
if (Result = '') then
begin
FindNormalRandoms;
WriteLn('No Axe Found, Switchting Player');
NextPlayer(False);
end else
WriteLn('Using ' + Result);
end;
end;
procedure JoinClanChat;
var
JoinChat: Integer;
ClanChat: string;
begin
ClanChat := Players[CurrentPlayer].Strings[2];
GameTab(10);
JoinChat := BitmapFromString(54, 13, 'beNqdlWsKAjEMhPc+PsAf' +
'iiKK4jE9rAY/HYak7aolLNk2nU6TabtfXg/rsMtuhXM7btzoTBb9p' +
'+2iN9T7xe9hygLZwdNaYlWdsWmDTVaze9H0cIIP3wHC4z65DYiNM8' +
'YvIBrC7208uMEWB78ZOb1aoNFmq1Oh4MAGgRJDAFPmvYdgkXTYpC5' +
'Hq3kepBFY0dOuHRMyvqJ8xaRUy/eKCL9WXCtiNY3NdLl4fCEpIXh6' +
'wHm/HBROSzSLBYKUUBWbSqC6K15CbSqBuU2GVTM/OYmhnwsxTKNKb' +
'IWqWv2JT8qzBOaK8iPcg1IOK8N0NOoVUXXoIGgm5aSSrBObIncEv6' +
'B6JiU0e4IDDHGoBaM8CmGSkE/UrpkoGtOnSQ8DHQ5ufijpoiBREZM' +
'ehdk35Zt+MBPDOtFvJLildzMpuff8/WHvQjwBraTwdQ==');
if FindBitmapToleranceIn(JoinChat, x, y, MIX1, MIY1, MIX2, MIY2, 30) then
begin
Mouse(x + 15, y + 15, 3, 3, True);
Wait(500 + Random(500))
TypeSend(ClanChat);
end else
FindNormalRandoms;
if (FindBlackChatMessage('does not exist')) then
Writeln('Clan Chat Does not Exist!');
FreeBitmap(JoinChat);
end;
procedure SetUpPlayer;
begin
LogInPlayer;
SetAngle(True);
SetRun(True);
SetChat('On', 1);
SetChat('Off', 2);
Wait(500 + Random(500));
CheckForAxe;
CheckWcLvl;
JoinClanChat;
end;
function BankFloorColor: Integer;
var
Color, a, l, TestColor, Red, Green, Blue: integer;
P: array of TPoint;
begin
Color := 3816255;
FFlag(4);
FindColorsSpiralTolerance(MMCX, MMCY, P, Color, MMX1, MMY1, MMX2, MMY2, 60);
l := GetArrayLength(P);
for a := 0 to l - 1 do
begin
if RS_OnMinimap(P[a].x, P[a].y) then
begin
TestColor := GetColor(P[a].x, P[a].y);
if SimilarColors(TestColor, Color, 60) then
begin
ColorToRGB(TestColor, Red, Green, Blue);
if InRange(Red - Green, 5, 10) then
if InRange(Red - Blue, 4, 10) then
if GetColor(P[a].x + 5, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 3) = TestColor then
if GetColor(P[a].x, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 5, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y) = TestColor then
if GetColor(P[a].x + 5, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 5) = TestColor then
begin
Result := TestColor;
RoadColor := TestColor;
WriteLn('Bank Floor Color = ' + IntToStr(TestColor));
Exit;
end;
end;
end;
end;
WriteLn('Could not Find Bank Floor Color!');
Result := 0;
end;
function SearchBirdsNest: Boolean; //Credits to Deathscytex for this
var
CTS, I, X, Y: Integer;
NestATPA: T2DPointArray;
NestTPA: TPointArray;
Nest: TPoint;
Timer: LongInt;
begin
if (FindText(x, y, 'nest falls', SmallChars, 0, 400, 495, 460)) then
begin
MarkTime(Timer);
repeat
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
X := MSCX;
Y := MSCY;
FindColorsSpiralTolerance(X, Y, NestTPA, 3952984, MSCX - 100, MSCY - 100, MSCX + 100, MSCY + 100, 15);
NestATPA := TPAtoATPAEx(NestTPA, 5, 5);
for I := 0 to Length(NestATPA) - 1 do
begin
if (TimeFromMark(Timer) >= (10000)) then
Exit;
Nest := MIddleTPA(NestATPA[I]);
X := 0;
Y := 0;
MMouse(Nest.X, Nest.Y, 5, 5);
Wait(250);
if (IsUpText('ird')) then
begin
Mouse(Nest.X, Nest.Y, 5, 5, True);
Result := True;
Inc(NestsFound);
IncEx(ReportVars[4], NestsFound);
Wait(250 + Random(150));
Writeln('We Have Found a Bird Nest!');
{case (Random(5)) of
0: TypeSend('Found a Birds nest');
1: TypeSend('Cool, I got a bird nest.');
2: TypeSend('Found a nest');
3: TypeSend('Yay, a bird nest');
4: TypeSend('Finnaly, got a nest.');
end;}
Exit;
end;
end;
until (TimeFromMark(Timer) >= (10000)) or (Result);
Exit;
end else
Exit;
end;
function DAOpenBankFast: Boolean;
var
H, CTS, Mrk, a, II: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result := False;
if not LoggedIn then
Exit;
CTS := GetColorToleranceSpeed;
for II := 0 to 1 do
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 804188, MSX1, MSY1, MSX2, MSY2, 50);
if Length(TPA) > 0 then FindColorsSpiralTolerance(MSCX, MSCY, TPA, 737879, MSX1, MSY1, MSX2, MSY2, 50);
begin
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 30, 30);
H := High(ATPA);
for A := 0 to H do
if MiddleTPAEx(ATPA[A], x, y) then
begin
MMouse(X, Y, 4, 4);
Wait(100 + Random(50));
if IsupText('ank') then
begin
GetMousePos(x, y);
Mouse(x, y, 2, 2, False);
Wait(100 + Random(100));
if ChooseOption('uickly') then
begin
FFLag(1);
repeat
MarkTime(Mrk);
Wait(100);
until (BankScreen) or (PinScreen) or (TimeFromMark(Mrk) > 3000);
Result := True;
ColorToleranceSpeed(CTS);
Exit;
end;
end;
end;
end;
end;
end;
procedure ClickWcSkill;
var
WcSkill: Integer;
begin
WcSkill := BitmapFromString(20, 24, 'beNp1lL1KQ0EQRq9wEdLY2' +
'UQJ1topQYsUBiOSIkXEgD/gX6GVdnZ5AB/A0t7SzsLCZ/PcHPlcrg' +
'jDMrs7Z2Z2dnZn0+nxBJnNppPJ+PTsZDQaMl1b7ZbC1nh8yMgu43D' +
'QR1AQjBkvr85RqmoJWf/oKtVbVc9rVgyBc5zogXAuul5SR5+7YcVB' +
'jG4sPSTPUAo61M7zZsPeVuDJ0zOSOd4S8eZrOyyUYIkbmlFhxSiMs' +
'hiHTfSGXeAENX9GgwYsgyqcemO+8sMucIvWFPat0ib4+8tdQCjBX3' +
'xRdqKj6FlWPKxg8DJtWS/i6b45FKDU63WvBB9O98Tr/dqK2Qze4ON' +
'BB1wPTDFGLO9Jv4MIyv6e18V5jQFj72JFb9rLSiUorBdtH7IeY0Gn' +
'Kn9Z28OeZDFmKpHB1rL+rbAJl82ME7Y4dYsStB8sL0qJ+wAte0kJY' +
'hzQVsx57XCnwUvWEBgk4dZ5Vax8i01iKvkoeEcJ/R/rU9U+6eUJJ6' +
'UUvBU3ieX/iY4f/w0kVImn/xn5nVK0dEjLuOUqT0DE/y2tFTETo7S' +
'2cmq2/AHyBeEtd62HZKhuZRrP393fTfo=');
GameTab(2);
if FindBitmapToleranceIn(WcSkill, x, y, MIX1, MIY1, MIX2, MIY2, 50) then
begin
Mouse(x, y, 1, 1, True);
Wait(1000 + Random(1000));
CloseWindow;
Wait(1000 + Random(500));
end;
FreeBitmap(WcSkill);
end;
function InLumby: Boolean; //Credits to nose_smasher
var
LumbyColor: Integer;
begin
if not Loggedin then
Exit;
LumbyColor := FindLumbyRoadColor;
if (FindColorTolerance(x, y, LumbyColor, MMX1, MMY1, MMX2, MMY2, 3)) and
(FindSymbol(x, y, 'water')) then
Result := True
else
Result := False;
end;
procedure WalkToWillows; forward;
procedure DeathWalk;
begin
if not loggedin then
Exit;
repeat
Cast('Home Teleport');
Wait(12000 + random(5000));
until InLumby = True;
begin
Writeln('Going Back to Draynor!');
Status('Going Back to Draynor!');
Makecompass('n');
SetAngle(True);
Setrun(true);
SymbolAccuracy := 0.5;
if not RadialRoadWalk(FindLumbyRoadColor, 54, 80, 74, -2, 1) then
if FindSymbol(x, y, 'Guide') then
Mouse(x, y, 4, 4, True);
if not RadialRoadWalk(FindLumbyRoadColor, 290, 337, 70, -2, 1) then
if FindSymbol(x, y, 'Dungeon') then
Mouse(x - 10, y, 4, 4, True);
if not RadialRoadWalk(FindLumbyRoadColor, 287, 347, 65, -2, 1) then
if FindSymbol(x, y, 'Shop') then
Mouse(x, y + 10, 4, 4, True);
if not RadialRoadWalk(FindLumbyRoadColor, 260, 300, 50, -2, 1) then
if FindSymbol(x, y, 'Shop') then
Mouse(x - 10, y + 10, 4, 4, True);
if not RadialWalk(DAFindDirtRoadColor, 290, 240, 65, -2, 1) then
if FindSymbol(x, y, 'Farming Spot') then
Mouse(x, y + 15, 4, 4, True);
if not RadialWalk(DAFindDirtRoadColor, 238, 302, 60, -2, 1) then
if FindSymbol(x, y, 'Farming Spot') then
Mouse(x - 15, y + 15, 4, 4, True);
if not RadialWalk(DAFindDirtRoadColor, 243, 300, 60, -2, 1) then
if FindSymbol(x, y, 'Rare Trees') then
Mouse(x - 20, y + 15, 4, 4, True);
if not RadialWalk(DAFindDirtRoadColor, 238, 300, 65, -2, 1) then Exit;
if not RadialWalk(DAFindDirtRoadColor, 220, 270, 65, -2, 1) then
if FindSymbol(x, y, 'Rare Trees') then
Mouse(x - 15, y, 4, 4, True);
repeat
if not RadialWalk(DAFindDirtRoadColor, 213, 288, 65, -2, 1) then Exit;
until RadialRoadWalk(FindRoadColor, 350, 274, 74, -2, 1);
repeat
if not RadialRoadWalk(FindRoadColor, 350, 274, 58, -2, 1) then Exit;
until FindColorTolerance(x, y, 10089719, MMX1, MMY1, MMX2, MMY2, 40);
begin
Mouse(x, y, 4, 4, true);
FFlag(3);
Writeln('Yay We Are Back!');
Status('Yay We Are back!');
WalkToWillows;
Exit;
end;
end;
end;
procedure PlayerForm;
begin
SRLPlayerForm(True, ['Is Axe Wielded?', 'Use Responder?'], ['Pin Number?', 'Loads Each Player?'],
['SRL ID', 'SRL Password', 'Clan Chat'], []);
end;
function LoadDDTMs(Walk: Integer): Integer;
var
DTMMainPoint: TDTMPointDef;
DTMSubPoints: array[0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
case Walk of
1: begin
DTMMainPoint.x := 826;
DTMMainPoint.y := 242;
DTMMainPoint.AreaSize := 0;
DTMMainPoint.AreaShape := 0;
DTMMainPoint.Color := FindWaterColor;
DTMMainPoint.Tolerance := 5;
dtmSubPoints[0].x := 826;
dtmSubPoints[0].y := 242;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := FindWaterColor;
DTMSubPoints[0].Tolerance := 5;
DTMSubPoints[1].x := 816;
DTMSubPoints[1].y := 235;
DTMSubPoints[1].AreaSize := 0;
DTMSubPoints[1].AreaShape := 0;
DTMSubPoints[1].Color := FindRockColor;
DTMSubPoints[1].Tolerance := 5;
DTMSubPoints[2].x := 823;
DTMSubPoints[2].y := 252;
DTMSubPoints[2].AreaSize := 0;
DTMSubPoints[2].AreaShape := 0;
DTMSubPoints[2].Color := FindRockColor;
DTMSubPoints[2].Tolerance := 5;
DTMSubPoints[3].x := 837;
DTMSubPoints[3].y := 254;
DTMSubPoints[3].AreaSize := 0;
DTMSubPoints[3].AreaShape := 0;
DTMSubPoints[3].Color := FindWaterColor;
DTMSubPoints[3].Tolerance := 5;
DTMSubPoints[4].x := 828;
DTMSubPoints[4].y := 235;
DTMSubPoints[4].AreaSize := 0;
DTMSubPoints[4].AreaShape := 0;
DTMSubPoints[4].Color := FindWaterColor;
DTMSubPoints[4].Tolerance := 5;
end;
2: begin
DTMMainPoint.x := 880;
DTMMainPoint.y := 164;
DTMMainPoint.AreaSize := 2;
DTMMainPoint.AreaShape := 0;
DTMMainPoint.Color := 6447464;
DTMMainPoint.Tolerance := 255;
DTMSubPoints[0].x := 880;
DTMSubPoints[0].y := 164;
DTMSubPoints[0].AreaSize := 2;
DTMSubPoints[0].AreaShape := 0;
DTMSubPoints[0].Color := 6447464;
DTMSubPoints[0].Tolerance := 255;
DTMSubPoints[1].x := 885;
DTMSubPoints[1].y := 157;
DTMSubPoints[1].AreaSize := 2;
DTMSubPoints[1].AreaShape := 0;
DTMSubPoints[1].Color := 1179390;
DTMSubPoints[1].Tolerance := 100;
DTMSubPoints[2].x := 884;
DTMSubPoints[2].y := 166;
DTMSubPoints[2].AreaSize := 2;
DTMSubPoints[2].AreaShape := 0;
DTMSubPoints[2].Color := 195836;
DTMSubPoints[2].Tolerance := 100;
DTMSubPoints[3].x := 883;
DTMSubPoints[3].y := 171;
DTMSubPoints[3].AreaSize := 2;
DTMSubPoints[3].AreaShape := 0;
DTMSubPoints[3].Color := 195836;
DTMSubPoints[3].Tolerance := 100;
DTMSubPoints[4].x := 876;
DTMSubPoints[4].y := 169;
DTMSubPoints[4].AreaSize := 2;
DTMSubPoints[4].AreaShape := 0;
DTMSubPoints[4].Color := 1179390;
DTMSubPoints[4].Tolerance := 100;
end;
end;
TempTDTM.MainPoint := DTMMainPoint;
TempTDTM.SubPoints := DTMSubPoints;
Result := AddDTM(TempTDTM);
end;
function LevelUp: Boolean;
var
WoodCuttingLevel: Integer;
begin
Result := FindNPCChatText('gratu', Nothing);
if not Result then
Result := FindNPCChatText('atio', Nothing);
if Result then
begin
while ClickContinue(True, True) do
Wait(500);
WoodCuttingLevel := GetSkillInfo('Woodcutting', False);
case random(4) of
0: TypeSend('Yay ' + IntToStr(WoodCuttingLevel) + ' woodcutting');
1: TypeSend('Sweet ' + IntToStr(WoodCuttingLevel) + ' woodcutting');
2: TypeSend('Hooray my woodcutting is' + IntToStr(WoodCuttingLevel));
3: TypeSend('I finally lvled up!');
end;
ClickWcSkill;
CloseWindow;
Writeln('We have lvled up!');
IncEx(ReportVars[5], Lvls);
Inc(Lvls);
end;
end;
procedure AutoTrader;
begin
if (SomeoneTrades) then
begin
AcceptTrade;
Wait(4000 + random(1000));
Decline;
IncEx(ReportVars[6], Trades);
Inc(Trades);
case Random(7) of
0: Typesend('go away');
1: Typesend('go trade with someone else');
2: TypeSend('leave me alone');
3: TypeSend('No thank you');
4: TypeSend('I''m Busy');
6: TypeSend('don''t need that');
end;
end;
end;
function InChatArr(Text: array of string): Boolean; //Credits to Nava2 and EvilChicken for this.
var
I, H: integer;
s: string;
begin
H := High(Text);
if (not (GetLastChatText(s))) then
LastChatter(s);
for I := 0 to H do
begin
if (Pos(Lowercase(Text[i]), (Lowercase(s))) > 0) then
begin
Result := true;
Exit;
end;
end;
end;
procedure Responder;
var
Question, Thanking: TStringArray;
I, S: Integer;
begin
if not (Players[CurrentPlayer].Booleans[1]) or not (Loggedin) then
Exit;
Question := ['wc lvl', 'cutting lvl', 'oodc lvl', 'wc level', 'cutting level', 'oodc level'];
for I := 0 to 8 do
begin
if InChatArr(Question) then
begin
S := GetSkillInfo('Woodcutting', False);
case Random(9) of
0: TypeSend('only ' + IntToStr(S));
1: TypeSend(IntToStr(S));
2: TypeSend((IntToStr(S)) + ' you?');
3: TypeSend(IntToStr(S) + ' lol');
4: TypeSend((IntToStr(S)) + ' here');
5: TypeSend('only ' + IntToStr(S));
7: TypeSend('Nearly ' + IntToStr(S + 1));
8: begin
TypeSend('only ' + IntToStr(S + 1));
Wait(500 + random(500));
TypeSend('I mean ' + IntToStr(S));
end;
end;
Wait(1000 + Random(500));
end;
Thanking := ['nice', 'cool', 'awesome', 'sweet', 'good', 'kool'];
for I := 0 to 8 do
begin
if InChatArr(Thanking) then
begin
case Random(5) of
0: TypeSend('thx');
1: TypeSend('thank you');
2: TypeSend('ty');
3: TypeSend('thanks');
4: TypeSend('tyvm');
end;
end;
for I := 0 to 8 do
begin
if InChatArr([Players[CurrentPlayer].Nick]) then
begin
case Random(4) of
0: Typesend('What do you want');
1: Typesend('im busy');
2: Typesend('Leave me alone...');
3: Typesend('Go away');
end;
end;
end;
IncEx(ReportVars[7], Responded);
Inc(Responded);
end;
end;
end;
procedure FindRandoms;
begin
LampSkill := SkillLamp;
UseRewardBox;
FindNormalRandoms;
SolveSRLRandoms := True;
if FindFight then
RunAway('N', True, 1, 15000);
end;
procedure ClickWillow;
begin
case Random(5) of
0..3: begin
Mouse(x, y, 4, 4, True);
GetMousePos(x, y);
Wait(1000 + random(500));
end;
4: begin
Mouse(x, y, 4, 4, False);
GetMousePos(x, y);
Wait(300 + random(150));
ChooseOption('hop');
end;
end;
end;
procedure AntiBan;
begin
if not IsUpText('Willow') and not IsUpText('hop') or (Invfull) or (not (LoggedIn)) then
Exit;
case Random(200) of
0: HoverSkill('woodcutting', False);
1: PickUpMouse;
2: RandomMovement;
3: BoredHuman;
4: SleepAndMoveMouse(4000 + Random(3000));
5: begin
SetAngle(False);
Wait(500 + random(500));
SetAngle(True);
end;
6: begin
MakeCompass('e');
Wait(500 + random(500));
MakeCompass('n');
end;
7: MMouse(Random(x), Random(y), 1000, 1000);
8: ClickWcSkill;
end;
Inc(AntiBans);
IncEx(ReportVars[3], AntiBans);
end;
procedure WhileChopping;
begin
if not loggedin then
Exit;
FindRandoms;
AntiBan;
Responder;
AutoTrader;
SearchBirdsNest;
LevelUp;
end;
function FindWillow(ClickWillowTree: Boolean): Boolean;
var
i, Tries, H, CTS: Integer;
TP: Tpoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
CTS := GetColorToleRanceSpeed;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.24, 1.18);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 4813670, MSX1, MSY1, MSX2, MSY2, 10);
if Length(TPA) = 0 then FindColorsTolerance(TPA, 3364945, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
SetColorspeed2Modifiers(0.2, 0.2);
ATPA := SplitTPAEx(TPA, 10, 10);
SortATPAFrom(ATPA, TP);
H := High(ATPA);
for i := 0 to H do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 4, 4);
Wait(100 + random(50));
if IsupText('illow') then
begin
GetMousePos(x, y);
repeat
Result := True;
if ClickWillowTree then
begin
ClickWillow;
Exit;
end else
Inc(Tries);
until FindWillow(True) or (Tries = 25);
if (Tries = 25) then
begin
DeathWalk;
Writeln('Can Not Find Willow Tree doing Death Walk');
end;
end;
end;
end;
procedure CrushWillow;
var
Mrk: Integer;
begin
if (not (LoggedIn)) then Exit;
Writeln('Crushing Willows');
Status('Crushing Willows');
repeat
if FindWillow(True) then
begin
GetMousePos(x, y);
WhileChopping;
FFlag(4);
MarkTime(Mrk);
end;
repeat
WhileChopping;
Wait(100 + Random(500));
until (not LoggedIn) or (TimeFromMark(Mrk) >= (8000 + Random(5000))) or (not IsUpText('hop')) or Invfull
until (InvFull) or (not LoggedIn);
end;
{$IFDEF SMART}
procedure SetUpSmart;
begin
Status('Loading Smart...');
ClearDebug;
Writeln('Please wait...');
Wait(500);
Writeln('Setting Up Smart');
SMARTSetupEx(133, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
Wait(100);
until (SmartGetColor(253, 233) <> 1118604);
end;
{$ENDIF}
procedure WalkToBank;
var
Bank, WalkDDTM: integer;
begin
if not Loggedin then
Exit;
Bank := DTMFromString('78DA63AC636260F0664001E909090CFF81342' +
'310FF0702C62CA01A4F881C0B54CD9F3F4C609A11CA672C22528D' +
'2B116A6CF1AB0100517A11CC');
Writeln('Going To Draynor Bank');
Status('Going to Bank');
SetAngle(True);
SetRun(true);
SymbolAccuracy := 0.5;
WalkDDTM := LoadDDTMs(2);
FindNormalRandoms;
if (DTMRotated(WalkDDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x + 20 - Random(5), y, 1, 1, true);
FFlag(8);
Writeln('We Have Arrived at Draynor Bank');
end else
if FindColor(x, y, BankFloorColor, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x + 10, y + 10, 1, 1, True);
FFlag(8);
Writeln('We Have Arrived at Draynor Bank');
end else
if FindColorTolerance(x, y, 10089719, MMX1, MMY1, MMX2, MMY2, 40) then
begin
Mouse(x, y, 4, 4, true);
FFlag(8);
Writeln('We Have Arrived at Draynor Bank');
end else
if DTMRotated(Bank, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 5, 5, True);
Wait(1000 + random(1000));
FFlag(8);
Writeln('We Have Arrived at Draynor Bank!');
Exit;
end else
if (FindColorTolerance(x, y, 60909, 643, 15, 687, 47, 3)) then
begin
Mouse(x, y, 2, 2, true);
FFlag(8);
Writeln('We Have Arrived at Draynor Bank');
end else
if FindSymbol(x, y, 'fishing spot') then
begin
Mouse(x + 40, y - 50, 4, 4, true);
FFlag(8);
Writeln('We Have Arrived at Draynor Bank');
end else
begin
Writeln('Can not Find Bank, doing Death Walk');
Deathwalk;
end;
FreeDTM(Bank);
FreeDTM(WalkDDTM);
end;
procedure Banking;
var
WillowLog, Tries, Exps: Integer;
begin
if not (LoggedIn) then
Exit;
WillowLog := DTMFromString('78DA63B463626078CA800242BCE5185881342' +
'310FF07024607A09A3B0C6880118904D23E40350F09A8B105AAF9' +
'48408D3150CD0BFC6A001AAD0A8C');
Status('Banking Willows');
FFlag(7);
MakeCompass('n');
TotalWillows := CountItemsIn('inv', 'dtm', WillowLog, [0]);
repeat
DAOpenBankFast;
Inc(Tries);
until (PinScreen) or (BankScreen) or (Tries = 10)
if (Tries = 10) then
OpenBankFast('db');
if (PinScreen) then
begin
Writeln('Entering Pin Number');
InPin(IntToStr(Players[CurrentPlayer].Integers[0]));
end;
if (BankScreen) then
if (Players[CurrentPlayer].Booleans[0] = False) then
begin
Writeln('Banking Willows');
Deposit(2, 28, True);
Closebank;
end else
begin
Writeln('Banking Willows');
DepositAll;
Closebank;
end;
begin
IncEx(ReportVars[2], Exps * 68);
IncEx(ReportVars[1], Exps);
IncEx(ReportVars[0], TotalLoads);
Inc(TotalLoads)
Writeln('We Have Banked the Willows');
FreeDTM(WillowLog);
end;
end;
procedure WalkToWillows;
var
WalkDDTM: integer;
begin
if not loggedin then
Exit;
begin
Status('Going to Willows');
Writeln('Going to Willows');
MakeCompass('n');
SetAngle(True);
SetRun(true);
FindNormalRandoms;
begin
WalkDDTM := LoadDDTMS(1);
if (DTMRotated(WalkDDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
Mouse(x + 30, y, 1, 1, true);
FFlag(8);
Writeln('Arrived at Willows');
end else
begin
if RadialWalk(FindRockColor, 90, 180, 60, -2, 1) then
begin
Wait(500 + Random(600));
Writeln('Arrived at Willows');
end else
begin
if (FindSymbol(x, y, 'fish')) then
begin
Mouse(x, y - 23, 1, 1, true);
FFlag(8);
Writeln('Arrived at Willows');
end else
begin
Writeln('Can Not Find willows, doing Death Walk');
DeathWalk;
end;
end;
end;
end;
end;
end;
procedure ProgressReport;
begin
ClearDebug;
WriteLn('***************************************************');
WriteLn(Padr('* DA Willow Crusher' + (ScriptVersion), 49) + ' *');
WriteLn('***************************************************');
WriteLn(Padr('* Been Crushing for | ' + TimeRunning, 49) + ' *');
Writeln(Padr('* Gained | ' + IntToStr(Lvls) + ' Levels', 49) + ' *');
WriteLn(Padr('* Did | ' + IntToStr(TotalLoads) + ' Loads', 49) + ' *');
WriteLn(Padr('* Crushed | ' + IntToStr(TotalWillows) + ' Willows', 49) + ' *');
Writeln(Padr('* Responded | ' + IntToStr(Responded) + ' Times', 49) + ' *');
Writeln(Padr('* Performed | ' + IntToStr(AntiBans) + ' AntiBans', 49) + ' *');
Writeln(Padr('* Traded | ' + IntToStr(Trades) + ' Times', 49) + ' *');
Writeln(Padr('* Found | ' + IntTOStr(NestsFound) + ' Bird Nests', 49) + ' *');
WriteLn(PAdr('* Gained | ' + IntToStr(TotalWillows * 68) + ' Exps', 49) + ' *');
WriteLn('***************************************************');
SendSRLReport;
SRLRandomsReport;
end;
procedure ScriptTerminate;
begin
ProgressReport;
FreeDTM(Bank);
FreeBitmap(WcSkill);
FreeBitmap(JoinChat);
end;
begin
Sig;
Disguise('DA Willow Crusher');
PlayerForm;
SetUpSRL;
ScriptID := '1211';
{$IFDEF SMART}
SetUpSmart;
{$ENDIF}
DaSRLID := Players[CurrentPlayer].Strings[0];
DASRLPassword := Players[CurrentPlayer].Strings[1];
if (DASRLID = '') or (DASRLPassword = '') then
begin
SRLID := '7412';
SRLPassword := 'omgomg';
end else
begin
SRLID := DASRLID;
SRLPassword := DASRLPassword;
end;
SetUpPlayer;
repeat
repeat
WalkToWillows;
CrushWillow;
WalkToBank;
Banking;
FindRandoms;
ProgressReport;
if (AllPlayersInActive) then
TerminateScript;
until (LoadsDone >= Players[CurrentPlayer].Integers[1]) or (not (LoggedIn));
NextPlayer(Players[CurrentPlayer].Active);
until (False);
ProgressReport;
end.