SRL Archive - First Scripts

Vagrant's Basic Flax Picker


Vagrant

2007-06-03 16:36:15

My first script ever. Extremely simple, goes from Seer's bank to flax, picks flax, goes and banks it, repeat.

EDIT: Released version 2, added a bunch of stuff and fixed some stuff. Enjoy.

SCAR Version: Divi 3.06
SRL Version: 3.7

Features:
Anti-Randoms
Anti-Bans
Multi-Users
Progress Report
Bunch of Fail Safes


To-Do:
More Anti-Bans
More Fail Safes
Better Walking

Note: Don't use this script for more than an hour, you will get banned!

{
# ScriptName = Basic Flax Picker
# Author = Vagrant
# Description = Picks flax and banks it.
# Version = v2 BETA
# Date = 3 June 2007
# Comments = Don't use for more than an hour, you will get banned!
# Instructions= 1. Edit the stuff under "SCRIPT CONFIG" and "PLAYER CONFIG"
2. Start anywhere in Seer's bank.
3. Pull the crosshairs into the RS Window.
4. Hit the play button.
}

Program BasicFlaxPicker;
{.include SRL/SRL.scar}

Var
Banked,Attempt,Flax,Profit,Loads,A: Integer;
Found: Boolean;

//***************************************************************************\\
//*******************************SCRIPT CONFIG*******************************\\
//***************************************************************************\\
Const
Bank = 100; //Amount Of Times You'd Like To Bank
BankPerPlayer = 10; //Amount Of Times You'd Like To Bank With Each Player
Debug = 1; //1 = Debug Enabled
//0 = Debug Disabled
//***************************************************************************\\

//***************************************************************************\\
//*******************************PLAYER CONFIG*******************************\\
//***************************************************************************\\
Procedure DeclarePlayers;
Begin

HowManyPlayers := 1; //Amount Of Players
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0; //Player To Start With

Players[0].Name :='UserName';
Players[0].Pass :='Password';
Players[0].Nick :='3-4 letters of UserName';
Players[0].Active :=True;

{Players[1].Name := 'UserName';
Players[1].Pass := 'Password';
Players[1].Nick := '3-4 letters of UserName';
Players[1].Active := False;

Players[2].Name := 'UserName';
Players[2].Pass := 'Password';
Players[2].Nick := '3-4 letters of UserName';
Players[2].Active := False;}
End;
//***************************************************************************\\

Procedure AntiBans;
Begin
Case Random(15) Of
1: MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
5: PickUpMouse;
7: SleepAndMoveMouse(10000+random(5000));
9: MouseBox(MIX1, MIY1, MIX2, MIY2, 3);
13: PickUpMouse;
15: SleepAndMoveMouse(10000+random(5000));
End
End;

Procedure Anti;
Begin
FindNormalRandoms;
AntiBans;
MakeCompass('N');
HighestAngle;
End;

Procedure WalkToFlax;
Begin

Found := False;
MarkTime(A);
Repeat
If (Debug = 1) Then Writeln('Walking to woodcutting icon 1...');
If (FindSymbolIn(x, y, 'tree', 592, 102, 688, 158)) Then
Begin
Mouse(x-20, y+20, 5, 5, true)
Anti;
Flag;
Found := True;
End Else Writeln('Could not find woodcutting icon 1! Trying again...');

If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
Until (Found = True);

Found := False;
MarkTime(A)
Repeat
If (Debug = 1) Then Writeln('Walking to woodcutting icon 2...');
If (FindSymbolIn(x, y, 'tree', 592, 102, 688, 158)) Then
Begin
Mouse(x+10, y+20, 5, 5, true)
Anti;
Flag;
Found := True;
End Else Writeln('Could not find woodcutting icon 2!');

If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
Until (Found = True);

MarkTime(A)
If (Debug = 1) Then Writeln('Walking to weird trees...');
Mouse(679, 119, 10, 10, true);
Anti;
Flag;
If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End

MarkTime(A)
If (Debug = 1) Then Writeln('Walking into flax field...');
Mouse(487, 318, 25, 25, true)
Anti;
Flag;
If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
End;

Procedure PickFlax;
Begin
MarkTime(A);
If (FindObj3(x, y, 'Pick Flax', 14736505, 20)) Then
Begin
Mouse(x, y, 0, 0, true);
FindNormalRandoms;
End Else Writeln('Could not find any flax!');

If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
End;

