kemico2
06-18-2007, 02:58 AM
This is my second script I didnt think i should post in woodcutting forum so i posted it in here. All feedback is greatly appriacted. If anyone can help me with ents please tell me. I made some major updates but i dont have time to test can someone test for me? I just made an update. Could someone give me an example of someones script thats posted in the free script section that would be worthy of applying for membership with. This wood cutter will now be moved to the woodcutting section.
program DraynorWillowCutter;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/woodcutting.scar}
const
BankSymbolColor=11250352;
willowcolor1=2902351;
willowcolor2=3686456;
willowcolor3=2971728;
loadsperplayer=2;
PickWielded=true;
var
logs : integer; Trees : integer; loads : integer; tries : integer;
Procedure DeclarePlayers;
begin
HowManyPlayers :=6; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=0; // CurrentPlayer = Array Index
Players[0].Name :='krypton48';
Players[0].Pass :='201163l';
Players[0].Nick :='kry';
Players[0].Loc :='Loc1';
Players[0].Skill:='woodcutting';
Players[0].Active:=True;
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='Loc1';
Players[1].Skill:='';
Players[1].Active:=false;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Loc :='Loc1';
Players[2].Skill:='';
Players[2].Active:=false;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Loc :='Loc1';
Players[3].Skill:='';
Players[3].Active:=false;
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Loc :='Loc1';
Players[4].Skill:='';
Players[4].Active:=false;
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Loc :='Loc1';
Players[5].Skill:='';
Players[5].Active:=false;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
writeln(inttostr(HowManyPlayers)+' Players');
end;
procedure LoadDtms;
begin;
Logs:= DTMFromString('78DA63F460626078CA80021C2CC5C134239 4C' +
'F180854731B558DAB2D9A9A60A09AD7A86AFC5C2551D53801 D5BC' +
'4355939F668BAAC606D33D9E4E68E63802D5DC45556365228 2A20' +
'60013200B2C');
end;
Procedure ProgressReport;
begin;
Writeln('[]-------------------------------------------[]');
Writeln('Worked For : ' + ScriptTime2(2))
Writeln('Cut '+ IntToStr(trees) + ' Willows');
Writeln('Did '+ intToStr(loads) + ' loads');
Writeln('[]--------------------------------------------[]');
end;
Function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 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 sig;
begin;
writeln(' ____ __. .__ ')
writeln('| |/ _|____ _____ |__| ____ ____ ')
Writeln('| <_/ __ \ / \| |/ ___\/ _ \ ')
Writeln('| | \ ___/| Y Y \ \ \__( <_> )')
Writeln('|____|__ \___ >__|_| /__|\___ >____/ ')
Writeln(' \/ \/ \/ \/ ')
end;
Procedure PrepCharacter;
begin
Activateclient;
wait(30)
MakeCompass('N');
wait(30)
setchat('Hide',1)
setchat('friends',2)
setchat('off',3)
highestangle;
end;
procedure ToTrees;
begin
setrun(true)
case random(3) of
0: Mouse(640,125,2,2,true);
1: Mouse(628,126,2,2,true);
2: Mouse(645,144,2,2,true);
3: Mouse(621,117,2,2,true);
end
end;
procedure Antirandoms1;
begin
If(findFight = true)then
begin
RunAwayDirection('N')
wait(10000+random(3000))
Runback;
If(findent(willowcolor1))or
(findent(willowcolor2))or
(findent(willowcolor3))then
begin
RunAwayDirection('N')
Wait(10000+random(2000))
runback;
end
end
end;
Procedure antirandoms2;
begin;
FindFastRandoms;
FindNormalRandoms;
end;
Procedure antiban;
begin
case random(20) of
1 : RandomRClick;
2 : GameTab(1 + random(7));
3 : Boredhuman;
4 : Almostlogout;
5 : HoverSkill('woodcitting',false);
Wait(2222+random(333))
6 : PickupMouse
7 : LowestAnge;
Wait(5+random(5))
end
end;
Procedure CutTrees;
begin
wait(6000+random(2000))
repeat
AntiRandoms2;
FindHead;
If(findcolortolerance(x,y,willowcolor1,25,26,473,3 10,5))or
(findcolortolerance(x,y,willowcolor2,25,26,473,310 ,5))or
(findcolortolerance(x,y,willowcolor3,25,26,473,310 ,5))then
begin
Mmouse(x,y,2,2);
If(IsUpText('illow'))then
begin
Mouse(x,y,2,2,false)
AntiRandoms1;
chooseoption(x,y,'own')
wait(4000+random(3000))
end
end;
Until(InvFull)
end;
Procedure ToBank;
begin;
If(findSymbol(x,y,'bank'))then
begin
Mouse(x,y,2,2,true)
Wait(5000+random(2000))
end else
begin
If(FindColorTolerance(x,y,banksymbolcolor,582,24,7 00,125,5))then
Mouse(x,y,2,2,true)
wait(5000+random(2000))
end
end;
Procedure OpenDaBank;
begin;
repeat
openbank3
wait(200+random(300));
tries:= tries + 1;
until(tries = 20);
makecompass('w')
repeat
openbank3;
wait(200+random(300))
until(bankscreen)
end;
procedure BankWillows;
begin
If(Pickwielded=true)then
DepositAll;
If(pickwielded=false)then
Deposit(2,28,2)
trees:= trees + 28;
loads:= loads + 1;
end;
begin;
setupsrl;
sig;
repeat
toTrees;
CutTrees;
tobank;
opendabank;
bankwillows;
until(loads=loadsperplayer)
ProgressReport;
NextPlayer(false);
end.
program DraynorWillowCutter;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/woodcutting.scar}
const
BankSymbolColor=11250352;
willowcolor1=2902351;
willowcolor2=3686456;
willowcolor3=2971728;
loadsperplayer=2;
PickWielded=true;
var
logs : integer; Trees : integer; loads : integer; tries : integer;
Procedure DeclarePlayers;
begin
HowManyPlayers :=6; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=0; // CurrentPlayer = Array Index
Players[0].Name :='krypton48';
Players[0].Pass :='201163l';
Players[0].Nick :='kry';
Players[0].Loc :='Loc1';
Players[0].Skill:='woodcutting';
Players[0].Active:=True;
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='Loc1';
Players[1].Skill:='';
Players[1].Active:=false;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Loc :='Loc1';
Players[2].Skill:='';
Players[2].Active:=false;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Loc :='Loc1';
Players[3].Skill:='';
Players[3].Active:=false;
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Loc :='Loc1';
Players[4].Skill:='';
Players[4].Active:=false;
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Loc :='Loc1';
Players[5].Skill:='';
Players[5].Active:=false;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
writeln(inttostr(HowManyPlayers)+' Players');
end;
procedure LoadDtms;
begin;
Logs:= DTMFromString('78DA63F460626078CA80021C2CC5C134239 4C' +
'F180854731B558DAB2D9A9A60A09AD7A86AFC5C2551D53801 D5BC' +
'4355939F668BAAC606D33D9E4E68E63802D5DC45556365228 2A20' +
'60013200B2C');
end;
Procedure ProgressReport;
begin;
Writeln('[]-------------------------------------------[]');
Writeln('Worked For : ' + ScriptTime2(2))
Writeln('Cut '+ IntToStr(trees) + ' Willows');
Writeln('Did '+ intToStr(loads) + ' loads');
Writeln('[]--------------------------------------------[]');
end;
Function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 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 sig;
begin;
writeln(' ____ __. .__ ')
writeln('| |/ _|____ _____ |__| ____ ____ ')
Writeln('| <_/ __ \ / \| |/ ___\/ _ \ ')
Writeln('| | \ ___/| Y Y \ \ \__( <_> )')
Writeln('|____|__ \___ >__|_| /__|\___ >____/ ')
Writeln(' \/ \/ \/ \/ ')
end;
Procedure PrepCharacter;
begin
Activateclient;
wait(30)
MakeCompass('N');
wait(30)
setchat('Hide',1)
setchat('friends',2)
setchat('off',3)
highestangle;
end;
procedure ToTrees;
begin
setrun(true)
case random(3) of
0: Mouse(640,125,2,2,true);
1: Mouse(628,126,2,2,true);
2: Mouse(645,144,2,2,true);
3: Mouse(621,117,2,2,true);
end
end;
procedure Antirandoms1;
begin
If(findFight = true)then
begin
RunAwayDirection('N')
wait(10000+random(3000))
Runback;
If(findent(willowcolor1))or
(findent(willowcolor2))or
(findent(willowcolor3))then
begin
RunAwayDirection('N')
Wait(10000+random(2000))
runback;
end
end
end;
Procedure antirandoms2;
begin;
FindFastRandoms;
FindNormalRandoms;
end;
Procedure antiban;
begin
case random(20) of
1 : RandomRClick;
2 : GameTab(1 + random(7));
3 : Boredhuman;
4 : Almostlogout;
5 : HoverSkill('woodcitting',false);
Wait(2222+random(333))
6 : PickupMouse
7 : LowestAnge;
Wait(5+random(5))
end
end;
Procedure CutTrees;
begin
wait(6000+random(2000))
repeat
AntiRandoms2;
FindHead;
If(findcolortolerance(x,y,willowcolor1,25,26,473,3 10,5))or
(findcolortolerance(x,y,willowcolor2,25,26,473,310 ,5))or
(findcolortolerance(x,y,willowcolor3,25,26,473,310 ,5))then
begin
Mmouse(x,y,2,2);
If(IsUpText('illow'))then
begin
Mouse(x,y,2,2,false)
AntiRandoms1;
chooseoption(x,y,'own')
wait(4000+random(3000))
end
end;
Until(InvFull)
end;
Procedure ToBank;
begin;
If(findSymbol(x,y,'bank'))then
begin
Mouse(x,y,2,2,true)
Wait(5000+random(2000))
end else
begin
If(FindColorTolerance(x,y,banksymbolcolor,582,24,7 00,125,5))then
Mouse(x,y,2,2,true)
wait(5000+random(2000))
end
end;
Procedure OpenDaBank;
begin;
repeat
openbank3
wait(200+random(300));
tries:= tries + 1;
until(tries = 20);
makecompass('w')
repeat
openbank3;
wait(200+random(300))
until(bankscreen)
end;
procedure BankWillows;
begin
If(Pickwielded=true)then
DepositAll;
If(pickwielded=false)then
Deposit(2,28,2)
trees:= trees + 28;
loads:= loads + 1;
end;
begin;
setupsrl;
sig;
repeat
toTrees;
CutTrees;
tobank;
opendabank;
bankwillows;
until(loads=loadsperplayer)
ProgressReport;
NextPlayer(false);
end.