SCAR Code:
procedure BankToWillows;
begin
if (not(LoggedIn)) then Exit;
if (EquipAxe=True) and
(EquipAxe=False) then
begin
SetRun(True);
wait(250 + Random(250));
GameTab(4);
wait(500);
WaterColor := FindWaterColor;
wait(250);
RadialWalk(WaterColor, 234, 220, 61, 4, 1);
WriteLn('>At the willows =P')
end;
if (not(FindAxe=False)) then
Exit;
end;
EquipAxe will never be both true and false.
Made some changes, doubt anything fixed your error; I couldn't run it, so I don't know where the error is
SCAR Code:
program Rs2prosDraynorWillowDestroyer;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
//----------------------------------------------------//
// //
// --Rs2pros Draynor Willow Destroyer-- //
// --Finds and Destroys The Draynor Willows-- //
// //
//----------------------------------------------------//
//----------------------Setup-------------------------//
//1.Start in Draynor Bank most southern booth with a //
//WC axe either wielded or in your inventory. //
//2.Fill in your player info (lines 18 and 22-54) and //
//hit run =P //
//---------For SCAR DIVI 3.12 and SRL 4 REV 5---------//
const
LoadsToDestroy = 2;// Number of loads to destroy per player.
Procedure DeclarePlayers;
begin
HowManyPlayers := 5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';//3 - 4 letters of YOUR username, example: "erna"
Players[0].Integers[0]:= 0000;// Pin if any.
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';//3 - 4 letters of YOUR username, example: "erna"
Players[1].Integers[0]:= 0000;// Pin if any.
Players[1].Active := True;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';//3 - 4 letters of YOUR username, example: "erna"
Players[2].Integers[0]:= 0000;// Pin if any.
Players[2].Active := True;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';//3 - 4 letters of YOUR username, example: "erna"
Players[3].Integers[0]:= 0000;// Pin if any.
Players[3].Active := True;
Players[4].Name := '';
Players[4].Pass := '';
Players[4].Nick := '';//3 - 4 letters of YOUR username, example: "erna"
Players[4].Integers[0]:= 0000;// Pin if any.
Players[4].Active := True;
end;
//------------------------code------------------------//
//--Dont touch below unless you know what you doing.--//
var
TotalXP, LogsDestroyed, LoadsDestroyed, x, y: Integer;
procedure Report;
begin
WriteLn('~-~-~-~-~-~-~-~-~-~-~-~-<^>-~-~-~-~-~-~-~-~-~-~-~-~')
WriteLn('>Rs2Pros Draynor Willow Destroyer - Progress Report')
WriteLn('> ')
WriteLn('> Running Time : ' + (TimeRunning) + ' ')
WriteLn('> Banked Approximately : ' + IntToStr(LogsDestroyed) + ' logs!')
WriteLn('> Gained Approximately : ' + IntToStr(TotalXP) + ' XP!')
WriteLn('~-~-~-~-~-~-~-~-~-~-~-~-<^>-~-~-~-~-~-~-~-~-~-~-~-~')
end;
Procedure AntiNoob;
begin
if (GetCombatLevel < 20) then
begin
Logout;
TerminateScript;
end;
end;
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 10 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;
Logout;
TerminateScript;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Logout;
TerminateScript;
Exit;
end;
end;
9: RC;
10: Respond;
end;
wait(1);
end;
end;
procedure FindRandoms;
begin
FindTalk;
FindFastRandoms;
FindNormalRandoms;
FindLamp('Woodcutting');
SolvePinball;
if (FindFight) then
begin
MakeCompass('N');
RunTo('E', True);
Wait(7000 +Random(3000));
RunBack;
end;
end;
procedure ChangeChatSettings;
begin
if (not(LoggedIn)) then Exit;
SetChat('on', 1);
SetChat('friends', 2);
SetChat('on', 3);
SetChat('friends', 4);
end;
procedure AutoRespond;
begin
if (FindChatText('wc') or FindChatText('Wc') or FindChatText('Woodcut') or FindChatText('Woodcutting') or FindChatText('Woodcuttin')) and
(FindChatText('lvl?') or FindChatText('level?') or FindChatText('lvls') or FindChatText('levels') or FindChatText('lvl') or FindChatText('level') or FindChatText('lvls?') or FindChatText('levels?')) then
begin
wait(500 + Random(500));
case Random(2) of
0: TypeSend( IntToStr(Players[CurrentPlayer].integers[1]));
1: TypeSend('i''m' + IntToStr(Players[CurrentPlayer].integers[1]));
end;
end;
end;
procedure XPGained;
begin
TotalXP:=(LogsDestroyed)*67;
end;
Function NoContinueOn: Boolean;
var i, P: Integer;
begin
P := 0;
For i:=0 to HowManyPlayers - 1 do
Begin
If(Players[i].Active = False) Then
P := P + 1;
end;
If(P = HowManyPlayers) Then
Result := True;
end;
procedure BankToWillows;
begin
if (not(LoggedIn)) then Exit;
if (EquipAxe=True) and
(EquipAxe=False) then
begin
SetRun(True);
wait(250 + Random(250));
GameTab(4);
wait(500);
WaterColor := FindWaterColor;
wait(250);
RadialWalk(WaterColor, 234, 220, 61, 4, 1);
WriteLn('>At the willows =P')
end;
if (not(FindAxe=False)) then
Exit;
end;
procedure DestroyWillows;
begin
repeat
if (not(LoggedIn)) then Exit;
MakeCompass('N');
FindEnt(x, y, True);
if (FindObj(x, y, 'illow', 1590074, 5)) then
begin
MMouse(x, y, 1, 1);
FindEnt(x, y, True);
if (IsUpText('illow')) then
begin
Mouse(x, y, 0, 0, true);
FindRandoms;
FindEnt(x, y, True);
AutoRespond;
wait(7500 + Random(2500));
end;
end;
until (InvFull);
if (InvFull) then
begin
WriteLn('>Successfully destroyed a full load of WiLlOwZ!!!')
WriteLn('>Now banking these macroed goods =P')
end;
end;
procedure DestroyedWillowsToBank;
begin
if (not(LoggedIn)) then Exit;
Makecompass('N');
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 1, 1, true);
Flag;
wait(250 + Random(250));
end;
end;
procedure BankThemWillowz;
begin
if (not(LoggedIn)) then Exit;
OpenBankQuiet('db');
if (PinScreen) then
repeat
InPin(IntToStr(Players[CurrentPlayer].Integers[0]));
wait(500);
until (BankScreen);
if (BankScreen) then
begin
Deposit(2, 28, 2);
wait(500);
CloseBank;
XPGained;
end;
if (EquipAxe=True) then
LogsDestroyed:=(LogsDestroyed)+28
else
LogsDestroyed:=(LogsDestroyed)+27;
LoadsDestroyed:=(LoadsDestroyed)+1;
end;
procedure PlayerSetup;
begin
WriteLn('>Setting up player');
wait(250);
Players[CurrentPlayer].integers[1] := GetSkillLevel('woodcutting');
wait(250);
LogsDestroyed:=0;
LoadsDestroyed:=0;
AntiNoob;
wait(500);
ChangeChatSettings;
wait(500);
FindAxe;
wait(500);
HighestAngle;
MakeCompass('N');
end;
Procedure SetupScript;
Begin
SetupSRL;
DeclarePlayers;
ActivateClient;
wait(250 + Random(250));
end;
begin
repeat
SetupScript;
repeat
PlayerSetup;
repeat
wait(500 + Random(500));
if (not(LoggedIn)) then Exit;
BankToWillows;
DestroyWillows;
DestroyedWillowsToBank;
BankThemWillowz;
Report;
until (LoadsDestroyed=LoadsToDestroy);
if (LoadsDestroyed=LoadsToDestroy) then
NextPlayer(True);
until (not(Players[CurrentPlayer].Active));
until (NoContinueOn);
WriteLn(TheTime + ' All players are inactive.');
SendSRLReport;
end.