Procedure WalkToBank;
Begin
MarkTime(A);
If (Debug = 1) Then Writeln('Walking to weird trees...');
Mouse(612, 58, 5, 5, true);
Anti;
Flag;
If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End

Found := False;
MarkTime(A);
Repeat
If (Debug = 1) Then Writeln('Walking to woodcutting icon 3...');
If (FindSymbolIn(x, y, 'tree', MMX1, MMY1, MMX2, MMY2)) Then
Begin
Mouse(x+15, y-10, 5, 5, true);
Anti;
Flag;
Found := True;
End Else Writeln('Could not find woodcutting icon 3!');

If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
Until (Found = True);

MarkTime(A);
If (Debug = 1) Then Writeln('Walking to woodcutting icon 4...');
Mouse(648, 20, 10, 10, true);
Anti;
Flag;
If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End

Found := False;
MarkTime(A);
Repeat
If (Debug = 1) Then Writeln('Walking to bank...');
If (FindColorTolerance(x, y, 4970461, MMX1, MMY1, MMX2, MMY2, 10)) Then
Begin
Mouse(x-random(5), y+random(5), 2, 2, true);
Anti;
Flag;
Found := True;
End Else Writeln('Could not find bank!');

If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
Until (Found = True);
End;

Procedure OpenBank4;
Begin
MarkTime(A);
Repeat
If (FindObj(x, y, 'oth', 539728, 30)) Then
Begin
Mouse(x, y, 4, 4, False)
ClickOption('quickly', 1)
Wait(2000+random(1000));
End

If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
Until (BankScreen);
End;

Procedure DoBank;
Begin
MarkTime(A);
If (Debug = 1) Then Writeln('Opening bank...');
Repeat
OpenBank4;

If (TimeFromMark(A) > 20000) Then
Begin
Writeln('Error with current player... Terminating script...');
Logout;
TerminateScript;
End
Until (BankScreen);

If (Debug = 1) Then Writeln('Depositing flax...');
If (BankScreen) Then
Begin
DepositAll;
Wait(1000+random(2000));
End Else Writeln('Could not find bank screen!');

If (Debug = 1) Then Writeln('Closing bank...');
CloseBank;
FindNormalRandoms;
Banked := Banked + 1;
Loads := Loads + 1;
End;

Procedure ProgressReport;
Begin
Cleardebug;
Flax := Banked * 28;
Profit := Flax * 1000;
Writeln('========Progress Report========');
Writeln(TimeRunning);
Writeln('Banked ' +IntToStr(Banked)+ ' Time[s]');
Writeln('Picked ' +IntToStr(Flax)+ ' Flax');
Writeln('Profit: ' +IntToStr(Profit)+ 'gp');
Writeln('===============================');
End;

Begin
SetUpSRL;
Cleardebug;
DeclarePlayers;
Banked:= 0;
DisguiseScar('iTunes');
Writeln('===============================');
Writeln('==Vagrant"s Basic Flax Picker==');
Writeln('============v2 BETA============');
Writeln('===============================');

Repeat
PerfectNorth;
GameTab(4);
WalkToFlax;
Writeln('Picking flax...');
Repeat
PickFlax;
Wait(1000+random(1500));
Until(InventoryFull)
Attempt := 0;
PerfectNorth;
WalkToBank;
DoBank;
ProgressReport;

If (Loads = BankPerPlayer) Then
Begin
NextPlayer(True);
Loads := 0;
Writeln('Switching Players...');
End
Until(Banked = Bank);
Logout;
TerminateScript;
End.

PLEASE critique it! I need major feedback!

Stake

2007-06-03 16:42:32

Looks good, will try it tomorrow when I get back from school.

Thanks for contributing!

bullzeye95

2007-06-03 16:48:14

You need more failsafes. For example, in your DoBank you have
     repeat
OpenBank3;
Wait(1000+random(2000));
until(BankScreen);
What if you somehow weren't at the bank, or couldn't see the bank booths? It would just keep trying to find the bank. Banage! So you should put a counter in there. Everytime, before the until, do C:= C + 1;. And then on your until loop put something like until(BankScreen) or (C > 5). That way, it wouldn't keep trying to open the bank. Understand? :)

Vagrant

2007-06-03 16:55:53

Thank you for the feedback! As I said in the first post, don't use the script for more than an hour, you'll get banned.

But yeah, I'm adding failsafe's next…

