SRL Archive - First Scripts

My First Auto-Fletcher!


w00tage

2008-04-06 10:42:02

#                         Credits go to me, w00tage.                           #
################################################################################
################################################################################
////////////////////////////////////SETUP///////////////////////////////////////
////////////////////// 1. Set values below (in const). /////////////////////////
////////////////////// (Have brightness set to vbright.) ///////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 2. Put logs in first slot of bank, /////////////////////////
///////////////// with knife in first slot of inventory. ///////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 3. Put bowstrings in second slot of ////////////////////////
//////////////////////////////////// bank. /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 4. Put shafts in fourth slot of bank ///////////////////////
///////////////////////////// (if applicable). /////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 5. Put feathers in fifth slot of bank //////////////////////
///////////////////////////// (if applicable). /////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 6. Put bows (u) in sixth slot of bank //////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// Enjoy! ///////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
program PoWFletcher;
{.include SRL/SRL.scar}

const
Fletch = True; //Leave at true, else script won't work.
FletchType = 'Longbow'; //Can be Longbow, Shortbow, Shafts (for shafts, you need normal logs), or StringOnly.
StringBow = True; //Do you want the script to string bows?
StringBowsOnly = False; //Edited for stringing bows only...
AttachFeather = False; //Only true if you want to attach feathers to your shafts.
UserName = 'Username'; //Your RuneScape username
Password = 'Password'; //Your RuneScape password
BankPinNo = '1234'; //Your 4-digit Bank Pin (if applicable).
BoothColor1 = 2838363; // Set these 3 to 3 different colors of the bank booth in front of you.
BoothColor2 = 796463;
BoothColor3 = 4022122;
Loads = 3; //How many loads do you want the script to do?
Direction = 'W'; //What direction are you facing when you are looking at the front of the booth?
var
x,y,l,m,ClickHereToPlay,ft: Integer;

///////////////////////START OF BANKING & LOGIN PROCEDURES//////////////////////

procedure LogMeIn;
begin
ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
'067D37AC3D95AADF2F50962C79');
If (not(LoggedIn)) then
begin
ClickOption('Existing', 1);
Wait(25 + Random(50));
Mouse(x + 24, y + 3, 3, 0, True);
Wait(25 + Random(50));
TypeSend(Username);
Wait(100 + Random(100));
Mouse(327, 272, 0, 0, True);
TypeSend(Password);
Wait(100 + Random(100));
ClickOption('Login', 1);
repeat
wait(50);
until(FindBitmapToleranceIn(ClickHereToPlay, x, y, 250, 270, 530, 390, 5))
Mouse(x, y, 2, 3, True);
FreeBitmap(ClickHereToPlay);
Wait(500);
end;
end;

procedure CompassStuff;
begin
MakeCompass(Direction);
HighestAngle;
end;

procedure Setup;
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
If (l = 0) then
begin
l:= 0;
end;
CompassStuff;
end;

procedure OpenTheBank;
begin
repeat
FindObjCustom(x, y, ['Bank', 'Use-', 'ank', 'ooth'], [BoothColor1, BoothColor2, BoothColor3], 3);
If (IsUpTextMulti('Use-', 'quick', 'ooth')) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('uick');
Wait(750 +random(250));
If (PinScreen) then
begin
InPin(BankPinNo);
m:= CreateBitmapMaskFromText('ontinue', NPCChars);
If (FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10) = True) then
begin
Mouse(x, y, 0, 0, true);
InPin(BankPinNo);
end;
end;
end;
until(BankScreen)
end;

procedure FindAndBank;
begin
repeat
FindObjCustom(x, y, ['Bank', 'Use-', 'ank', 'ooth'], [BoothColor1, BoothColor2, BoothColor3], 3);
If (IsUpTextMulti('Use-', 'quick', 'ooth')) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('uick');
Wait(750 +random(250));
If (PinScreen) then
begin
InPin(BankPinNo);
m:= CreateBitmapMaskFromText('ontinue', NPCChars);
If (FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10) = True) then
begin
Mouse(x, y, 0, 0, true);
InPin(BankPinNo);
end;
end;
end;
until(BankScreen)
MouseItem(2, false);
ChooseOption('All');
CloseBank;
end;

