SRL Archive - First Scripts

Willow Cut And Bank.


skilld u

2008-01-06 15:45:27

This is my first script. It is not very good yet so please post feedback and any suggestions.

thanks nikos
——Skilld Us Willow Chopper and Banker——
Cut 238 Willows
Banked 16 Times
Worked For 51 Minutes and 34 Seconds
———————————————–

Updated to version 2. It is much better.

Sir R. M8gic1an

2008-01-06 16:15:48

amazing for a first script! i'll edit with suggestions in a couple mins ;)


program WillowCutter;
{.include SRL/SRL.scar}

const {standards missing here} {const }
Loads = 7;//amount of loads to do before switching players { Loads = 7; }
Version = '.1'; //'0.1'? { Version = '.1' }
RunDirection = ('E'); { RunDirection = ('E'); }

var {standards missing here, like in const}
C1, C2 : integer;
x,y : integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 2;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;

Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;

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

Procedure Setup;
begin
Disguise('eBay');
ActivateClient;
ChatsOff;
HighestAngle;
MakeCompass('N');
end;

procedure ToSpot;
begin
MakeCompass('N'); {you use make compass a lot once you set compass to north}
SetRun(True); {it doesn't change, and changing it all the time}
RadialWalk(FindRockColor,190,150,60,3,3); {just a lil bit might give you away as a bot}
{what if it doesn't find the color? i suggest more RWalk possibilities n blind click}
FindSymbol(x,y,'fish'); {sometimes fishing symbol might be obscured, you might want a failsafe}
Mouse(x,y,3,3,true);
FFlag (0);
end;

procedure MyAntiBannage;
begin
case Random(4) of {random(4) = 0, 1, 2, 3}
0: RandomRClick;
1: BoredHuman;
2: RandomMovement;
3: AlmostLogout;
4: PickUpMouse; // this one will never happen, Random(5) would make it work
end;
end;

procedure ToBank;
begin
MakeCompass('N');//compass is already north!
SetRun(False);
RadialWalk(FindRockColor,0,90,50,3,3); //needs failsafes
If FindSymbol(x,y,'bank')Then //bank symbol might be obscured.
begin //i suggest you make a dtm of the bankers
Mouse(x,y,3,3,true); // or click the bank floor color
Flag;
end;
end;

Procedure Bank;
begin
MakeCompass('W');
OpenBankQuiet('db');
Flag; //FFlag(0);
wait(500 + random(500));
FixBank;
if(Findobj(x, y,'ogs',2183514,9))then //this will find them in bank AND inv,
begin // not sure which one you need
Deposit(2, 28, 2);
CloseBank;
MakeCompass ('N');
C1 := C1 + 1; //Inc(C1);
end;
end;

procedure ChopTree;
begin
repeat
If Not Loggedin Then Break;
If Findobj(x,y,'illow',5276030,9)then //you should make it look for more colors
begin // and more up text
Mouse(x,y,3,3,True);
FFlag (0);
MyAntiBannage;
end;
Until(invfull);
C2 := C2 + 27; //not reliable, what if you got random objects?
end; //i suggest making a log dtm and then using a dtm counter ;)

procedure Reports;
begin
ClearDebug;
writeln('----------Skilld Us Willow Chopper and Banker----');
writeln('----------You Are Using Version '+ Version +'----');
writeln('----------Cut About '+IntToStr(C2)+' Willows-----');
writeln('----------Banked '+IntToStr(C1)+' Times----------');
writeln('----------Worked For '+TimeRunning+' ------------');
SRLRandomsReport;

//how about a report for each player?

end;

begin
SetupSRL;
Setup;
DeclarePlayers;
if LoggedIn then Logout;
LoginPlayer;
repeat
ToSpot;
ChopTree;
MyAntiBannage;
if InvFull then
begin
ToBank;
Bank;
Inc(Players[CurrentPlayer].Banked);
if Players[CurrentPlayer].Banked mod Loads = 0 then
begin
NextPlayer(True);
end;
end;
C1 := C1 + 1; //you already did this in the procedures!
C2 := C2 + 27; //each load it'll count 2 loads and 54 logs!
if not Loggedin then NextPlayer(False);
until C1 = Loads;
if C1 = Loads then C1 := 0;
Reports;
NextPlayer(True);
//switch player but then the script will stop. you need another repeat until here.
end.

//what about ent finder? and head attacher? those are musts in WCing scripts ;)
{
but i must say it is a great script for your first! your on the right way my friend ;)

~Rasta Magician
}

~RM

skilld u

2008-01-06 16:35:09

Thank You so much. I'll get to work on those. I got kind of lazy towards the end of the script. :p

Sir R. M8gic1an

2008-01-06 16:50:02

be sure to post updated versions ;)