summerkid91

2007-07-30 14:29:55

When I start the script, he set the brightness on V-bright and then the mouse doesnt' move anymore whilte the script is running?Any ideas?
I use scar 2.03 with SRL 3.7
This is what I get in the text box:

————————————-
|
| Vagrant"s Basic Flax Picker v3
|
————————————-
Found Compass

hardman

2007-08-02 16:28:49

From: summerkid91
When I start the script, he set the brightness on V-bright and then the mouse doesnt' move anymore whilte the script is running?Any ideas?
I use scar 2.03 with SRL 3.7
This is what I get in the text box:

————————————-
|
| Vagrant"s Basic Flax Picker v3
|
————————————-
Found Compass



omg dude dont leech and read the info about the script first instead of rushing in and leeching it

My first script ever. Extremely simple, goes from Seer's bank to flax, picks flax, goes and banks it, repeat.

EDIT: Released version 2, added a bunch of stuff and fixed some stuff. Enjoy.

SCAR Version: Divi 3.06
SRL Version: 3.7

Features:
Anti-Randoms

drnewheart

2007-08-06 01:15:52

Very Nice Script I Like But Does It Work With The New Seers Update?

Just A Suggestion If It Doesnt.

Im Not A Leecher I Have My Own Script And Am Working On Another.

beccie

2007-09-12 19:43:15

Hey mate wondering if u could help me.. Whenever i try to start any script it always says:

'Include file C:\Program Files\SCAR 3.06\includes\SRL\SRL.scar does not exist.
Failed when compiling'

Ive tried loads of scripts with 3 different versions of Scar and they virtually always say that with any script i try.

I dont know if its me being stupid im knew to these things lol.. Im not critcising ur script because i know it will work a treat.. But ur help would be greatly appriciated seein as u probably know wat ur talking about compared to me lol!

Thx alot mate runeskate x

Bourdou!

2007-09-12 19:59:05

That is because you don't have SRL… Also, this is a semi grave dig I would say…

Diamond

2007-09-13 04:53:08

Nice script be awesome to try it out

DR SR PEANUS

2007-09-13 16:24:13

Would try it out..but id have to feed jagex's fat little belly's

W_URRY

2007-09-14 14:01:29

when i try to run your flax picker script, it just says BEGIN ecspected in script


it says this

Failed when compiling
Line 14: [Error] (14:1): 'BEGIN' expected in script

pip204

2007-10-30 13:17:31

Lol, doesnt work >.<

Raner

2007-10-31 08:06:40

Doesn't seem to work at all for me,it just stops at the beggning.

adarsh_wifi

2007-10-31 10:47:01

It say's Mismatch in script and stuff… it doesnt work!!

Zezi

2007-11-01 07:09:05

1st november 2007.

Entered script, looked at it - seemed fine. However;
Failed when compiling
Line 52: [Error] (15080:39): Type mismatch in script
Unfortunatly due to me only being a cute lil' newb, i can't fix this myself or give you guidance unfortunatly.

However, i hope i could be of assitance? :/

boxrop

br@@k

2007-11-10 06:05:41

i dont like them when u get banned

RocknRick

2007-11-19 16:21:15

HOw do you get around this?

Teamtippmann

2008-01-01 15:44:08

yea i just came across this one today and im fairly new to this whole SCAR thing but when i try to run this script here is what is says
Failed when compiling
Line 61: [Error] (14742:39): Type mismatch in script

What does it mean?

sikksniper

2008-02-29 17:36:08

i need help with scar. i dont know how to use. i have version, 2.03. this script doesnt work. it says, "Include file C:\Program Files\SCAR 2.03\includes\SRL/SRL.scar does not exist."

WHAT HAPPENED?
i need help. thanks

skilld u

2008-02-29 17:58:38

Gravedig!!! this script is OLD, thats why it doesn't work.

shrubie1

2008-02-29 23:20:01

does really seem to work that wel…

skilld u

2008-02-29 23:26:59

really??? maybe because it is almost 1 year old.

Smokefree

2008-03-05 04:04:36

Sounds great! I must try it. You should make a fletcher too.

makteb

2008-03-05 08:33:54

Please please we i can download it?

nielsie95

2008-03-05 09:26:01

It's outdated!
Closed.

Sumilion

2008-03-05 09:27:46

Script is majorly outdated and will probably not work.

Closed.

@Vagrant, if you want me to re-open it, pm me.