Log in

View Full Version : my 2nd script... check please



ummmmm0k
06-21-2007, 11:25 PM
ok well i finished my second script which is a powerchopper. i have anti randoms and antibans, but can someone check to see if i got it all set up right please.


program WoodCutter;
{.include SRL\SRL.Scar}
{.include SRL\SRL\Extended\xAntiBan.scar}
{.include SRL\SRL\Extended\xAntiRandoms.scar}
var
o, p: integer;
Clicks: Integer;
Loads: Integer;

const
TreeColor = 2904136; // set the color of the tree you are chopping here

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'ummmmm0k';
Players[0].Pass := '*******';
Players[0].Nick := 'mmmm'; //3 - 4 letters of YOUR username, example: sern
Players[0].Active := True;
end;


procedure AntiBanning;
begin
RotateEvery(20 + Random(10));
LeaveScreenEvery(5 + Random(5));
HoverEvery(15 + Random(5), 'random');
PickUpMouseEvery(5 + Random(10));
RandomRClickEvery(15 + Random(5));
if (KillScriptTime > 0) then
KillScript(KillScriptTime);
end;

procedure AntiRandom;
begin
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
end;
end;

procedure ProgressReport;
begin
ClearDebug;
Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
Writeln('You have completed ' + IntToStr(Loads) + ' Loads' + ' ');
Writeln('Worked For : ' + ScriptTime2(2))
Writeln('-=-Ummmmm0k Power Chopper Progress Report-=-');
end;

procedure FindTree;
begin
repeat;
wait(1000 + random(500));
if FindColorSpiral(p, o, TreeColor, 3, 3, 514, 338) then
begin
MMouse(p, o, 3, 3); // more random, coord.
Wait(50 + random(25));
if (IsUpText('hop')) then // Check up text.
begin
wait(200 + random(100));
AntiRandom;
Mouse(p, o, 1, 1, true);
Clicks := Clicks + 1;
wait(4000 + random(500));
end;
end;
Wait(3000 + random(500)); // So it won't endlessly click.
AntiRandom;
until (InvFull);
end;

procedure DropLogs;
begin
wait(100 + random(50));
wait(2000 + random(1000));
AntiRandom;
dropto(2, 28);
Loads := Loads + 1;
wait(100 + random(50));
AntiRandom;
end;

begin
SetupSRL;
DeclarePlayers;
if not Loggedin then LoginPlayer;
LoginPlayer;
repeat
if (not (LoggedIn)) then
Exit;
AntiRandom; // extra percautions
AntiBanning; // extra percautions
FindTree;
DropLogs;
AntiRandom;
AntiBanning;
ProgressReport;
until (false)
end.

JAD
06-21-2007, 11:49 PM
Looks pretty good :) You should definately use Tolerance with your FindColorSpiral's though :p

And check out my tut (links in sig) Learning the things to become a SRL member. Check out the multi player part, and any other parts you don't get. You should also check out the anti ban part to learn how to use a case with it, because that may be more efficient.

Also, your finding fight thing wouln't work, because SRL's FindNormalRandoms; finds a fight and solves it. So if a fight was there, it would have already been solved when your checking for one in your procedure :p

Keep it up!

ummmmm0k
06-22-2007, 12:49 AM
oops i forgot to put tolerance back in, i had it in there, but its on my cousins comp, i had to remake it on my comp since the whole thing wasnt put up on here, and i forgot to readd that