Vagrant
06-03-2007, 08:36 PM
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!
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!