Code:
program AIOFletcher;
{$DEFINE SMART}
{$i srl/srl.simba}
var
BowDTM, Fletched, Counter,LogDTM , BowStringDTM, KnifeDTM, StartXP, CurrentXp: integer;
wb, xb, yb, zb, RealBTime, CurrentBTime, BreakRounds, TotalBreaks: Integer;
const
//What banktab is the fletching stuff stored in?
WatBankTab = 9;
//What banking method would you like to use?
BankStyle = 'Find' ;
//( 'Find' / 'Set' )
// 'Set' bankstyle: withdraws from a set location
// 'Find' bankstyle: Finds the item DTM make sure there is only one Log type in that tab
// (not recommended for stringing as it might mix up strung from unstrung)
//
// What Are you doing?
Action = 'Fletch';
//( 'Fletch' / 'String' )
//
// What type of bow are you making?
Bowtype = 'Long';
//( 'Long' / 'Short' ) Longbows or shortbows
{=====Fill out If Bankstyle set to 'Set'=====}
FirstItemCol = 1;
FirstItemRow = 0;
BowStringCol = 0;
BowStringRow = 0;
//Show Debug text?
Debug = True;
//Exp Bar row- one of the options must be total exp or fletch exp
XpBar = 1;
{===================================SRL Stats==============================================}
SRLStats_Username = ''; // ***Leave blank if you don't have a stats account***
SRLStats_Password = '';
{================================Break settings============================================}
Breaking = False ; //Are we going to take Breaks ( True / False )
SwitchWorlds = True; //Are we going to Hop worlds after breaks? ( True / False )
BreakIn = 140; //How long before we take a break? (minutes)
BreakFor = 30; //How long will we break for? (minutes)
Bir = 15; //Random minutes to add/subtract from how long until we break
Bfr = 15; //Random minutes to add/subjtract from break duraction
{========First inv slot Co-ordinates do not touch=========}
MIX3 = 600;
MIY3 = 300;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Pin := '';
Players[0].Active := True;
end;
Function FindDTMRotate(DTM:Integer; var x, y:integer; sx, sy, ex, ey:integer):boolean;
var
aFound:extended;
begin
result := finddtmrotated(DTM, x, y, sx, sy, ex, ey, - Pi, Pi, Pi / 30, aFound);
end;
procedure AntiBan();
begin
if (not (LoggedIn)) then
Exit;
FindNormalRandoms;
case (Random(1000)) of
0: MMouse(RandomRange(MSX1, MSX2), RandomRange(MSY1, MSY2), 4, 4);
1: HoverSkill('random', False);
2..3: ExamineInv;
4:
begin
HoverSkill('Fletching', False);
Wait(RandomRange(2000, 4000));
end;
5:
begin
PickUpMouse;
SleepAndMoveMouse(1500 + Random(500));
end;
6:
begin
GameTab(tab_Stats);
Wait(1500 + Random(500));
GameTab(tab_Inv);
end;
7..50:
begin
BoredHuman;
SetAngle(SRL_ANGLE_HIGH);
end;
51: Wait(RandomRange(750, 2000));
end;
end;
procedure WaitFinnish;
var
x, y : integer;
begin
if (Action = 'Fletch') then
begin
wait(randomrange(1000, 2000));
Marktime(Counter);
LogDTM:= DTMFromString('mwQAAAHic42RgYNBkZGAwAmJzIDYAYnUgVgBiaSCWBGIZII4FqotigNCpQJwOxBlAnAYVCwdiMwMBIMmEF6cwEAaMRGA4AAAltQXB');
while Existsitemdtm(LogDTM, x, y) do
begin
case random(100) of
1..9: Sleepandmovemouse(Randomrange(500, 1000));
10..15: Antiban;
end;
if timefrommark(Counter) > 60000 then
begin
FreeDTM(LogDTM);
Exit;
end;
end;
FreeDTM(LogDTM);
end
else
begin
wait(randomrange(1000, 2000));
Marktime(Counter);
BowstringDTM:= DTMFromString('mfgEAAHicrc5NCkBQFIbhcy3BAizFJkytUAyUnxRyI0T+duSVO1CGfPV0Buc7dWwRySyREho1CiSIESFAjgodBjSml5peiF6JjJixYMX2sOMwrt2k7psOLbSZvufylfWZI/9E/eSdE/G+HLQ=');
while Existsitemdtm(BowStringDTM, x, y) do
begin
case random(100) of
1..9: Sleepandmovemouse(Randomrange(500, 1000));
10..15: Antiban;
end;
if timefrommark(Counter) > 30000 then
begin
FreeDTM(BowStringDTM);
Exit;
end;
end;
FreeDTM(BowStringDTM);
end;
end;
function ChooseOptionDTM(DTM: Integer): boolean;
var
x, y: integer;
begin
wait(randomrange(200,500));
if FindDTMRotate(DTM, x, y,MCX1,MCY1,MCX2,MCY2) then
begin
MMouse(x, y, 7, 7);
ClickMouse2(true);
if Debug then
WriteLn('Option Chosen');
result := true;
exit;
end;
end;
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
var
h, m, s, timeleft: integer;
begin
if not LoggedIn then
Exit;
if (HowManyPlayers = 1) then
begin
timeleft := (wb) + (yb) - GetTimeRunning;
ConvertTIME(Timeleft, H, M, S);
Writeln('Time Until Break: ' + IntToStr(h) + ' Hours, ' + Inttostr(m) + ' Minutes and ' + IntToStr(s) + ' Seconds');
if (GetTimeRunning < ((wb) + (yb) + BreakRounds)) then
Exit
else if (GetTimeRunning > ((wb) + (yb) + BreakRounds)) then
begin
RealBTime := ((xb + zb) / 60000);
Writeln('Taking a break for about ' + IntToStr(RealBTime) + ' minutes.');
Logout;
MarkTime(CurrentBTime);
repeat
Wait(21000);
ConvertTime((xb + zb) - TimeFromMark(CurrentBTime), h, m, s);
ClearDebug;
Writeln('Breaktime left: ' + IntToStr(h) + ':' + IntToStr(m) + ':' + IntToStr(s));
until (TimeFromMark(CurrentBTime) > (xb + zb));
Writeln('Logging in.');
if SwitchWorlds then
if LoginPlayerToLob then
ChangeWorld(RandomWorld(True, False))
else
LoginPlayer;
Wait(4000);
Result := LoggedIn;
ClickNorth(SRL_ANGLE_HIGH);
IncEx(BreakRounds, (wb) + (xb));
Inc(TotalBreaks);
Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
wb := (BreakIn * 60000);
xb := (BreakFor * 60000);
yb := RandomRange( - Bir * 60000, Bir * 60000);
zb := RandomRange( - Bfr * 60000, Bfr * 60000);
end;
end;
end;
procedure Fletch;
var
t:integer;
begin
wait(randomrange(200, 300));
Invmouse(1, 3);
if Debug then
WriteLn('mouse moved to 1st inv slot');
if waituptext('Craft',5000) then
begin
clickmouse2(true);
KnifeDTM := DTMFromString('mKgEAAHicnc27CoAwDIXh1FpEwWrxMjiIuPoWff+H8g9m0UX0wDckkJMoIjUCvFzxNuu+QYsOA0YkRExYsWPDghm93VQorTNYl/bkQ5uLz5L9fnqL++meE/9qAow=');
while (t<6000) do
begin
ChooseOptionDTM(KnifeDTM);
if ChooseOptionDTM(BowDTM) then
begin
freeDTM(KnifeDtm);
exit;
End;
end;
FreeDTM(KnifeDTM);
end;
end;
procedure StringBows;
var
x, y,t: integer;
begin
wait(randomrange(200, 300));
if ExistsItemDTM(BowDTM, x, y) then
begin
MMouse(x, y, 7, 7);
wait(200);
BowstringDTM:= DTMFromString('mfgEAAHicrc5NCkBQFIbhcy3BAizFJkytUAyUnxRyI0T+duSVO1CGfPV0Buc7dWwRySyREho1CiSIESFAjgodBjSml5peiF6JjJixYMX2sOMwrt2k7psOLbSZvufylfWZI/9E/eSdE/G+HLQ=');
if ExistsItemDTM(BowStringDTM, x, y) then
begin
FreeDTM(BowStringDTM);
MMouse(x, y, 7, 7);
wait(200);
ClickMouse2(True);
end;
FreeDTM(BowstringDTM);
end ;
while (timefrommark(t)<2000) do
ChooseOptionDTM(BowDTM);
end;
procedure Bank;
var
x, y, chestDTM, failcount: Integer;
aFound: Extended;
begin
ChestDTM := DTMFromString('mQwAAAHicY2ZgYOBkZmDgBWJhIFZmZGBQAmI5IM6MDWDITw5luHHuHAMHUB0MMyJhIAAAu7wFaA==');
while not (bankscreen) and not (pinscreen) do
begin
Writeln('Time To Bank');
if (finddtmrotated(ChestDTM, x, y, MSX1, MSY1, MSX2, MSY2, - Pi, Pi, Pi / 30, aFound)) then
begin
mmouse(x, y, 10, 10);
if (WaitUpText('hest', 1000)) then
Clickmouse2(True);
end
else
begin
ClickNorth(SRL_ANGLE_HIGH);
case (random(4)) of
1: MakeCompass('E');
2: MakeCompass('N');
3: MakeCompass('S');
4: MakeCompass('W');
end;
inc(failcount);
end;
if failcount > 3 then
terminatescript;
end;
freeDTM(ChestDtm);
repeat
if (PinScreen) then
(InPin(Players[0].Pin));
until (BankScreen);
wait(randomrange(400, 800));
Quickdeposit(SRL_DEPOSIT_ALL);
if (CurrentBankTab <> Watbanktab) then
Banktab(Watbanktab);
end;
procedure WithdrawFletch;
var
x, y: Integer;
begin
Case lowercase(bankstyle) of
'find':
begin
LogDTM:= DTMFromString('mwQAAAHic42RgYNBkZGAwAmJzIDYAYnUgVgBiaSCWBGIZII4FqotigNCpQJwOxBlAnAYVCwdiMwMBIMmEF6cwEAaMRGA4AAAltQXB');
if Debug then
WriteLn('Withdraw log DTM Loaded');
if FindDTMRotate(LogDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
freeDTM(logDTM);
if Debug then
WriteLn('Log DTM found');
MMouse(x, y, 7, 7);
clickmouse2(false);
waitoption('All' , 1000);
Fletched := Fletched + 28;
wait(randomrange(400, 600));
end;
Closebank;
end;
'set':
begin
if (currentbanktab <> WatBankTab) then Banktab(WatBankTab);
withdraw(FirstItemCol ,FirstItemRow ,28);
if Debug then
WriteLn('Withdrew logs');
Fletched := Fletched + 28;
end;
end;
end;
procedure Withdrawstring;
var
x, y: Integer;
begin
Case lowercase(bankstyle) of
'find':
begin
if Debug then
WriteLn('Bank DTM Load');
if FindDTMRotate(BowDTM, x, y, MSX1,MSY1,MSX2,MSY2) then
begin
if Debug then
WriteLn('BowDTM Found');
ClickMouse2(False);
WaitOption('Withdraw-X' ,1500);
wait(randomrange(200 , 700));
Typesend('14');
BowstringDTM:= DTMFromString('mfgEAAHicrc5NCkBQFIbhcy3BAizFJkytUAyUnxRyI0T+duSVO1CGfPV0Buc7dWwRySyREho1CiSIESFAjgodBjSml5peiF6JjJixYMX2sOMwrt2k7psOLbSZvufylfWZI/9E/eSdE/G+HLQ=');
if FindDTMRotate(BowstringDTM, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
FreeDTM(BowstringDTM);
if Debug then
WriteLn('String DTM Found');
ClickMouse2(False);
WaitOption('Withdraw-X' , 1500);
wait(randomrange(200 , 700));
Typesend('14');
end;
FreeDTM(BowstringDTM);
wait(randomrange(400 , 600));
Fletched := Fletched + 14;
end;
Closebank;
if Debug then
end;
'set':
begin
if (currentbanktab <> WatBankTab) then Banktab(WatBankTab);
withdraw(FirstItemCol,FirstItemRow,14);
withdraw(BowstringCol,bowstringRow,14);
if Debug then
WriteLn('Withdrew Bows and Strings');
Fletched := Fletched + 14;
end;
end;
end;
function SkillStarted: boolean;
var
x, y, t: Integer;
begin
case lowercase(action) of
'fletch':
begin
if (invcount<14) then
exit;
Marktime(t);
if Debug then
WriteLn('Checking Started');
while (timefrommark(t) < 10000) do
begin
if (FindDTM(BowDTM, x, y, MIX1, MIY1, MIX3, MIY3)) then
begin
if Debug then
WriteLn('Started');
Result := True;
Exit;
end;
WriteLn('Not Started');
Result := False;
end;
end;
'string':
begin
if (invcount<14) then
exit;
Marktime(t);
if Debug then
WriteLn('Checking Started');
while (timefrommark(t) < 10000) do
begin
if (invcount<28) then
begin
if Debug then
WriteLn('Started');
Result := True;
Exit;
end;
//WriteLn('Not Started');
Result := False;
end;
end;
end;
end;
procedure InvCheck;
var
Failcount: integer;
begin
if Debug then
WriteLn('checking Inv');
while (Invcount < 28) and (Failcount < 3) do
begin
Bank;
case Action of
'String': WithdrawString;
'Fletch': WithdrawFletch;
end
inc(failcount);
end;
if (Failcount >= 3) then
terminatescript;
end;
procedure Proggy;
var
xp: integer;
begin
XP := GetXpBar(XpBar) - Startxp;
CurrentXP := Xp - CurrentXp;
Writeln('********************************');
WriteLn('Time Running = '+TimeRunning);
Writeln('Exp Gained = ' + IntToStr(Xp));
Writeln('Exp/Hour = ' + IntToStr(Round((xp/(GetTimeRunning/3600000.0)))));
Writeln('Fletched/Hour = ' + IntToStr(Round(( Fletched/(GetTimeRunning/3600000.0)))));
Writeln('Items Done = ' + IntToStr(fletched));
Writeln('AIO Fletcher by EnSlaved ');
Writeln('********************************');
Writeln('Post Feedback and Proggies On Forum Thread Please!');
Stats_IncVariable('Fletching EXP (Gained)',currentXp);
end;
procedure DoString;
var
failed: integer;
begin
repeat
If not loggedin then
loginplayer;
Bank;
WithdrawString;
StringBows;
if SkillStarted then
begin
Failed := 0;
WaitFinnish;
Proggy;
if breaking then
BreakHandler(BreakIn, BreakFor, Bir, Bfr);
end
else
begin
inc(Failed) if (failed > 3) then
TerminateScript;
end;
until (AllPlayersInactive);
end;
procedure DoFletch;
var
failed: integer;
begin
repeat
Bank;
WithdrawFletch;
Fletch;
if SkillStarted then
begin
Failed := 0;
WaitFinnish;
Proggy;
if breaking then
BreakHandler(BreakIn, BreakFor, Bir, Bfr);
end
else
begin
inc(Failed) if (failed > 3) then
TerminateScript;
end;
until (AllPlayersInactive);
end;
begin
{$IFDef Smart}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
SetupSrl;
If (SRLStats_Username = '') Then
SetupSRLStats(1231, 'Anonymous', 'anon1337')
Else
SetupSRLStats(1231, SRLStats_Username, SRLStats_Password);
Declareplayers;
while not (loggedin) do
Loginplayer;
MakeCompass('E');
SetAngle(0);
if not (IsXPBarOpen) then
ToggleXpBar(True);
StartXp:= GetXPBar(XPbar);
Case lowercase(Bowtype) of
'short' : BowDTM:= DTMFromString('m1gAAAHic42JgYPgHxCyMDAzsQMwIxL+hYp+A+D0QfwXiH0AcB8QRQBwFZScBcSIQpwBxKpSdwAACTERi4gAjkRgBAEzmCrg=');
'long' : BowDTM:= DTMFromString('mwQAAAHic42RgYGAHYlYozQXE/EAsCMW8DBDADqVZoGweIBYAYjGoekawLBMRmDBgJALDAQB4lADU');
end;
ExitSquealOfFortune;
case Action of
'String': DoString;
'Fletch': DoFletch;
end;
end.
thats the code, approve plz, written in pascalscript i do believe, think thats what simba uses
Warning, does send anonymous usage data, to remove, remove all reletive lines to "SRLSTAT"
for anyone that uses simba, you should know that this is completely safe, as it is built in feature that just posts a run count, exp gained and run time to the relevant script on the stats page