It's my first real script..Even though it's not a real script. Lol.
Pick the normal tree colors, start with an axe wielded or in inventory.
Start wherever there are normal trees.
It's only supposed to do 1 load right now..
I'm still updating it =]
Please test it for me.
v1.3- SRL Rev #24
-BETA
Created basic skeleton of script.
-v1.1
Added MultiPlayer.
-v1.2
Fixed minor mistakes.
-v1.3
Changed it to a Willow PowerChopper
Added AntiBan;
Future Updates
MultiPlayer - Done
AntiBan - Done
Draynor Willow Chopper/Banker
SCAR Code:
{.Script Info:
# ScriptName = PowerChopper v1.3
# Author = TheVoiceInYourHead
# Description =
# Version = 1.3
# Date = Sep. 02, 2008
# Comments =
/Script Info}
program PowerChopper;
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Woodcutting.scar}
var
Logs, Ents, z: Integer;
Colors: TIntegerArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Colors := []; //Setup Willow Tree colors here
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
Writeln( IntToStr ( HowManyPlayers ) + ' Players' );
End;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Woodcutting', False);
3: RandomMovement;
4: BoredHuman;
5: DoEmote(400 +Random(90));
end;
end;
function waitChop: boolean;
var
i, c, x, y: Integer;
begin
if not LoggedIn then Exit;
i := InvCount;
MarkTime(c);
repeat
AntiBan;
FindNormalRandoms;
if FindEnt(x, y, True) then
Inc(Ents);
Wait(120);
until((InvCount>i) or (TimeFromMark(c) > 800000+random(60000)));
Result := True;
end;
function dropLogs: boolean;
var
x, y: Integer;
begin
if not LoggedIn then Exit;
repeat
Logs := Logs + CountItems(srl_GetBitmap(bmp_Log_Willow), 'bmp', [0])
ClickAllItems(srl_GetBitmap(bmp_Log_Willow), 'bmp', 'rop', 120, [0]);
until(not(FindBitmap(srl_GetBitmap(bmp_Log_Willow), x, y)));
Result := True;
end;
//Thanks to Cazax and Nava2 for help
function findTree(colors: tintegerarray): boolean;
var
MainTPA: TPointArray;
MainATPA, ColorTPA: T2DPointArray;
MainPoint: TPoint;
i, c, lingth: Integer;
begin
if not LoggedIn then Exit;
for c := 0 to High(colors) do
begin
FindColorsSpiralTolerance(MSCX, MSCY, ColorTPA[c], colors[c], MSX1, MSY1, MSX2, MSY2, 5);
MainTPA := CombineTPA(MainTPA, ColorTPA[c]);
end;
if Length(MainTPA)=0 then
begin
WriteLn('Pick new colors..');
TerminateScript;
end;
MainATPA := TPAtoATPAEx(MainTPA, 4, 4);
Lingth := High(MainATPA);
for i := 0 to Lingth do
begin
MainPoint := MiddleTPA(MainATPA[i]);
MMouse(MainPoint.x, MainPoint.y, 0, 0);
Wait(75 + Random(51));
if IsUpText('illow') then
begin
Mouse(MainPoint.x, MainPoint.y, 0, 0, False);
Wait(250 + Random(250));
Result := ChooseOption('hop');
If Result Then
Exit;
end;
end;
if Not Result Then
Writeln('No Tree');
end;
procedure Proggy;
begin
WriteLn('<><><><><>TViYH''s PowerChopper');
WriteLn('Total Ents: ' + IntToStr(Ents));
WriteLn('Total Logs: ' + IntToStr(Logs));
WriteLn('Total Time: ' + IntToStr((GetTimeRunning * 1000) * 60) + ' minutes');
end;
procedure MainLoop;
begin
if not LoggedIn then Exit;
if not FindAxe then
begin
WriteLn('No axe..');
TerminateScript;
end;
repeat
if findTree(Colors) then
begin
waitChop;
end;
until(InvFull);
dropLogs;
AntiBan;
Proggy;
end;
begin
SetupSRL;
DeclarePlayers;
ActivateClient;
for z := 0 to (HowManyPlayers-1) do
begin
LoginPlayer;
MainLoop;
NextPlayer(False);
end;
end.