~RM

skilld u

2008-01-06 17:01:32

nevermind.

clookid

2008-01-07 21:34:57

It logs me in, and that is it. :p

Valii

2008-01-09 06:00:12

It's not working for me. reason:
[Runtime Error] : Out Of Range in line 40 in script C:\DOCUME~1\Atk-opp\LOCALS~1\Temp\WillowCutAndBankV1.1.scar

Sir R. M8gic1an

2008-01-09 07:34:59

check if your setup Declare Players right.

btw skilld u, if you ever want any help pm me ;)

~RM

realrocker00

2008-01-09 21:47:38

do you mind telling us where to start it?

skilld u

2008-01-10 16:05:00

you start it in draynor. any bank slot.

P1nky

2008-01-10 17:41:33

this is really good for a 1st script i say get more failsafes and it can be good as a srl junior script lol

happy to see you have learned a bit radial walk

skilld u

2008-01-10 20:00:04

thanks. i love radial walk :p

Naum

2008-01-11 12:22:51

Very good could elaborte on the banking and add antirandoms and waiting while cutting the tree!

david2031

2008-01-11 16:46:44

lots of errors….or that could just be me

xltb

2008-01-12 05:55:04

haa its good altho it wont do anything after lgging me in hmm

Krim0407

2008-02-07 09:33:17

Failed when compiling
Line 432: [Hint] (10394:1): Variable 'OLDMS' never used in script C:\Programfiler\SCAR 3.14\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
Line 45: [Error] (12312:1): Unknown identifier 'NickNameBMP' in script C:\DOCUME~1\KRISTI~1.WES\LOKALE~1\Temp\WillowCutAndBankV1.1.scar

I get this…

skilld u

2008-02-07 17:35:51

I haven't updated it in a while.

Krim0407

2008-02-08 11:50:44

Are you going to update it? I think it will work wonderfull, you should try to apply member with it.;)

skilld u

2008-02-08 18:37:51

Woot!! update.

skilld u

2008-02-09 15:40:11

updated again.

blueberry jam

2008-02-10 01:43:54

