SCAR Code:
{
__________________________________________________________
|| Me_ntals Willow Cutter ||
|| ||
|| Suggestion? Post it! ||
|| Thanks the SRL team ||
|| Espically starblaster ||
||_______________________________________________________||
}
{.include srl/srl.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}
var
DX, DY, LogDTM, BigXDTM, Willows, i:integer;
const WillowColor = 3160112;
const LogsPerLoad = 27;
const Loadstodo = 50;
const keepercolor = 2575473;
Procedure DeclarePlayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; {3-4 letters of your name}
Players[0].Skill := ''; {Lamp Skill}
Players[0].Active := True; {Use player?}
Players[0].Boolean1 := False; {Powercop?}
end;
procedure DeclareDTM;
begin
LogDTM := DTMFromString('78DA632C66626078CA8002527D75191E02694' +
'620FE0F048CC94035CF18D000231209A4F3806AEE10505343A49A' +
'3744D8F511BF1A00056F0DE4');
BigXDTM := DTMFromString('78DA63E4626060006114C0C8F01F4C3230FC0' +
'7024661208309554541A21B54255407480D0FAA1A676B6D54351C' +
'404218554D88A739AA1A903D1CA86AB2639D51D5B001096654351' +
'35BF251D508E0B78B15880100130BA0');
end;
{__________________________________________
| Sigantures |
|__________________________________________|}
Procedure Siganture;
Begin
Writeln('_______________________________');
Writeln('| Me_ntal"s |');
Writeln('| Edgeville |');
Writeln('| Willow Cutter |');
Writeln('|______________________________|');
end;
procedure Report;
begin
ClearDebug;
Writeln('_______________________________');
Writeln('| |');
Writeln('| Me_ntal"s |');
Writeln('| Edgeville |');
Writeln('| Willow Cutter |');
Writeln('|______________________________|');
Writeln('')
Writeln(' Total Running Time : ' +TimeRunning);
Writeln('')
Writeln(Players[CurrentPlayer].Name);
Writeln('Willows Cut :'+IntToStr(Willows));
Writeln('Exp Gained :'+FloatToStr(Willows*62.5));
end;
procedure Summary;
begin
AddToReport('');
AddToReport(Players[CurrentPlayer].Name)
AddToReport('');
AddToReport('Worked for : '+IntToStr(Players[CurrentPlayer].Worked));
AddToReport('Loads Done : '+IntToStr(Willows));
AddToReport('Exp Gained : '+FloatToStr(Willows*62.5));
AddToReport('Wc level : '+IntToStr(Players[CurrentPlayer].Level[20]));
AddToReport('');
end;
{__________________________________________
| Setups |
|__________________________________________|}
Procedure SetupPlayer;
begin
HighestAngle;
MakeCompass('N');
FindAxeHeadColor;
Report;
end;
Procedure GetMeOut;
begin
GetAllLevels;
Summary;
LogOut;
NextPlayer(True);
Willows := 0;
SetupPlayer;
end;
{__________________________________________
| Randoms |
|__________________________________________|}
Function FindFastRandoms:Boolean; //By WT-Fakawi.
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
Result := True;
11: if FindLamp(LampSkill) then
Result := True;
12: if (FindNewBox) then
begin
Result := True;
if (UseBoxSolver) then
SolveBox
else
GambleNewBox;
end;
14:
begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
16: if RC then
Result := True;
end;
Wait(1);
end;
end;
{__________________________________________
| AntiBan |
|__________________________________________|}
Procedure WereHuman;
Begin
If not(LoggedIn) then Exit;
Begin
Case Random(20) of
0: HoverSkill('random', false);
1: RandomRClickEvery(2 + Random(8));
2: RotateEvery(20 + Random(10));
3: LeaveScreenEvery(5 + Random(5));
4: HoverSkill('Woodcutting', false);
5: BoredEvery(9 + Random(24));
6: Begin
GameTab(1 + Random(12));
Wait(1500 + Random(500));
GameTab(4);
end;
7: SleepAndMoveMouse(1000 + Random(1000));
8: MMouse(Random(MIX2), Random(MIY2), 0, 0);
9: HoverSkill('Firemaking', false);
end;
end
end;
procedure Randomfind;
begin
FindFastRandoms;
FindNormalRandoms;
end;
{__________________________________________
| Selling |
|__________________________________________|}
procedure fromshop;
var Start: Integer;
begin
{Shop to Witch}
MarkTime(Start);
if(RadialWalkEx( DX, DY, MMCX, MMCY, RoadColor, 30, 120, 130, 50)) then
begin
if(TimeFromMark(Start)>=15000) then
begin
GetMeOut;
WriteLn('timeout');
end else
begin
mouse(DX,DY,0,0,true);
Flag;
if(RadialWalkEx( DX, DY, MMCX, MMCY, 1784915, 30, 145, 175, 60)) then
begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
mouse(DX,DY,0,0,true);
Flag;
Randomfind;
WriteLn('Returned To Willows');
end else
begin
GetMeOut;
WriteLn('Problem With 2nd Return Walk');
end;
end;
end else
begin
GetMeOut;
WriteLn('Problem With 1st Return Walk');
end;
end;
procedure selllogs;
var Start: Integer;
begin
MarkTime(Start);
if(FindColorTolerance(x, y, keepercolor, MSX1, MSY1, MSX2, MSY2,10))then {Find Shoopkeeperhead}
Begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
MMouse(x, y, 3, 3);
wait(100+random(100));
if(IsUpTextMulti('hop', 'eep', 'per'))then
begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
Mouse(x,y,3,3, false);
Wait(50 + Random(35));
ChooseOption(x, y, 'Trade');
Wait(50 + Random(100));
repeat
if(FindDTM(LogDTM, x, y, 552, 203, 742, 469))then
begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
Mouse(x, y, 2, 2, False);
ChooseOption(x, y, 'Sell 10');
Mouse(x, y, 2, 2, True);
end;
until(Not(FindDTM(LogDTM, x, y, 552, 203, 742, 469)));
Willows := Willows + LogsPerLoad;
Report;
if(FindDTM(BigXDTM, x, y, 552, 203, 742, 469))then
begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
Mouse(x, y, 2, 2, True);
Wait(100 + Random(100));
WriteLn('Sold A load');
end;
end;
end else
begin
GetMeOut;
WriteLn('Problem Selling');
end;
end;
procedure tooshop;
var Start:Integer;
begin
{Willow to dead}
MarkTime(Start);
If(RadialWalkEx( DX, DY, MMCX, MMCY, 1256738, 30, 345, 366, 45)) then
Begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
begin
mouse(DX,DY,0,0,true);
Flag;
if (RadialWalkEx( DX, DY, MMCX, MMCY, 232, 30, 300, 303, 60)) then
Begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
begin
mouse(DX,DY,0,0,true);
Flag;
if (RadialWalkEx( DX, DY, MMCX, MMCY, 602204, 30, 300, 225, 15)) then
begin
if(TimeFromMark(Start)>=15000) then GetMeOut;
mouse(DX,DY,0,0,true);
Flag;
WriteLn('At Shop');
Wait(100 + Random(100));
end else
GetMeOut;
WriteLn('Problem With 3rd to shop');
end;
end else
begin
GetMeOut;
WriteLn('Problem With 2nd to shop');
end;
end;
end else
begin
GetMeOut;
WriteLn('Problem With 1st to shop');
end;
end;
procedure DropLogs;
begin
if (InvFull) then
begin
repeat
if(FindDTM(LogDTM, x, y, 552, 203, 742, 469))then
begin
Mouse(x, y, 2, 2, False);
ChooseOption(x, y, 'Drop');
Randomfind;
end;
until(Not(FindDTM(LogDTM, x, y, 552, 203, 742, 469)));
Willows := Willows + LogsPerLoad;
Report;
end else
exit;
end;
procedure bankreq;
begin
if (InvFull) then
begin
If (Players[CurrentPlayer].Boolean1 = False) then
begin
tooshop;
Wait(50 + Random(100));
selllogs;
Wait(50 + Random(100));
fromshop;
end else
DropLogs;
end else
exit;
end;
{__________________________________________
| Main Loop |
|__________________________________________|}
Procedure Doload;
Var
Start, cx, cy: Integer;
begin
if (InvFull) then bankreq;
repeat
begin
MarkTime(Start);
If not(LoggedIn)then Exit;
If (FindColorSpiralTolerance(x,y, WillowColor, msx1,msy1,msx2,msy2, 5))and
not(FindColorSpiralTolerance(cx, cy, 515029, MSX1, MSY1, 180, 25, 20))and
not(FindColorSpiralTolerance(cx, cy, 122333, MSX1, MSY1, 123, 15, 10))and
not(FindColorSpiralTolerance(cx, cy, 65535, MSX1, MSY1, 180, 25, 20))then
Begin
MMouse(x, y, 3, 3);
if(IsUpTextMulti('hop', 'own', 'illo'))then
begin
Wait(100 + Random(100));
Mouse(x,y,3,3, false);
Wait(50 + Random(35));
ChooseOption(x, y, 'Chop');
Wait(50 + Random(100));
end;
repeat
begin
If (InvFull) then bankreq;
MMouse(x, y, 3, 3);
wait(500+Random(1000));
FindEnt(3160112);
FindHead;
WereHuman;
end;
until (not(IsUpText('hop')));
Randomfind;
end;
end;
until ((InvFull) or (TimeFromMark(Start)>=15000)) {Fail Safe}
if(TimeFromMark(Start)>=15000) then
begin
GetMeOut;
WriteLn('problem Chopping');
end;
end;
{__________________________________________
| Main Loop |
|__________________________________________|}
begin
setupsrl;
DeclareDTM;
ActivateClient;
Willows := 0;
ClearDebug;
Siganture;
DeclarePlayers;
repeat
If (Not(LoggedIn)) then LoginPlayer;
SetupPlayer;
repeat
Doload;
bankreq;
Report;
until (Willows >= Loadstodo)
if(Willows >= Loadstodo)then
begin
GetAllLevels;
Summary;
LogOut;
NextPlayer(True);
Willows := 0;
SetupPlayer;
end;
until False;
end.