SRL Archive - First Scripts

Draynor Willow cutter


kemico2

2007-06-17 22:58:05

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('78DA63F460626078CA80021C2CC5C1342394C' +
'F180854731B558DAB2D9A9A60A09AD7A86AFC5C2551D53801D5BC' +
'4355939F668BAAC606D33D9E4E68E63802D5DC455563652282A20' +
'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,310,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,700,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

2007-06-18 02:49:55

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

2007-06-18 03:05:15

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

2007-06-18 03:45:22

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

2007-06-18 04:56:19

alright for a first script.

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

haxor

kemico2

2007-06-18 17:43:25

Thanks for all the feedback guys. This will help me learn to script better.

sheetomg

2007-06-18 21:38:48

pretty good script, havent tested yet im in school, going to be realeasing powerminer real soon after testing.

kemico2

2007-06-18 21:46:58

Good luck on your powerminer sheetomg :) and thanks for calling it a pretty good script.

zlap

2007-09-29 11:27:41

i think i could try it out

deltaspirit

2007-10-05 23:42:44

not a half bad script, but it needs some work…when It hits the trees mine sorta keeps walking into the distance.

SuperScripter

2007-10-06 11:11:11

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

2007-10-07 23:17:18

pretty good script for ur second one

owned1112

2007-10-08 01:09:02

From: SuperScripter
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

2007-10-08 12:43:52

I Do THink That U SHould Get Ur Pass And User OUt Of THERE!

yeahdudeirock

2007-10-08 20:28:02

good for a second mate, could do with sum improvements though

anyway good work

OwnedPl0x?!?!

2007-10-09 21:16:54


var
logs : integer; Trees : integer; loads : integer; tries : integer;

wouldn't this be better?


var
logs, Trees, loads, tries: integer;

the ghetto8

2007-10-10 20:41:22

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

2007-10-13 13:33:05

From: the ghetto8
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

2007-10-13 22:48:46

yea more anti ban and it will be hot

brianrebers1

2007-10-14 09:06:30

Line 90: [Error] (14972:27): Unknown identifier 'ScriptTime2' in script
i get this error what to do???

Rikje

2007-10-14 09:09:06

Draynor Willow cutter - 06-18-2007, 04:58 AM

the script is a little out date :p

irishpir8

2007-10-14 16:27:23

nice script

Viper8 3

2007-10-14 20:03:22

Anti-ban needs a lil more work. Otherwise, so far so good.

brian761

2007-10-20 12:22:19

im sorry im new to this >_< but how do you download it? >_<

catman

2007-10-20 14:39:45

From: the ghetto8
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

2007-10-22 00:12:59

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