OK this is my first script and it is EXTREMELY simple, any ideas or suggestions on how to make it better?, e.c. antibans, more percise chopping, antirandoms?
thanks very much
SCAR Code:
program Treekiller;
//This is my frist script, so please post proggies an such.
//fill out login information
//fill out tree color and direction to run away, if attacked
//if anyone has any suggestions or anything to make this better please post
//can use for any tree as long as you pick the color
//has antirandoms but haven't had the time to check if they work. but they should
//Special thanks to RogerUK, hairy duncan2, and King of Knives for helping me with getting the script running.
{.include SRL/SRL.scar}
//Variables
var
Loads: integer;
x,y : integer;
//Constants
Const
TreeColor = 531741; //Set the Tree Color
StartPlayer = 0;
NumberOfUsers = 1;
WaitTime = 5000; //5 Seconds to Wait
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers( HowManyPlayers );
CurrentPlayer :=0;
Players[0].Name :='username';
Players[0].Pass :='password';
Players[0].Nick :='3-4 letter from your username';
Players[0].Active:=True; // If You use This Player Set True
NickNameBmp:=CreateBitMapMaskFromText(Players[CurrentPlayer].Nick,UpChars)
if (not(LoggedIn)) then LoginPlayer;
end;
Procedure AntiRandoms;
Begin
FindTalk;
FindNormalRandoms;
if (FindFight = True) then
begin
RunAwayDirection('N'); //choose wisely
Wait(10000 + random(3000));
RunBack;
end;
end;
Procedure Cut;
Begin
Repeat
if(FindColorSpiralTolerance(x,y,TreeColor,MSX1,MSY1,MSX2,MSY2,5)) then
begin
MMouse(x,y,0,0);
Wait(250+random(50));
Mouse(x,y,0,0,true);
Wait(500 + random(250));
AntiRandoms;
Wait(WaitTime +(random(500)))
end;
until(InvFull);
end;
Procedure Drop;
Begin
DropAll;
Loads:=Loads+1;
End;
Procedure Prog;
Begin
ClearDebug;
WriteLn('----->Welcome to the killer of trees :D<-----');
WriteLn(' ');
WriteLn('--------------------------------------------');
WriteLn('------------->Progress Report<--------------');
WriteLn('You have cut down' +IntToStr(Loads)+ 'loads!');
WriteLn('---------->End of Progress Report<----------');
WriteLn('--------------------------------------------');
end;
begin
ActivateClient;
SetupSRL;
DeclarePlayers;
repeat
NickNameBmp:=CreateBitMapMaskFromText(Players[CurrentPlayer].Nick,UpChars);
Cut;
Drop;
ClearDebug;
Prog;
until(IsFKeyDown(12));
end.