PDA

View Full Version : Freszone's AnyTreeWCutter



Intef i i i
04-10-2007, 03:59 PM
This is my first script. It litle bugs but remember it is my first script.

:bart:

Ashur2Good
05-18-2007, 09:41 AM
Well... I kinda fixed up the script if thats alright... Added some randoms, anti ban, better choping and stuff... Here it is:

//////////////////////////////////////////////////////////////
// Freszone's AnyTreeWCutter //
// Freszone = Intef I I I //
//----------------------------------------------------------//
// Version: 1.0 //
// //
//----------------------------------------------------------//
// SETUP //
// //
// 1. Set RS Very Bright and TRUE color 32bit //
// 2. Setup lines 23-37 and 48 //
// 3. Start logged out/logged in //
//----------------------------------------------------------//
// Credits //
// Credits to Ashur2Good for helping with the script ;) //
//////////////////////////////////////////////////////////////


program TreeChopper;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\Woodcutting.scar}


const
TreeColor = 4353420; //Color of the tree in Main Screen
TreeColorB = 2908240; //Another color of the tree in Main Screen
TreeColorC = 3438704; //Another color of the tree in Main Screen
StartPlayer=0;//Whos you're starting player
NumberOfUsers=1;//How many users
Time=10;//How many loads to do

var
Logs, i : Integer;

procedure DeclarePlayers;
begin
HowManyPlayers := NumberOfUsers; //How many players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;

Players[0].Name := ''; //UserName
Players[0].Pass := ''; //Password
Players[0].Nick := ''; //3-4 letters of UserName
Players[0].Active := True;
Players[0].Boolean1 := False; //If not equiped put it in to first inv slot

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);

end;


procedure LoggingIn;

begin
SetUpSRL;
DeclarePlayers;
LoginPlayer;

end;


function FindFastRandoms: Boolean; //By WT-Fakawi.
var
f: Integer;
begin
for f := 1 to 8 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;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;


procedure DoAntiRandoms;
begin
FindTalk;
FindNormalRandoms;
FindFastRandoms;
PopUp('ontinue');
end;


procedure AntiBans;
begin
case Random(10) of
1: PickUpMouse;
2: MouseBox(MSx1, MSy1, MSx2, MSy2, 3);
3: AlmostLogout;
4: HoverSkill('Defence', False);
5: HoverSkill('Attack', False);
6: MouseBox(MIx1, MIy1, MIx2, MIy2, 3);
7: HoverSkill('Strength', False);
8: RandomRClick;
9: BoredHuman;
end;
end;


procedure CutTree;
begin
repeat
FindObj(a,b,'ree',treecolor,5)or
FindObj(a,b,'ree',treecolorB,5)or
FindObj(a,b,'ree',treecolorC,5)then
begin
wait(100+Random(50));
Mouse(a,b,2,2,true);
DoAntiRandoms;
AntiBans;
if not LoggedIn then NextPlayer(False);
Logs:= Logs + 1;
until(Invfull)
end;



procedure droplogs;
begin
Gametab(4);
DropTo(2,28);
DoAntiRandoms;
end;



Procedure Progress:
begin
Writeln('[]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[]');
Writeln(' ~~~~~~~~~~~~~~Report~~~~~~~~~~~~~~');
Writeln(' Worked For : ' + ScriptTime2(2))
Writeln(' Choped Down ' + IntToStr(Logs) ' Logs');
Writeln(' ~~~~~~~~~~~~~~Report~~~~~~~~~~~~~~');
Writeln('[]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[]');
SRLRandomsReport;
end;

begin
LoggingIn;
ClearDebug;
ActivateClient;
repeat
i:= i + 1;
CutTree;
DropAllLogs;
if (Time=i)then
begin
NextPlayer(True);
HighestAngle;
MakeCompass('N');
Writeln('Switched players successfully :)');
until(false)
end.