procedure FindAndBankHeadless;
begin
repeat
FindObjCustom(x, y, ['Bank', 'Use-', 'ank', 'ooth'], [BoothColor1, BoothColor2, BoothColor3], 3);
If (IsUpTextMulti('Use-', 'quick', 'ooth')) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('uick');
Wait(750 +random(250));
If (PinScreen) then
begin
InPin(BankPinNo);
m:= CreateBitmapMaskFromText('ontinue', NPCChars);
If (FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10) = True) then
begin
Mouse(x, y, 0, 0, true);
InPin(BankPinNo);
end;
end;
end;
until(BankScreen)
MouseItem(4, false);
ChooseOption('All');
CloseBank;
end;
////////////////////////END OF BANKING & LOGIN PROCEDURES///////////////////////

///////////////////////////START OF WITHDRAW PROCEDURES/////////////////////////

procedure WithdrawFull;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(1, 1, 27 +random(25));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForStringing;
begin
OpenTheBank;
FixBank;
Wait(250 +random(50));
Deposit(1, 1, 1);
Wait(100 +random(100));
Withdraw(6, 1, 14);
Wait(100 +random(150));
Withdraw(2, 1, 14);
CloseBank;
Wait(250 +random(100));
end;

procedure WithdrawForShaftsFT;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(5, 1, 1000000);
Wait(513);
Withdraw(1, 1, 26 +random(19));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForShaftsF;
begin
OpenTheBank;
FixBank;
Wait(250 +random(47));
Withdraw(1, 1, 27 +random(15));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForShafts;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(1, 1, 27 +random(23));
CloseBank;
Wait(250 +random(123));
end;

procedure Withdraw13OfEach;
begin
OpenTheBank;
FixBank;
Withdraw(1, 1, 13);
Wait(500);
Withdraw(2, 1, 13);
CloseBank;
Wait(250 +random(123));
end;

//////////////////////////END OF WITHDRAW PROCEDURES////////////////////////////

