PDA

View Full Version : Draynor Willow cutter



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.

BobboHobbo
06-18-2007, 06:49 AM
It looks alrite just you gotta add better random finder. Plus more antiban.

Other then that its ok. Maybe add instructions for the nooby ones?

Also you should make it that it doesnt bank everything do something like this

Deposit(2, 28,2);
instead of
DepositAll;
I think it was that.
so just incase the axe isnt wielded.

And what if the bank symbol is coverd you will need to make a fialsafe, but it is your second script so its kind of good :D

kemico2
06-18-2007, 07:05 AM
Thanks bobbohobbo i hope thats how you spell your name :p. Well anyways i will make it Have where it has a failsafe and also make it where if ur weilding your axe or not. Well thanks for all the help.

Santa_Clause
06-18-2007, 07:45 AM
Procedure antiban;
begin
case randon(20) of
1 : RandomRClick;
2 : GameTab(1 + random(7));
3 : Boredhuman;
4 : Almostlogout;
5 : TypeSend('Who Here Is a memba')
end
end;

Nice first script, but don't type messages as part of Antiban...it can be quite repetitive

Haxor
06-18-2007, 08:56 AM
alright for a first script.

needs better antiban and anti random and it might be a good script.

haxor

kemico2
06-18-2007, 09:43 PM
Thanks for all the feedback guys. This will help me learn to script better.

sheetomg
06-19-2007, 01:38 AM
pretty good script, havent tested yet im in school, going to be realeasing powerminer real soon after testing.

kemico2
06-19-2007, 01:46 AM
Good luck on your powerminer sheetomg :) and thanks for calling it a pretty good script.

zlap
09-29-2007, 03:27 PM
i think i could try it out

deltaspirit
10-06-2007, 03:42 AM
not a half bad script, but it needs some work...when It hits the trees mine sorta keeps walking into the distance.

SuperScripter
10-06-2007, 03:11 PM
Use find obj it works better because runescape like to confuse scar by putting the same colors everywhere.Use if findobj(x,y,'Willow',color here,tolerance) then
if isuptext('chop') then
mouse(x,y,7-Random(6),0+Random(7),true);

this is just an example.

#SS

flip_up
10-08-2007, 03:17 AM
pretty good script for ur second one

owned1112
10-08-2007, 05:09 AM
Use find obj it works better because runescape like to confuse scar by putting the same colors everywhere.Use if findobj(x,y,'Willow',color here,tolerance) then
if isuptext('chop') then
mouse(x,y,7-Random(6),0+Random(7),true);

this is just an example.

#SS



if(IsUpText('hop')) then
begin;
Something;
writeln('We found the text!');
end;

Would be more correct.

Ilikepie1995
10-08-2007, 04:43 PM
I Do THink That U SHould Get Ur Pass And User OUt Of THERE!

yeahdudeirock
10-09-2007, 12:28 AM
good for a second mate, could do with sum improvements though

anyway good work

OwnedPl0x?!?!
10-10-2007, 01:16 AM
var
logs : integer; Trees : integer; loads : integer; tries : integer;


wouldn't this be better?


var
logs, Trees, loads, tries: integer;

the ghetto8
10-11-2007, 12:41 AM
Hey I'm having a problem with this script. Right now I just stand there in the bank and the mouse shoots to the top left of the screen and attempts to go to the map but then it just shoots back to the top left corner. Is anyone else getting this problem?

niqje
10-13-2007, 05:33 PM
Hey I'm having a problem with this script. Right now I just stand there in the bank and the mouse shoots to the top left of the screen and attempts to go to the map but then it just shoots back to the top left corner. Is anyone else getting this problem?

i have same prob:(

killer1
10-14-2007, 02:48 AM
yea more anti ban and it will be hot

brianrebers1
10-14-2007, 01:06 PM
Line 90: [Error] (14972:27): Unknown identifier 'ScriptTime2' in script
i get this error what to do???

Rikje
10-14-2007, 01:09 PM
Draynor Willow cutter - 06-18-2007, 04:58 AM

the script is a little out date :p

irishpir8
10-14-2007, 08:27 PM
nice script

Viper8 3
10-15-2007, 12:03 AM
Anti-ban needs a lil more work. Otherwise, so far so good.

brian761
10-20-2007, 04:22 PM
im sorry im new to this >_< but how do you download it? >_<

catman
10-20-2007, 06:39 PM
Hey I'm having a problem with this script. Right now I just stand there in the bank and the mouse shoots to the top left of the screen and attempts to go to the map but then it just shoots back to the top left corner. Is anyone else getting this problem?

i have the same problem :cartman:

Shocker kidd
10-22-2007, 04:12 AM
very nice script for your second one, it needs some work on finding the trees (could be I'm doing something) sometimes it will click south on the map though and get away from the trees, other than that it banks nicely and runs smoothly =D