Using the new scar i designed a form, is there a tutorial to help implement this?
How exactly do i make the report add up how many willows count? **see script below
What can i improve? in terms of the current functions and procedures.
It doesnt do anything but cut a load of willows and log out at the moment. And antiban is still being developed. Any suggestions?
SCAR Code:
{.include srl/srl.scar}
var
willows,i:integer;
StartXP, EndXP, TotalXP, WillowLoads, LoadNumber:integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
// Siganture
Procedure Siganture;
Begin
Writeln('_______________________________');
Writeln('| Me_ntal"s |');
Writeln('| Edgeville |');
Writeln('| Willow Cutter |');
Writeln('|______________________________|');
end;
Function FindFastRandoms:Boolean;
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;
// Soon coming AntiBan
Procedure WereHuman;
begin
wait(10)
end;
// Updating Report
procedure Report;
begin
ClearDebug;
Writeln('_______________________________');
Writeln('| |');
Writeln('| Me_ntal"s |');
Writeln('| Edgeville |');
Writeln('| Willow Cutter |');
Writeln('|______________________________|');
Writeln('')
Writeln('Willows Cut:'+IntToStr(Willows));
Writeln('Exp Gained:'+IntToStr(TotalXP));
end;
// Doesnt click till the tree falls
Procedure Fallen;
Begin
repeat
FindFastRandoms;
WereHuman
wait(1000+Random(1000));
Report;
If (InvFull) then
exit;
until (not(IsUpText('hop')));
end;
//Main Log chopping function
Procedure Doload;
begin
repeat
If (FindColorTolerance(x,y, 3160112, msx1,msy1,msx2,msy2, 3)) or
(FindColorTolerance(x,y, 3043424, msx1,msy1,msx2,msy2, 3)) then
begin
repeat
Wait(100 + Random(500));
MMouse(x,y,3,3);
if(IsUpText('hop'))or(IsUpText('own'))then
begin
if IsUpTextMulti('ree', 'ak', 'ew') then
Exit;
if IsUpText('illow') then
begin
Report;
DisguiseScar('Chopping Some Logs');
Wait(100 + Random(500));
Mouse(x, y, 3, 3, true);
FindFastRandoms;
Fallen;
end;
end;
until (not(IsUpText('hop')));
end;
Until (InvFull)
end;
//Only Once Setup
Procedure SetupScript;
Begin
setupsrl;
ClearDebug;
DisguiseScar('Setup Begins');
Wait(500)
Siganture;
ActivateClient;
DeclarePlayers;
LoginPlayer;
If (Not(LoggedIn)) then
Begin
Status('Logging In')
Loginplayer;
end;
end;
//Main loop
begin
SetupScript;
repeat
repeat
HighestAngle;
MakeCompass('E');
StartXP := GetXp('Woodcutting')
Report;
DoLoad
until (LoadNumber >= WillowLoads)
EndXP := GetXp('Woodcutting')
TotalXP := (EndXP - StartXP)
Report;
LogOut;
NextPlayer(True);
LoadNumber := 0
until False;
end.