Progress Report:
[Error] (24:11): Duplicate identifier 'STATUS' at line 23
Fixed that (changed the procedure to Statuss) then
Progress Report:
[Error] (26:3): Unknown identifier 'aStatus' at line 25
Fixed that (added a global var) then
Progress Report:
[Error] (143:33): colon (':') expected at line 142
Fixed that (SwitchTree should be a procedure, and all 2 semi-colons on the end) then
Progress Report:
[Error] (152:27): colon (':') expected at line 151
Fixed that (needed another end) then
Progress Report:
[Error] (212:10): Unknown identifier 'SwitchTrees' at line 211
Fixed that (
procedure SwitchTree needs to actually be
function SwitchTrees as a boolean [doesn't make sense because you never give a result]) then it finally loaded!
Running now.
EDIT:
- Proggy says Willows
- Where you have the searching for levelling up text, use
if LevelUp
- Try using both reflection and colour random checks
- Use reflection and colour bank opening, so you'd have:
Simba Code:
If Not R_OpenBank(Bank_DR) Then
If Not OpenBank(Bank_DR, False, False) Then //Tries all colour methods
Exit;
- When the oak has chopped down, it sits there moving the mouse around looking for another, even though they're all normal trees. Just pointing that out.
EDIT2:
Working version with what I pointed out above:
Simba Code:
program BoomGoesTheWillows;
{$define SMART}
{$i srl/srl.scar}
{$i Reflection/Reflection.simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'banked'; //Read the thread to see valid arguments.
Integers[4]:= 1000; //Amount of loads you want to do.
end;
end;
var
aStatus : Integer;
Procedure Statuss(M : Integer);
Begin
aStatus := M;
End;
Procedure AxeWielded;
var
Equipped : integer;
TheIDs: TIntegerArray;
Hatchet : TInvItemArray;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
TheIDs := [1351, 1357, 1361, 6739, 1348, 1355, 1359, 1353];
GameTab(tab_Inv);
Wait(500 + Random(200));
if(R_ItemIDExistsEx(TheIDs, Hatchet))then
begin
Players[CurrentPlayer].Booleans[0] := False;
Writeln('Hatchet is in inventory.');
Exit;
end else
GameTab(tab_Equip);
Wait(500 + Random(200));
Equipped := GetEquippedIDAt(3);
if(InIntArray(TheIDs, Equipped))then
begin
Players[CurrentPlayer].Booleans[0] := True;
Writeln('Hatchet is equipped.');
Exit;
end;
End;
Procedure LevelTalking;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
If LevelUp then
Begin
Inc(Players[CurrentPlayer].Integers[2]);
Writeln('Woooot we have now gained'+IntToStr(Players[CurrentPlayer].Integers[2])+' levels!');
Begin
Case Random(10) Of
0: TypeSend('Guess what... I levelled!');
1: TypeSend('w00t lvld');
2: TypeSend('lvld again...');
3: TypeSend('grats me! I lvld!');
4: TypeSend('gay lag, didnt realise i lvld');
5: TypeSend('woopdewoop');
6: TypeSend('this levelling stuff is getting boring...');
7: TypeSend('dangdarnit, I jooost lavallled');
8: TypeSend('can we have a party cause i just lvld');
9: TypeSend('house party at mine! jokes...');
End;
End;
End;
End;
Procedure ProgressReport;
Begin
LevelTalking;
cleardebug;
Writeln('[-----------------------------]');
Writeln('[ BoomGoesTheWillows ]');
Writeln('[-----------------------------]');
Writeln(' We worked for ' + TimeRunning);
Writeln(' Booomed ' + IntToStr(Players[CurrentPlayer].Integers[0])+' Oaks');
Writeln(' Loads Done:' + IntToStr(Players[CurrentPlayer].Integers[1]));
Writeln(' Leveled ' + IntToStr(Players[CurrentPlayer].Integers[2]));
Writeln(' Antibanned ' + IntToStr(Players[CurrentPlayer].Integers[3]));
Writeln('[-----------------------------]');
End;
procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: begin
Wait(100 + Random(50));
Exit;
end;
end;
Inc(Players[CurrentPlayer].Integers[3]);
end;
Procedure AntiRandoms;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
LevelTalking;
R_FindRandoms;
FindNormalRandoms;
Wait(300+Random(200));
FindLamp('Woodcutting');
End;
Function WalkToTrees: Boolean;
Begin
If Not LoggedIn Then
Exit;
if not WalkToTile(Point(3101, 3245), 1, 1) then
{ if not WalkToTile(Point(3100, 3241), 1, 1) then }
begin
Writeln('Cant');
Exit;
end;
Wait(1000+ Random(1000));
Players[CurrentPlayer].Loc := 'at trees';
Result := True;
End;
function SwitchTrees(N : Integer) : Boolean;
Begin
If Not LoggedIn Then
Exit;
Case N of
1 : if WalkToTile(Point(3101, 3245), 1, 1) then
Statuss(1);
2 : if WalkToTile(Point(3101, 3245), 1, 1) then
Statuss(2);
end;
Wait(1000+ Random(1000));
End;
Function FindTrees(Var X, Y : Integer; W, H, X1, Y1, X2, Y2 : Integer): Boolean;
Var
i : Integer;
TPA : TPointArray;
ATPA : T2DPointArray;
begin
if not LoggedIn then Exit;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.24, 3.81);
begin
FindColorsSpiralTolerance(x, y, TPA, 3038032, MSX1, MSY1, MSX2, MSY2, 2);
SetColorToleranceSpeed(1);
ATPA := SplitTPAEx(TPA, 40, 40);
if (Length(ATPA) = 0) then
Exit;
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
h := High(ATPA);
for i := 0 to h do
begin;
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 1, 1);
Wait(250 + Random(200));
if WaitUpText('ak', 1000) then
begin
Result := True;
break;
end;
end;
if IsUpText('ak') then
Writeln('Found the Oak!');
End;
End;
Function FoundTrees(Var X, Y : Integer): Boolean;
Begin
Result := FindTrees(X, Y, 35, 35, MSX1, MSY1, MSX2, MSY2);
End;
Function CuttingCheck:Boolean;
Begin
if CharacterAnimating then
Wait(200);
if CharacterAnimating then
Result := True;
End;
Function BoomTrees: Boolean;
Var
X, Y, Tried : Integer;
Begin
if Not LoggedIn then
Exit;
Repeat
if Tried = 5 then
begin
Writeln('No Oaks found, switching');
if aStatus = 1 then
if SwitchTrees(2) then
begin
Tried := 0;
end else
if aStatus = 2 then
if SwitchTrees(1) then
Tried := 0;
end;
if not FoundTrees(X, Y) then
Begin
Inc(Tried);
Writeln('didnt find');
Wait(2000 + Random(500));
Continue;
End;
Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(500));
Repeat
LevelTalking;
if CuttingCheck then
begin
Antiban
AntiRandoms
end;
if InvFull then
Break;
Until not (CuttingCheck);
Until InvFull;
Players[CurrentPlayer].Loc := 'chopped trees';
Result := True;
End;
Function WalkToBank: Boolean;
Begin
If Not LoggedIn Then
Exit;
If Not WalkToTile(Point(3092, 3244), 1, 1) Then
Exit;
Players[CurrentPlayer].Loc := 'at bank';
Result := True;
End;
Function Bank: Boolean;
Var
i : integer;
Begin
If Not LoggedIn Then
Exit;
Wait(1000+ Random(1000));
If Not R_OpenBank(Bank_DR) Then
If Not OpenBank(Bank_DR, False, False) Then //Tries all colour methods
Exit;
for i := 1 + Integer(not Players[CurrentPlayer].Booleans[0]) to 28 do
begin
Deposit(i, 28, True);
end;
Players[CurrentPlayer].Loc := 'banked';
Result := True;
CloseBank;
Inc(Players[CurrentPlayer].Integers[1]);
if Players[CurrentPlayer].Booleans[0] then
IncEx(Players[CurrentPlayer].Integers[0], 28)
else
IncEx(Players[CurrentPlayer].Integers[0], 27);
ProgressReport;
End;
Procedure MainLoop;
Begin
repeat
Case Lowercase(Players[CurrentPlayer].Loc) of
'banked':
if WalkToTrees then
Players[CurrentPlayer].Loc := 'at trees';
'at trees':
if BoomTrees then
Players[CurrentPlayer].Loc := 'chopped trees';
'chopped trees':
if WalkToBank then
Players[CurrentPlayer].Loc := 'at bank';
'at bank':
if Bank then
Players[CurrentPlayer].Loc := 'banked';
end;
until(Players[CurrentPlayer].Integers[1] >= Players[CurrentPlayer].Integers[4]);
End;
{Int[0] = Trees Chopped
Int[1] = Loads Done
Int[2] = Levels
Int[3] = Antiban
Int[4] = Loads to do
Bool[0] = Axe}
begin
ClearDebug;
ClearReport;
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
begin
declareplayers;
LoginPlayer;
ProgressReport;
AxeWielded;
MakeCompass('South');
SetAngle(True);
Gametab(tab_Inv);
repeat
MainLoop
until(false);
end;
end.
Richard.