{ _____ _    _ _ _     _    _    _ _ _ _
/ ___| | (_) | | | | | | | (_) | |
\ `--.| | ___| | | __| | | | | |_| | | _____ __
`--. \ |/ / | | |/ _` | | |/\| | | | |/ _ \ \ /\ / /
/\__/ / <| | | | (_| | \ /\ / | | | (_) \ V V /
\____/|_|\_\_|_|_|\__,_| \/ \/|_|_|_|\___/ \_/\_/


_____ _ _ ______ _
/ __ \ | | | | | ___ \ | |
| / \/_ _| |_ __ _ _ __ __| | | |_/ / __ _ _ __ | | __
| | | | | | __| / _` | '_ \ / _` | | ___ \/ _` | '_ \| |/ /
| \__/\ |_| | |_ | (_| | | | | (_| | | |_/ / (_| | | | | <
\____/\__,_|\__| \__,_|_| |_|\__,_| \____/ \__,_|_| |_|_|\_\


Thank You Rasta Magician, You helped me ALOT.

You Must have axe in inventory, NOT wielded}

program WillowCutter;
{.include SRL/SRL.scar}

const
Loads = 3;//amount of loads to do before switching players
Version = '2';
YourSRLId = '2670';
YourSRLPassword = 'blink182';

var
C1, C2 : integer;
x,y : integer;
Bankers, Log, Willow : integer;
time : integer;

{Fill This Part Out}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;

{Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;}

end;

Procedure Bitmaps;
begin
Log := DTMFromString('78DA6314616060106340013E2E32609A11CA6' +
'7540412520C688011550D480B2F0135FC40828F801A7620214C40' +
'0D3311EE0199234F847B9408A891246C0E00D8F60238');

Bankers := DTMFromString('78DA639461606010654001FFFFFF07D38C503' +
'EA31090904455F3E70F13A61A41026A8481841C7E3500E04109A4' +
'');

Willow := BitmapFromString(35, 33, 'beNrtlk9LAzEQxZtvICoiIh' +
'Y99aBeFnGRUlqkokjBCgX/IYqiKELBkx/ftzwdpjubkCzuQdjwDqX' +
'Lzi8vOy9Jp9OOdvzP4RbVFGK3t5TtLefZ6iBfO+6vN8ByUn8y3jwd' +
'bUC1QC4s1JyebQGhlQ4q6mCqEOaMmcvkMW0UBMIqHeSebvOX+6OP5' +
'8Fs0qVsWXkkTwna6a7Egz7fR9TNxbZlaYQWQXAdbWoBpFki/q8loK' +
'SlE9D8dahZtr4ITvH5UuxUgwLiqtIOGiYutj+tKyC9gL76jA/7E5q' +
'e758Me0GWY+igAEUaQxAUX2SaVHItzt3NDrBQEj1SdIczVrasxEq+' +
'o56JYRXZAQiV3x77fJEUmbNF2Ia3q2pBX/MxLQgImX24OixtMtaC7' +
'fkwSNpMQOQC50uoL1lhEGoShB+040tTTHgDIBjRIN14AVB6eItmEB' +
'DsxDiq7Hz2Nvd8T5oKFnxBcH19mVXuD4FPD9U61p0vtno/N8XrnNT' +
'akZiSo+dPryKutHS/9Ru553Dd4KLJ21TpltIONb4BEilgcA==');
end;

//Made by Sumillion
function FindEnt(fx, fy: Integer; AvoidWhenFound: Boolean): Boolean;
var
arUpTextEntColorPoints: TPointArray;
x, y, EntTime, tcts: Integer;
begin
if not(LoggedIn)then
Exit;
GetMousePos(x, y);
if(x <> fx)or(y <> fy)then
MMouse(fx, fy, 0, 0);
if(IsUpText('Chop'))then
begin
tcts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.4, 0.4);
FindColorsTolerance(arUpTextEntColorPoints, 51657, 80, 6, 127, 20, 5);
Result := Length(arUpTextEntColorPoints) > 10;
ColorToleranceSpeed(tcts);
end;
if(Result)then
begin
WriteLn('Ent Found!!');
if(AvoidWhenFound)then
begin
Writeln('Waiting for it to go away.');
MouseFindNoFlag(MMCX, MMCY, -1, 1);
MarkTime(EntTime);
while(TimeFromMark(EntTime) < 35000)do
if(Random(20) > 15)then
IdleTime(500, 500, 0.4)
else
Wait(500 + Random(500));
EntsAvoided := EntsAvoided + 1;
end;
end;
end;


//I got this procedure from Derek-
Procedure AngleWalk(WAngle: string; Dist: Integer; WFlag: Boolean);
var
Angle : Extended;
TheAngle, x, y : Integer;
begin
Case LowerCase(WAngle) of
'n' : TheAngle := 0;
'w' : TheAngle := 90;
's' : TheAngle := 180;
'e' : TheAngle := 270;
else
begin
try
TheAngle := StrToInt(GetNumbers(WAngle));
except
WriteLn('AngleWalk Failed: Invalid string/integer entered.');
Exit;
end;
end;
end;
TheAngle := 270 - TheAngle;
if (Dist > 72) then Dist := 72;
Angle := rs_GetCompassAngleDegrees;
x := MMCX + Round(Dist * Cos((Angle + TheAngle) * (pi/180)));
y := MMCY + Round(Dist * Sin((Angle + TheAngle) * (pi/180)));
Mouse(x, y, 0, 0, True);
if WFlag then
begin
Wait(RandomRange((Dist * 24), (Dist * 26)));
FFlag(0);
end;
end;

procedure ToSpot;
begin
MakeCompass('N');
SetRun(True);
RadialWalk(FindRockColor,175,171,49,5,5);
If not RadialWalk(FindRockColor,175,171,49,5,5) then
begin
AngleWalk('170', 40, True);
end;
end;

procedure MyAntiBannage;
begin
case Random(40) of
0: RandomRClick;
1: BoredHuman;
2: RandomMovement;
3: AlmostLogout;
4: PickUpMouse;
5: HoverSkill('Woodcutting', False);
end;
end;

procedure Bank;
begin
MakeCompass('N');
SetRun(False);
GameTab(4);
If FindSymbol(x,y,'bank')Then
begin
Mouse(x,y,3,3,true);
Flag;
end else
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Mouse(x, y, 1, 1, True);
Flag;
end else
RadialWalk(5987171,34,39,39,5,5);
begin
MarkTime(time);
repeat;
if (not(Loggedin)) then break;
OpenBankQuiet('db');
until(BankScreen or (TimeFromMark(time) > 120000));
end;
If FindDTM(Log, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x,y,3,3,False);
ChooseOption('all');
Deposit(2,28,2);
C2 := C2 + 28 - InvCount;
ReportVars[0]:= ReportVars[0] + 28 - InvCount;
C1 := C1 + 1;
ReportVars[1]:= ReportVars[1] + 1;
CloseBank;
Disguise('Cut '+IntToStr(C2)+' Willows');
end;

procedure ChopTree;
begin
repeat
If Not Loggedin Then Break;
FindEnt(x,y,True);
if (FindObjCustom(X, Y, ['ill','low','illo','llo'], [3896169,3238238,3902333,1387816], 3)) then
begin
Mouse(x,y,3,3,True);
FFlag (0);
FindNormalRandoms;
MyAntiBannage;
Wait(5000);
end;
Until(invfull);
end;

procedure Reports;
begin
ClearDebug;
writeln('------Skilld Us Willow Chopper and Banker------');
writeln('Cut '+IntToStr(C2)+' Willows');
writeln('Banked '+IntToStr(C1)+' Times');
writeln('Worked For '+TimeRunning);
writeln('-----------------------------------------------');
SRLRandomsReport;
end;

begin
SetupSRL;
ScriptID := '636';
SRLID := YourSRLID;
SRLPassword := YourSRLPassword;
ActivateClient;
Bitmaps;
DeclarePlayers;
repeat
if LoggedIn then Logout;
LoginPlayer;
repeat
ToSpot;
ChopTree;
MyAntiBannage;
if InvFull then
begin
Bank;
Reports;
end;
if not Loggedin then NextPlayer(False);
until C1 = Loads;
NextPlayer(True);
until False;
end.


very nice for a first script you need for safe-fails, and a auto responder? just build it up and it will become grate.

Heavenzeyez1

2008-02-10 06:01:54

Dude, u are talking about Axe head attaching?:)
When did u last time saw that ur axe head flew away?:)
It doesn't fly away any more. :)
Not bad for a first script, you should make procedures by urself, it's hard, i know, but that's how u learn. :)
Eerik.

