SCAR Code:
program PowerChopper;
{
11111111 11111111111 11111111 11111 11111
11 11 111 11 11 111 111
11 11 111 11 11 111 111
11 11 111 11 11 111 111
111111111 111 11 11 111111111111
111111111 111 11 11 111111111111
11 11 111 11 11 111 111
11 11 111 11 11 111 111
11 11 111 11 11 111 111
111111111 111111111111 11111111 11111 11111
"This stands for BuckleyInDaHouse BIDH, you should keep it on
your scripts you make." (Everything in the "" can be deleted
it is not neccessary).
::PUT YOUR INSTRUCTIONS HERE::
{.Include srl/srl.scar}
{.Include srl/srl/skill/woodcutting.scar}
const Tree1 = 0; //try working auto color with these
const Tree2 = 0;
const Tree3 = 0;
const Tree4 = 0;
var
Log, LogM: Integer;
Loads: Integer;
TreeXp, Dropped: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 4; // Compliant with Dynamic Array;
NumberOfPlayers(HowManyPlayers); // Set the Players Array Length;
CurrentPlayer := 0; // CurrentPlayer = internal counter
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; // <- screen nickname (three letters from name)
Players[0].String1 := ''; //Type Of Tree your powerchopping
Players[0].Integer1 := 9; //Time to wait while Cutting
Players[0].Integer2 := 1; //Loads to do before switching players
Players[0].Skill := 'Woodcutting'; //Skill for Genie Lamp Random
Players[0].Loc := 'Chopping'; //Dont Change This
Players[0].Active := True; //Is this player Active?
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := ''; // <- screen nickname (three letters from name)
Players[1].String1 := 'Oak'; //Type Of Tree your powerchopping
Players[1].Integer1 := 9; //Time to wait while Cutting
Players[1].Integer2 := 1; //Loads to do before switching players
Players[1].Skill := 'Woodcutting'; //Skill for Genie Lamp Random
Players[1].Loc := 'Chopping'; //Dont Change This
Players[1].Active := True; //Is this player Active?
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := ''; // <- screen nickname (three letters from name)
Players[2].String1 := 'Oak'; //Type Of Tree your powerchopping
Players[2].Integer1 := 9; //Time to wait while Cutting
Players[2].Integer2 := 1; //Loads to do before switching players
Players[2].Skill := 'Woodcutting'; //Skill for Genie Lamp Random
Players[2].Loc := 'Chopping'; //Dont Change This
Players[2].Active := True; //Is this player Active?
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := ''; // <- screen nickname (three letters from name)
Players[3].String1 := 'Oak'; //Type Of Tree your powerchopping
Players[3].Integer1 := 9; //Time to wait while Cutting
Players[3].Integer2 := 1; //Loads to do before switching players
Players[3].Skill := 'Woodcutting'; //Skill for Genie Lamp Random
Players[3].Loc := 'Chopping'; //Dont Change This
Players[3].Active := True; //Is this player Active?}
end;
{I added a ClearDeBug in right here just so it looks nicer.}
procedure DeclareImages;
begin
ClearDeBug;
Log := DTMFromString('78DA632C6262601065644006AE76E20CFF813' +
'448F43F1030D600D570A1AA81C8C248209D01542343404D03508D' +
'04AA1A4F27295435E94035FC04CC2901AA9125A0261FA8861BBF1' +
'A0048770A0D');
LogM := BitmapFromString(43, 37, 'z78DAED99D111C02008435762' +
'0AF71FA977FD6FEF5A3424900CA0F080366AC45CAD5B610226600' +
'216655D9E34216B64DF3250FD1A031B8195566DD532AB55F58F62' +
'DFF68BA11301864954FC0EB8031908E0A780D39B6122E1F7A2E7E' +
'AA2E8C3FB79E65A8F6D022660025A044EB83B1360E3507B7B86DC' +
'1D99E3AE3BA2BDF986A074CF17180FC95C5FCC14CF3947F49E5F1' +
'330011330810904DEFF627957FCEF2511B3E30549E444EE');
end;
function FindFastRandoms: Boolean; // By WT-Fakawi.
var
i: Integer;
begin
for I := 1 to 14 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: if RC then
Result := True;
9: if FindFight then
begin
Result := True;
RunAwayDirection(Players[CurrentPlayer].String2);
Wait(15000 + Random(7500));
RunBack;
end;
10: if FindTalk then
Result := True;
11: FindLamp(Players[CurrentPlayer].Skill);
12: FindNormalRandoms;
13: FindHead;
14: ClickToContinue;
end;
Wait(1);
end;
end;
procedure StopTheEnts;
var
Tx, Ty: Integer;
begin
if (IsUpTextMulti('ree', 'hop down', 'Cho')) then
begin
Wait(500);
if (FindColor(Tx, Ty, 65535, 87, 22, 150, 15)) then
begin
Mouse(647, 83, 2, 2, True);
Flag;
MMouse(Tx, Ty, 0, 0);
repeat
Wait(1000 + Random(150));
FindFastRandoms;
until (not (FindColor(Tx, Ty, 65535, 87, 22, 150, 15)))
end;
Exit;
end;
end;
procedure WrapUpCommonStuff;
begin
StopTheEnts;
FindFastRandoms;
end;
procedure ChopChop;
var
Tol, iX, iY: Integer;
begin
if (not (LoggedIn)) then NextPlayer(False);
Tol := 5;
repeat
if (FindColorSpiralTolerance(iX, iY, Tree1, msx1, msy1, msx2, msy2, Tol)) or
(FindColorSpiralTolerance(iX, iY, Tree2, msx1, msy1, msx2, msy2, Tol)) or
(FindColorSpiralTolerance(iX, iY, Tree3, msx1, msy1, msx2, msy2, Tol)) or
(FindColorSpiralTolerance(iX, iY, Tree4, msx1, msy1, msx2, msy2, Tol)) then
MMouse(iX, iY, 2, 2);
Wait(750 + Random(750));
FindHead;
if (not (IsUpTextMulti('ree', 'hop down', 'Cho'))) then
begin
WriteLn('Couldn''t Find Tree, Increasing Tolerance');
end;
Tol := Tol + 1;
Wait(150 + Random(250));
FindHead;
case Random(2) of
0: Exit;
1: WriteLn(' Tolerance := ' + IntToStr(Tol));
end;
until (IsUpTextMulti('ree', 'hop down', 'Cho') or (Tol = 20))
if (Tol = 20) then
begin
Players[CurrentPlayer].Loc := 'No Tree';
NextPlayer(False);
end;
StopTheEnts;
FindFastRandoms;
Mouse(iX, iY, 0, 0, True);
Flag;
WrapUpCommonStuff;
Wait(Players[CurrentPlayer].Integer1 * 1000 + Random(1500));
end;
procedure DropIt;
var
cx, cy: Integer;
begin
repeat
if (FindDTM(Log, cx, cy, mix1, miy1, mix2, miy2)) then
MMouse(cx, cy, 2, 2);
Wait(100 + Random(256));
Mouse(cx, cy, 0, 0, False);
if (not (ChooseOption(cx, cy, 'rop'))) then
begin
MouseItem(1, True);
end;
ChooseOption(cx, cy, 'rop');
Wait(1500 + Random(750));
Dropped := Dropped + 1;
until (not (FindDTM(Log, cx, cy, mix1, miy1, mix2, miy2)))
Players[CurrentPlayer].Integer2 := Players[CurrentPlayer].Integer2 + Dropped;
Loads := Loads + 1;
end;
procedure GetTreeExp1;
begin
case LowerCase(Players[CurrentPlayer].String1) of
'tree': TreeXP := 25;
'oak': TreeXP := 75 / 2;
'willow': TreeXP := 125 / 2;
'maple': TreeXP := 100;
'mahogany': TreeXP := 125;
'yew': TreeXP := 175;
'magic': TreeXP := 250;
end;
end;
procedure SetUp;
begin
if (not (LoggedIn)) then LoginPlayer;
FindAxeHeadColor;
SetChat('On', 1);
SetChat('Off', 2);
SetChat('Off', 3);
HighestAngle;
GetTreeExp1;
Loads := 0;
Dropped := 0;
end;
procedure Report;
begin
WriteLn('BuckleyInDaHouse''s Power Chopper Version 1');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('Player : ' + Players[CurrentPlayer].Name);
WriteLn('Auto Time : ' + ScriptTime2(2));
WriteLn('Loc : ' + Players[CurrentPlayer].Loc);
WriteLn('Chopped : ' + IntToStr(Players[CurrentPlayer].Integer2) + ' Logs');
WriteLn('Experience : ' + IntToStr(Players[CurrentPlayer].Integer2 * TreeXP));
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('');
WriteLn('Please report any bugs at my thread : [url]http://www.villavu.com/forum/showthread.php?t=9617[/url] ');
end;
begin
SetUpSRL;
DeclarePlayers;
DeclareImages;
repeat
repeat
SetUp;
repeat
ChopChop;
until (InvFull);
DropIt;
Report;
until (Loads = Players[CurrentPlayer].Integer2)
NextPlayer(True);
until (False)
end.