////////////////////////START OF FLETCHING PROCEDURES///////////////////////////
procedure FletchLongs;
begin
WithdrawFull;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('ong', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(500 +random(200));
TypeSend('' +inttostr(27 +random(25)));
Wait(50000 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchLongsString;
begin
Withdraw13ofEach;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('ong', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(13 +random(15)));
Wait(26000 +random(500));
MouseItem(2, true);
Wait(100);
MouseItem(15, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('ongbow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('All');
Wait(17750 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShorts;
begin
WithdrawFull;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('hort', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(500 +random(200));
TypeSend('' +inttostr(27 +random(25)));
Wait(50000 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShortsString;
begin
Withdraw13ofEach;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('hort', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(13 +random(15)));
Wait(26000 +random(500));
MouseItem(2, true);
Wait(100);
MouseItem(15, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('hortbow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('All');
Wait(17750 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShafts;
begin
WithdrawForShafts;
Wait(500 +random(100));
MouseItem(1, true);
Wait(300 +random(154));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('rrow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(27 +random(15)));
Wait(50000 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShaftsAttachFT;
begin
ft:= 0;
WithdrawForShaftsFT;
Wait(465 +random(100));
MouseItem(1, true);
Wait(300 +random(154));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('rrow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(27 +random(15)));
Wait(50000 +random(500));
repeat
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(12000 +random(125));
ft:= ft + 1;
until(ft = 2);
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(9000 +random(125));
FindAndBankHeadless;
l:= l+1;
end;

procedure FletchShaftsAttachF;
begin
ft:= 0;
WithdrawForShaftsF;
Wait(376 +random(100));
MouseItem(1, true);
Wait(300 +random(165));
MouseItem(4, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('rrow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(27 +random(15)));
Wait(50000 +random(500));
repeat
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(12000 +random(125));
ft:= ft + 1;
until(ft = 2);
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(9000 +random(125));
FindAndBankHeadless;
l:= l+1;
end;
procedure SBowsOnly;
begin
ft:= 0;
WithdrawForStringing;
If(InvCount = 28) then
begin
MouseItem(1, true);
Wait(100 +random(250));
MouseItem(15, true);
Wait(250 +random(300));
If(FletchType = 'LongBow') then m:= CreateBitmapMaskFromText('ongbow', NPCChars) else m:= CreateBitmapMaskFromText('hortbow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0 +random(2), 0 +random(2), false);
ChooseOption('All');
repeat
Wait(50);
until(InvCount = 14);
end;
If(InvCount < 28) then
begin
WriteLN('Out of either material for stringing. Closing Script.');
LogOut;
TerminateScript;
end;
end;




//////////////////////////////END OF FLETCHING PROCEDURES///////////////////////

begin
SetupSRL;
Setup;
repeat
If (Fletch = True) then
begin
If (FletchType = 'Longbow') then
begin
If (StringBow = True) then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
FletchLongsString;
end;
If (StringBow = False) then
begin
FletchLongs;
end;
end;
end;
If (FletchType = 'Shortbow') then
begin
If (StringBow = True) then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
FletchShortsString;
end;
If (StringBow = False) then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
FletchShorts;
end;
end;
If (FletchType = 'Shafts') then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
If (AttachFeather = True) then
begin
If (l = 0) then
begin
FletchShaftsAttachFT;
end;
If (l > 0) then
begin
FletchShaftsAttachF;
end;
end;
If (AttachFeather = False) then
begin
FletchShafts;
end;
end;
If (FletchType = 'StringOnly') then
begin
If(not(LoggedIn)) then
begin
LogMeIn;
end;
SBowsOnly;
end;
until(l = Loads)
Wait(5000 +random(2500));
LogOut;
end.

skilld u

2008-04-06 18:28:06

scar tags please. then i'll comment

Iron Man

2008-04-06 20:03:47

Use [*scar] tags without the * … I can't really read it without that. From what I can read, use SRL's DeclarePlayers instead of LogMeIn.

A lot of things are outdated like HighestAngle, use SetAngle(True);.

I'll post more suggestions when you get scar tags.

w00tage

2008-04-06 20:47:31

fixed, sorry about that.

Iron Man

2008-04-06 22:31:26

Like I said before use DeclarePlayers and MultiPlayer(read a tutorial).

Work on your standards.

Use more tolerance than 3, use 5-15. Theres a couple spots where you used Mouse without any randomness, use 2-5 for Mouse and MMouse.

Why not use SRL's bank finding?

Theres a couple spots where you can use failsafes but right now they are possible infinite loops, use MarkTime(integer); and TimeFromMark(SameInteger);

Your script was made in a old version of SRL, heres a compiling one:

{ Credits go to me, w00tage. #
################################################################################
################################################################################
////////////////////////////////////SETUP///////////////////////////////////////
////////////////////// 1. Set values below (in const). /////////////////////////
////////////////////// (Have brightness set to vbright.) ///////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 2. Put logs in first slot of bank, /////////////////////////
///////////////// with knife in first slot of inventory. ///////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 3. Put bowstrings in second slot of ////////////////////////
//////////////////////////////////// bank. /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 4. Put shafts in fourth slot of bank ///////////////////////
///////////////////////////// (if applicable). /////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 5. Put feathers in fifth slot of bank //////////////////////
///////////////////////////// (if applicable). /////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/////////////////// 6. Put bows (u) in sixth slot of bank //////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// Enjoy! ///////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
}
program PoWFletcher;
{.include SRL/SRL.scar}

const
Fletch = True; //Leave at true, else script won't work.
FletchType = 'Longbow'; //Can be Longbow, Shortbow, Shafts (for shafts, you need normal logs), or StringOnly.
StringBow = True; //Do you want the script to string bows?
StringBowsOnly = False; //Edited for stringing bows only...
AttachFeather = False; //Only true if you want to attach feathers to your shafts.
UserName = 'Username'; //Your RuneScape username
Password = 'Password'; //Your RuneScape password
BankPinNo = '1234'; //Your 4-digit Bank Pin (if applicable).
BoothColor1 = 2838363; // Set these 3 to 3 different colors of the bank booth in front of you.
BoothColor2 = 796463;
BoothColor3 = 4022122;
Loads = 3; //How many loads do you want the script to do?
Direction = 'W'; //What direction are you facing when you are looking at the front of the booth?
var
x,y,l,m,ClickHereToPlay,ft: Integer;

///////////////////////START OF BANKING & LOGIN PROCEDURES//////////////////////

procedure LogMeIn;
begin
ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
'26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
'067D37AC3D95AADF2F50962C79');
If (not(LoggedIn)) then
begin
ClickOption('Existing', 1);
Wait(25 + Random(50));
Mouse(x + 24, y + 3, 3, 0, True);
Wait(25 + Random(50));
TypeSend(Username);
Wait(100 + Random(100));
Mouse(327, 272, 0, 0, True);
TypeSend(Password);
Wait(100 + Random(100));
ClickOption('Login', 1);
repeat
wait(50);
until(FindBitmapToleranceIn(ClickHereToPlay, x, y, 250, 270, 530, 390, 5))
Mouse(x, y, 2, 3, True);
FreeBitmap(ClickHereToPlay);
Wait(500);
end;
end;

procedure CompassStuff;
begin
MakeCompass(Direction);
SetAngle(True);
end;

procedure Setup;
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
If (l = 0) then
begin
l:= 0;
end;
CompassStuff;
end;

procedure OpenTheBank;
begin
repeat
FindObjCustom(x, y, ['Bank', 'Use-', 'ank', 'ooth'], [BoothColor1, BoothColor2, BoothColor3], 3);
If (IsUpTextMultiCustom(['Use-', 'quick', 'ooth'])) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('uick');
Wait(750 +random(250));
If (PinScreen) then
begin
InPin(BankPinNo);
m:= CreateBitmapMaskFromText('ontinue', NPCChars);
If (FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10) = True) then
begin
Mouse(x, y, 0, 0, true);
InPin(BankPinNo);
end;
end;
end;
until(BankScreen)
end;

procedure FindAndBank;
begin
repeat
FindObjCustom(x, y, ['Bank', 'Use-', 'ank', 'ooth'], [BoothColor1, BoothColor2, BoothColor3], 3);
If (IsUpTextMultiCustom(['Use-', 'quick', 'ooth'])) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('uick');
Wait(750 +random(250));
If (PinScreen) then
begin
InPin(BankPinNo);
m:= CreateBitmapMaskFromText('ontinue', NPCChars);
If (FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10) = True) then
begin
Mouse(x, y, 0, 0, true);
InPin(BankPinNo);
end;
end;
end;
until(BankScreen)
MouseItem(2, false);
ChooseOption('All');
CloseBank;
end;

procedure FindAndBankHeadless;
begin
repeat
FindObjCustom(x, y, ['Bank', 'Use-', 'ank', 'ooth'], [BoothColor1, BoothColor2, BoothColor3], 3);
If (IsUpTextMultiCustom(['Use-', 'quick', 'ooth'])) then
begin
Mouse(x, y, 0, 0, false);
ChooseOption('uick');
Wait(750 +random(250));
If (PinScreen) then
begin
InPin(BankPinNo);
m:= CreateBitmapMaskFromText('ontinue', NPCChars);
If (FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10) = True) then
begin
Mouse(x, y, 0, 0, true);
InPin(BankPinNo);
end;
end;
end;
until(BankScreen)
MouseItem(4, false);
ChooseOption('All');
CloseBank;
end;
////////////////////////END OF BANKING & LOGIN PROCEDURES///////////////////////

///////////////////////////START OF WITHDRAW PROCEDURES/////////////////////////

procedure WithdrawFull;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(1, 1, 27 +random(25));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForStringing;
begin
OpenTheBank;
FixBank;
Wait(250 +random(50));
Deposit(1, 1, 1);
Wait(100 +random(100));
Withdraw(6, 1, 14);
Wait(100 +random(150));
Withdraw(2, 1, 14);
CloseBank;
Wait(250 +random(100));
end;

procedure WithdrawForShaftsFT;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(5, 1, 1000000);
Wait(513);
Withdraw(1, 1, 26 +random(19));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForShaftsF;
begin
OpenTheBank;
FixBank;
Wait(250 +random(47));
Withdraw(1, 1, 27 +random(15));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForShafts;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(1, 1, 27 +random(23));
CloseBank;
Wait(250 +random(123));
end;

procedure Withdraw13OfEach;
begin
OpenTheBank;
FixBank;
Withdraw(1, 1, 13);
Wait(500);
Withdraw(2, 1, 13);
CloseBank;
Wait(250 +random(123));
end;

//////////////////////////END OF WITHDRAW PROCEDURES////////////////////////////

////////////////////////START OF FLETCHING PROCEDURES///////////////////////////
procedure FletchLongs;
begin
WithdrawFull;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('ong', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(500 +random(200));
TypeSend('' +inttostr(27 +random(25)));
Wait(50000 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchLongsString;
begin
Withdraw13ofEach;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('ong', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(13 +random(15)));
Wait(26000 +random(500));
MouseItem(2, true);
Wait(100);
MouseItem(15, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('ongbow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('All');
Wait(17750 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShorts;
begin
WithdrawFull;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('hort', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(500 +random(200));
TypeSend('' +inttostr(27 +random(25)));
Wait(50000 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShortsString;
begin
Withdraw13ofEach;
MouseItem(1, true);
Wait(250 +random(23));
MouseItem(2, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('hort', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(13 +random(15)));
Wait(26000 +random(500));
MouseItem(2, true);
Wait(100);
MouseItem(15, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('hortbow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('All');
Wait(17750 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShafts;
begin
WithdrawForShafts;
Wait(500 +random(100));
MouseItem(1, true);
Wait(300 +random(154));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('rrow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(27 +random(15)));
Wait(50000 +random(500));
FindAndBank;
l:= l+1;
end;

procedure FletchShaftsAttachFT;
begin
ft:= 0;
WithdrawForShaftsFT;
Wait(465 +random(100));
MouseItem(1, true);
Wait(300 +random(154));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('rrow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(27 +random(15)));
Wait(50000 +random(500));
repeat
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(12000 +random(125));
ft:= ft + 1;
until(ft = 2);
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(9000 +random(125));
FindAndBankHeadless;
l:= l+1;
end;

procedure FletchShaftsAttachF;
begin
ft:= 0;
WithdrawForShaftsF;
Wait(376 +random(100));
MouseItem(1, true);
Wait(300 +random(165));
MouseItem(4, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('rrow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('X');
Wait(750 +random(200));
TypeSend('' +inttostr(27 +random(15)));
Wait(50000 +random(500));
repeat
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(12000 +random(125));
ft:= ft + 1;
until(ft = 2);
MouseItem(2, true);
Wait(250 +random(136));
MouseItem(3, true);
Wait(750 +random(250));
m:= CreateBitmapMaskFromText('eadless', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0, 0, false);
ChooseOption('10');
Wait(9000 +random(125));
FindAndBankHeadless;
l:= l+1;
end;
procedure SBowsOnly;
begin
ft:= 0;
WithdrawForStringing;
If(InvCount = 28) then
begin
MouseItem(1, true);
Wait(100 +random(250));
MouseItem(15, true);
Wait(250 +random(300));
If(FletchType = 'LongBow') then m:= CreateBitmapMaskFromText('ongbow', NPCChars) else m:= CreateBitmapMaskFromText('hortbow', NPCChars);
FindBitmapMaskTolerance(m, x, y, 9, 348, 523, 471, 50, 10);
Mouse(x, y, 0 +random(2), 0 +random(2), false);
ChooseOption('All');
repeat
Wait(50);
until(InvCount = 14);
end;
If(InvCount < 28) then
begin
WriteLN('Out of either material for stringing. Closing Script.');
LogOut;
TerminateScript;
end;
end;




//////////////////////////////END OF FLETCHING PROCEDURES///////////////////////

begin
SetupSRL;
Setup;
repeat
If (Fletch = True) then
begin
If (FletchType = 'Longbow') then
begin
If (StringBow = True) then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
FletchLongsString;
end;
If (StringBow = False) then
begin
FletchLongs;
end;
end;
end;
If (FletchType = 'Shortbow') then
begin
If (StringBow = True) then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
FletchShortsString;
end;
If (StringBow = False) then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
FletchShorts;
end;
end;
If (FletchType = 'Shafts') then
begin
If (not(LoggedIn)) then
begin
LogMeIn;
end;
If (AttachFeather = True) then
begin
If (l = 0) then
begin
FletchShaftsAttachFT;
end;
If (l > 0) then
begin
FletchShaftsAttachF;
end;
end;
If (AttachFeather = False) then
begin
FletchShafts;
end;
end;
If (FletchType = 'StringOnly') then
begin
If(not(LoggedIn)) then
begin
LogMeIn;
end;
SBowsOnly;
end;
until(l = Loads)
Wait(5000 +random(2500));
LogOut;
end.


Also correct me if I'm wrong but these can be made into a case

procedure WithdrawFull;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(1, 1, 27 +random(25));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForStringing;
begin
OpenTheBank;
FixBank;
Wait(250 +random(50));
Deposit(1, 1, 1);
Wait(100 +random(100));
Withdraw(6, 1, 14);
Wait(100 +random(150));
Withdraw(2, 1, 14);
CloseBank;
Wait(250 +random(100));
end;

procedure WithdrawForShaftsFT;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(5, 1, 1000000);
Wait(513);
Withdraw(1, 1, 26 +random(19));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForShaftsF;
begin
OpenTheBank;
FixBank;
Wait(250 +random(47));
Withdraw(1, 1, 27 +random(15));
CloseBank;
Wait(250 +random(123));
end;

procedure WithdrawForShafts;
begin
OpenTheBank;
FixBank;
Wait(250 +random(23));
Withdraw(1, 1, 27 +random(23));
CloseBank;
Wait(250 +random(123));
end;


And if you wanted to be more accurate you could use DTM's for item finding in your inventory. (Don't forget FreeDTM)

StrikerX

2008-04-07 04:03:35

try to use SRL banking its much more efficient then FindObjCustom

kingkilla

2008-04-08 22:31:48

HAHAHAHAHAH you stole this script, even read the first fucking line of it, it was PoW fletching, which is a popular fletching bot. Give him some credit, or your gonna get banned.

Richard

2008-04-09 09:37:46

Ok, well, just to let you know. This script will try and fletch anything. It will withdraw whatever the top item in the bank is, which means it could try making a longbow out of lobster. So I would use DTMs so that it is safe.


Second I would use OpenBankFast(bank:string) so people don't have to pick the colours themselves.


Third, with your logging in you have a long procedure, that is very unessesary, you can just use SRL DeclarePlayers as its much more effective.


And finally, you have no antiban, which means this script = bannable. you should add some basic antiban functions like PickUpMouse, or AlmostLogout. They make the script alot less likely to get you banned. If only Jagex lt us auto…

naz008

2008-05-10 20:47:07

is this safe to test out? because it has no antiban like "dude richard" said.