Derrick

2008-02-10 10:51:25

That's a really nice first script.
I really look foward to seeing your stuff in the future.

random098

2008-02-10 10:53:32

The login is a bit buggy. Takes many times to get it right. Other then that, A+

EDIT: Ok, I tried it with a different login and browser and it works fine now. Guess it was just weird that time, thanks so much =]

skilld u

2008-02-10 12:42:42

Thanks for the feedback guys

@Heavenz i don't ever Woodcut legit so i never would have noticed :p

@random the login is not my fault.

skilld u

2008-02-10 19:47:29

Wow, this is being leeched alot, downloaded 13 times and not a single reply.

Krim0407

2008-02-11 09:42:53

Do not have a report yet, downloaded it yesterday, but have'nt testet it, will do, and report will come :)

punkd

2008-02-12 18:11:50

I get a couple errors too, any1 wanna help a fellow user out?

skilld u

2008-02-12 19:24:04

you haven't said any of the errors that you get.

Mr.SRL

2008-02-12 22:14:07

I atempted to run the script but nothing happened after waiting 2 minutes

Any idea?

nikos

2008-02-16 11:04:19

——Skilld Us Willow Chopper and Banker——
Cut 238 Willows
Banked 16 Times
Worked For 51 Minutes and 34 Seconds
———————————————–
Pretty good. Gets lost when going back to spot from bank (clicks 2 times on rocks and goes more south then needed) and also killed my rune axe. Other then that its good.

my granny

2008-02-16 11:33:47

it dosent work very well, its sometime stucks

skilld u

2008-02-16 12:22:16

I am trying to fix those errors, i have a new version but i am not releasing until i get my entfinder to work right.

imlvl127

2008-02-16 17:14:18

From: skilld u
I am trying to fix those errors, i have a new version but i am not releasing until i get my entfinder to work right.


Yup it didn't find any Ents for me so that needs work. Also it didn't bank anything and wouldn't respond to a full inventorie ( After it was a full load it kept hovering over the rocks in the water.)

Keep on working on it and I'm sure it will turn out great.

scissormetimbers

2008-04-10 03:10:00

it said it had a problem with this line:
MouseFindNoFlag(MMCX, MMCY, -1, 1);

skilld u

2008-04-10 10:31:42

i havent updated this in almost 2 months and this was like 3 pages back. don't gravedig.

phy

2008-05-08 19:09:26

:f: nice i used it for two ghours!

loliker123

2008-05-13 01:11:25

Nice Script

Jimmy5410

2008-05-13 10:12:30

I get this:
Failed when compiling
Line 104: [Error] (12747:1): Unknown identifier 'MouseFindNoFlag' in script
Failed when compiling
Line 105: [Error] (12748:1): Unknown identifier 'MouseFindNoFlag' in script

skilld u

2008-05-13 18:45:13

From: phy
:f: nice i used it for two ghours!


From: loliker123
Nice Script


um?



cl0se pl0x?

Hobbit

2008-05-13 18:47:36

Request of Author

Closed.