Code:
Program J_P2k8Willows;
{.include SRL/SRL/Misc/Smart.scar}
{.include Srl/Srl.scar}
{.include Srl/Srl/Skill/Woodcutting.scar}
{.include Srl/Srl/Misc/Trade.scar}
const
YourSRLId = ''; //Your SRL ID.
YourSRLPassword = ''; //Your SRL Password.
Version = '0.1'; // Don't touch! :)
World = 127; //World that SMART enters .
Signed = True; //Client signed=True or unsigned=False .
MinutesTerminate = 360; //Minutes to work(It will terminate script after those minutes)
pin = ' ';
var lvlups,loads,axedtm,brokenaxedtm,willowdtm,x,y,loads2:integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // If you add more players , make sure you set this correct, ;)
NumberOfPlayers(HowManyPlayers);
Players[0].Name := ''; //Your username between ''
Players[0].Pass := ''; //Your password between ''
Players[0].Nick := ''; //Nickname from you username between ''
Players[0].Active := True; //Active->True or False.
Players[0].Integers[0] := 10; //Loads to do. Random 3 will be added.
Players[0].Strings[1] := 'FEB'; //Place where you want to cut, VEB or FEB.
end;
procedure LoadDTMs;
begin
{AxeDTM := DTMFromString('78DA63FCCFC4C0B09F91011974670832FC07D' +
'220D1FF40C0F80BA8E61CAA1A882C8C04D1CC0C0C5B08A8E101AA' +
'D949400D1750CD3EFC6A0056B70BE7');
BrokenAxeDTM := DTMFromString('78DA63B4626660B8C2C8800C3AD20419FE036' +
'990E87F2060B405AA3981AA06220B2381B40750CD29026ACC806A' +
'1E1150E30A547396801A37A09A4BF8D5000072D20C8B'); }
WillowDTM := DTMFromString('78DA6364C00D1861342790E0429573B195445' +
'5230D24D809A891071212A86A8CF58451D5F00009595435C5D94EA86' +
'A5830CD498EB64055C30A240451D578384891EC2F00DA4D05E5');
end;
procedure antibanz;
begin
If(not LoggedIn)then Exit;
Case Random(9) of
0: MMouse(Random(MSX2),Random(MSY2),0,0);
1: PickupMouse;
2: SleepAndMoveMouse(400+Random(1500));
3: if Random(2) = 1 then MMouse(1, 338, 515, 165);
4: if Random(2) = 1 then MMouse(515, 1, 250, 503);
5: RandomMovement;
6..9:
begin
case Random(3) of
0: begin
KeyDown(VK_RIGHT);
Wait(500+Random(2000));
KeyUp(VK_RIGHT);
end;
1: begin
KeyDown(VK_Left);
Wait(500+Random(2000));
KeyUp(VK_Left);
end;
2: begin
case Random(2) of
0: begin
KeyDown(VK_RIGHT);
Wait(500+Random(1400));
KeyUp(VK_RIGHT);
end;
1: begin
KeyDown(VK_Left);
Wait(500+Random(1400));
KeyUp(VK_Left);
end;
end;
end;
end;
end;
end;
end;
procedure findrandoms;
begin
findnormalrandoms;
end;
Procedure WalkToWillow;
var rockdtm:integer;
begin
disguise('to the willows')
makecompass('n')
RockDTM := DTMFromString('78DA639CC5C4C090C8800212B263190481342' +
'310FF070246909A385435DEA15E609A11CA679C0354138B690E8A' +
'9A794035F1A86A9C7CEC30D52413503313A82695809AE998E618D' +
'B1AA0AA9986DDEF18E6C4E35703002E21158F');
If (not(loggedin)) then exit;
if DTMRotated(Rockdtm, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
DTMRotated(Rockdtm, x, y, MMX1, MMY1, MMX2, MMY2)
Mouse(X-5+random(3),Y+5+random(3), 0, 0, True);
end else
begin
symbolAccuracy := 0.4;
{if(FindSymbol(x, y, 'bank')) then
begin
mouse(x-30,y+30,6,6,true);
FFlag(10);
end else}
if not DTMRotated(Rockdtm, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
freedtm(rockdtm);
Writeln('Could not find rock');
wait(700);
writeln('Looking for water color');
RadialWalk(FindWaterColor, 180, 270, 60, -1, 0);
flag;
end;
end;
end;
procedure Sig;
begin
ClearDebug;
Wait(80);
Writeln(' _ _ ');
Wait(80);
Writeln(' J _ P ');
Wait(80);
Writeln(' 2 ');
Wait(80);
Writeln(' K ');
Wait(80);
Writeln(' 8 ');
Wait(80);
Wait(4000);
ClearDebug;
end;
{<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
|| AreWeLevelUp - Checks for lvlup and clicks ||
|| By: PvH ||
<+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>}
function AreWeLevelUp: boolean;
begin
if not LoggedIn then Exit;
if ClickContinue(True, False) then
begin
if FindNPCChatText('lations', Nothing) then
begin
Writeln('Yay, we got a new level!');
Lvlups := Lvlups + 1;
Inc(ReportVars[3]);
ClickContinue(True, True);
Result := True;
Exit;
end;
end;
end;
procedure ChopLogs;
var
i,x,y,m: integer;
treecolors: array [0..3] of integer;
treeNames: array [0..2] of String;
begin
disguise('chopping')
treecolors[0]:= 3759203;
treecolors[1]:= 5406322;
treecolors[2]:= 6132352;
treecolors[3]:= 3363673;
treenames[0]:= 'Wil';
treenames[1]:= 'llo';
treenames[2]:= 'low';
repeat
if (not LoggedIn) then Exit;
for i := 0 to 3 do
if FindObjTPA(x, y, treecolors[i], 10, 2, 15, 25, 10, [treenames[0], treenames[1], treenames[2]]) then
begin
FindObjTPA(x, y, treecolors[i], 10, 2, 15, 25, 10, [treenames[0], treenames[1], treenames[2]])
Wait(100 + Random(300));
begin
Mouse(x, y, 4, 4, True);
m:=0;
MarkTime(M);
while (TimeFromMark(M) < 10000 + random(3000)) do
Case (Random(2)) of
0: findrandoms;
1: antibanz
end;
end;
end;
AntiBanz;
FindRandoms;
if not (LoggedIn) then
begin
NextPlayer(False);
LoginPlayer;
end;
until invfull or inchat('too full')
end;
Procedure WalkToBank;
var
bankers : Integer;
begin
Disguise('banking')
Bankers := DTMFromString('78DA63AC636260F0664001E909090CFF81342' +
'310FF0702C62CA01A4F881C0B54CD9F3F4C609A11CA672C22528D' +
'2B116A6CF1AB0100517A11CC');
if FindDTM(Bankers, x+random(3), y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y , 0, 0, True);
FFlag(4);
end else
begin
Radialwalk(4079171,0,45,70,1,1);
FFlag(4);
end;
FreeDTM(Bankers);
end;
Procedure Banking;
Begin
disguise('banking')
MakeCompass('N');
Wait(300 + random(160));
OpenBankQuiet('db');
If (PinScreen) Then
InPin('Pin');
if finddtm(willowdtm,x,y,MMX1, MMY1, MMX2, MMY2) then
begin
mouse(x,y,2,2,false)
wait(500+random(300));
chooseoption('all');
loads2:= loads2+1;
end;
End;
procedure ProgressReport;
var
i: Integer;
begin
disguise('proggy')
SrlRandomsReport;
SendSRLReport;
Writeln('');
Writeln('|~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~| ');
Writeln('|~| | ');
Writeln('|~| J_P 2k8 v' + Version + ' | ');
Writeln('|~| Worked: ' + TimeRunning + ' | ');
Writeln('|~| Banked: ' + IntToStr(Loads2) + ' loads. | ');
writeln('|~| | ');
Writeln('|~| | ');
Writeln('|~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~| ');
Writeln('|~| | ');
Writeln('|~| Thanks for using! ');
Writeln('|~| Please post the proggy at villavu.com ');
Writeln('|~| | ');
Writeln('|~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~!~| ');
end;
{function SwitchPlayers: Boolean;
begin
if not (LoggedIn) then Exit;
if Loads >= Players[CurrentPlayer].Integers[0] + Random(3) then
begin
Result := True;
WriteLn('Loads done.');
Players[CurrentPlayer].Rand := 'Waiting for another turn .';
Loads := 0;
end;
end;}
procedure PlayerSetup;
begin
GraphicsSet := true;
LoginPlayer;
//URun;
//Check4axe;
// First := True;
// if LoggedIn then
// begin
end;
begin
SmartSetupEx(World, False, Signed, False);
SetTargetDC(SmartGetDC);
activateclient;
SRLId := YourSRLId;
SRLPassword := YourSRLPassword;
SetupSRL;
ScriptID := '';
DeclarePlayers;
Sig;
repeat
PlayerSetup;
repeat
ProgressReport;
begin
walktowillow;
choplogs;
walktobank;
banking;
{if (TimeFromMark(minutesterminate) > 1000 * 60 * MinutesTerminate) then
begin
logout;
TerminateScript;
end;}
end;
until (not LoggedIn);
ProgressReport;
Nextplayer(Players[CurrentPlayer].Active);
until (loads2 = Players[currentplayer].Integers[0]);
end.