natinsatin1
2007-11-23 23:40:16
So yea I decieded to try making a scrip and heres how it went :/ I think some of the stuff is out dated and i will have to make a v2 of updated stuff. Also it says the script it by someone els because I started it off their guid
{.Script Info:
# ScriptName = LumberJack
# Author = NatinSatin
# Description = Cuts trees and drop the logs (What els is it really?)
# Version = 1.0
# Date = November 23, 2007
# Comments = My fisrt ever :/
/Script Info}
program LumberJack;
{.include SRL/SRL.scar}
const
LoadsPerPlayer = 10; //Amounts of loads per player before switching to next player.
TreeColor = 0; //Fill in the treecolor here.
WaitPerTree = 5000; //the time to wait while we are chopping the tree in Miliseconds.
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0;
Players[0].Name := ''; //UserName.
Players[0].Pass := ''; //Password.
Players[0].Nick := ''; //3-4 Letters Of UserName.
Players[0].Active := True; //True If You Are Using This Player, False If Not.
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
End;
Procedure EntFinder; //Made By YoHoJo. Modded by Bobbohobbo
Var
EX, EY: integer;
FX, FY: integer;
SafeEntWait: LongInt;
begin
If (Not (LoggedIn)) Then
Exit;
Begin
Status('Checking For Ent')
If
(FindObjCustom(EX, EY, ['Willow'], [4690821], 5)) Then
Begin
MMouse(EX, EY, 0, 0)
If FindColorTolerance(FX, FY, 55769, 85, 15, 115, 15, 20) Then
Begin
Status('Ent Found');
MouseFindFlag(645, 83, 2, 2);
MarkTime(SafeEntWait)
Repeat
FTWait(5)
FindNormalRandoms;
If Not (LoggedIn) Then
NextPlayer(False);
Until TimeFromMark(SafeEntWait) > 29000 + Random(10000)
End;
End;
End;
End;
Function FindFastRandoms: Boolean;//Credits To WT-Fakawi.
Var
I: Integer;
Begin
For I:=1 To 11 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;
8: Begin
If InBlack Then
Begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
End;
End;
9: RC;
10: Respond;
11: ClickToContinue;
End;
Wait(1);
End;
End;
Procedure FindRandoms;
Begin
EntFinder;
FindTalk;
FindFastRandoms;
FindNormalRandoms;
FindLamp('Woodcutting');
SolvePinball;
If(FindFight)Then
Begin
MakeCompass('N');
RunTo('E', True);
Wait(7000 +Random(3000));
RunBack;
End;
End;
Procedure RandomlyChosenSkill;
Begin
Case Random(11) Of
0: HoverSkill('Fishing', False);
1: HoverSkill('Strength', False);
2: HoverSkill('Defence', False);
3: HoverSkill('Range', False);
4: HoverSkill('Prayer', False);
5: HoverSkill('Magic', False);
6: HoverSkill('Runecraft', False);
7: HoverSkill('Hitpoints', False);
8: HoverSkill('Agility', False);
9: HoverSkill('Herblore', False);
10: HoverSkill('Attack', False);
End;
End;
Procedure AntiBan;
Begin
If(Not(LoggedIn))Then
Exit;
Case Random(8) Of
0: RandomMovement;
1: HoverSkill('Woodcutting', False);
1: RandomRClick;
2: BoredHuman;
3: PickUpMouse;
4: AlmostLogout;
5: Begin
GameTab(2 +Random(12));
Wait(2000 +Random(1000));
GameTab(4);
End;
6: RandomlyChosenSkill;
End;
End;
procedure ChopTreeAndDrop;
var
x, y, MyMark : integer;
begin
if not Loggedin then Exit;
MarkTime(MyMark);
repeat
if FindObj(x, y, 'hop', TreeColor, 30) then
begin
Mouse(x, y, 0, 0, False);
if ChooseOption('hop') then
begin
//increase 1 to the total tree chop - if we had one
Wait(WaitPerTree);
Exit; //We clicked chop, now we can exit this procedure.
end;
end;
if TimeFromMark(MyMark) > (2 * 60 * 100) then
begin
Logout;
Exit;
end;
until false
end;
begin
SetupSRL;
DeclarePlayers;
if LoggedIn then Logout;
LoginPlayer;
repeat
ChopTree;
if InvFull then
begin
DropToPosition(2, 28);
Inc(Players[CurrentPlayer].Banked);
if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
begin
NextPlayer(True);
end;
end;
if not Loggedin then NextPlayer(False);
until false
end.