SRL Archive - RS3 Outdated / Broken Scripts

Justins' Basic Soul Wars Fletcher


Justin

2013-10-05 05:31:36

Since the release of SRL-6, SMART 8.3 and Simba 1.0.3, I decided to get back into scripting for RS3. Over the past few days I have been reading the SRL-6 docs (http://docs.villavu.com/srl-6/) to get a grasp of the include.

I decided to make a basic Soul Wars Fletcher as my first public srl-6 script. I don't expect this script to get much attention due to how 'basic' it is. What it will do is craft Maple Logs to Maple shieldbow (u)'s.

The script can and will be improved overtime. There's many functions that can be improved and they will be over time. Please keep an eye on the bottom right image as that will change if there is an update.

Please make sure you read this thread in how to correctly setup SRL-6 for RS3 - http://villavu.com/forum/showthread.php?t=47714 and http://villavu.com/forum/showthread.php?t=106161

Maple logs need to be in the 9th bank slot.

Please let me know if you have any problems with this script. I have trained 55-70 fletching with this script :)

From: Coh3n

Adding players to Rafiki (Player Manager)

[INDENT]
Adding players to the player manager is very, very easy. It is a very basic form, but does allow multiple player files to be saved/loaded, as well and username and password encryption. It also means you will never have to enter your username and password in a script ever again. Open Simba and go to SRL > Player Manager. A form should pop up:


The setup is pretty straight forward:

  • Click the green "+" button to add a player.
  • Edit the players information on the right. You'll notice only the login name and password are required. I recommend you also enter a nickname. This nickname can be used to load your player into a script, otherwise you will have to use your login name. The display name is used only for debugging.
  • Choose whether or not you want to use encryption.
  • Save your players!
  • You can add/delete players from the list at any time.
Note that the Player Manager can run at any time, and it does not start a script. The Player Manager and the script are completely separate. Script specific settings are set in the script.
[/INDENT]


For people who want to know what was chaged: http://diffchecker.com/lwe7k67m

program SWFletcher;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

var
resetup = true;
x, y, img_name, amountCut: integer;
_img_name: string;

procedure declarePlayers();
begin
players.setup([''], '');
currentPlayer := 0;
end;

function waitForInterface: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(2070783, 465, 279, 497, 293) = 54) or (countColor(10987173, 352, 159, 385, 181) = 3) or (getSystemTime() >= t));
result := (countColor(2070783, 465, 279, 497, 293) = 54) or (countColor(10987173, 352, 159, 385, 181) = 3);
end;

function waitForCraftInterface: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(10987173, 352, 159, 385, 181) = 3) or (getSystemTime() >= t));
result := (countColor(10987173, 352, 159, 385, 181) = 3);
end;

function waitForUnlock: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(13553357, IntToBox(866, 275, 933, 297)) <> 4) or (getSystemTime() >= t));
result := (countColor(13553357, IntToBox(866, 275, 933, 297)) <> 4);
sleep(300 + random(300));
end;

function getInterface: string;
begin
if countColor(2070783, 465, 279, 497, 293) = 54 then
result := 'knife';
if countColor(10987173, 352, 159, 385, 181) = 3 then
result := 'craft';
end;

function findBankChest(hover: boolean): boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := getToleranceSpeed();
setColorToleranceSpeed(2);
settolerancespeed2modifiers(0.43, 0.82);
if not (FindColorsTolerance(arP, 1449508, mainscreen.getBounds(), 5)) then
begin
setColorToleranceSpeed(tmpCTS);
settolerancespeed2modifiers(0.2, 0.2);
if (bankScreen.isOpen()) then
bankScreen.close();
sleep(60 + random(140));
players[currentPlayer].logout();
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 0.66) and (X <= 2.23) and (Y >= 0.67) and (Y <= 2.26) and (Z >= 0.50) and (Z <= 1.56) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(479, 340));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then
Continue;
P := MiddleTPA(ararP[i]);
smartImage.drawBox(IntToBox(P.x, P.y, P.x + 10, P.y + 10), false, clLime);
Mouse(Point(P.x + random(10), P.y + random(10)), mouse_Move, MOUSE_HUMAN);
smartImage.clearArea(IntToBox(P.x, P.y, P.x + 10, P.y + 10));
Wait(100 + Random(100));
if (isMouseOverText(['Bank'], 1000)) then
begin
Result := True;
if not hover then
fastClick(mouse_Left);
Break;
end;
end;
setColorToleranceSpeed(tmpCTS);
settolerancespeed2modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
if (bankScreen.isOpen()) then
bankScreen.close();
sleep(60 + random(140));
Exit;
end;
end;

procedure randomGameTabCommon();
var
allTabs, commonTabs, t: Integer;
TIA: TIntegerArray;
begin
if not (isLoggedIn()) then
exit();

t := gameTabs.getActiveTab();
TIA := [TAB_STATS, TAB_BACKPACK, TAB_EQUIPMENT, TAB_FRIENDS, TAB_MAGIC];

repeat
commonTabs := TIA[random(length(TIA))];
until(commonTabs <> t);

gameTabs.openTab(commonTabs);

wait(randomRange(300, 600));

gameTabs.openTab(t);
end;

procedure ProgressReport; //Thanks slayr288!
var
T1, T2, T3: Integer;
XPPerHour, XPGain, TimeGone, LogsPerHour: Extended
begin
TimeGone := (GetTimeRunning/1000);
XPGain := 58.3 * amountCut;
XPPerhour := (3600*(XPGain))/((TimeGone));
LogsPerHour := (3600*(amountCut))/((TimeGone));
ConvertTime(GetTimeRunning, T1, T2, T3);
begin
smartImage.clearArea(IntToBox(739, 484, 954, 554));
smartImage.DrawText('Time Ran: ' + IntToStr(T1) + ':' + IntToStr(T2) + ':' + IntToStr(T3), Point(742, 490), upchars, false, 5730676);
smartImage.DrawText('Logs cut: ' + IntToStr(amountCut), Point(742, 500), upchars, false, 5730676);
smartImage.DrawText('Logs cut p/h: ' + IntToStr(Round(LogsPerHour)), Point(742, 510), upchars, false, 5730676);
smartImage.DrawText('XP Gained: ' + IntToStr(Round(XPGain)), Point(742, 520), upchars, false, 5730676);
smartImage.DrawText('XP p/h: ' + IntToStr(Round(XPPerhour)), Point(742, 530), upchars, false, 5730676);
end;
end;

procedure mainLoop()
var
p: TPointArray;
b: TBox;
t, a: integer;
k: boolean;
begin
repeat
if not IsLoggedIn then
begin
players[currentPlayer].login();
sleep(3000 + random(1400));
typeByteWait(vk_up, 800 + random(200));
end;
if (tabBackpack.count() = 28) then
begin
if(bankScreen.isOpen()) then
bankScreen.close();
smartImage.drawBox(tabBackPack.getSlotBox(1), false, clLime);
tabBackpack.mouseSlot(1, MOUSE_MOVE);
smartImage.clearArea(tabBackPack.getSlotBox(1));
if (isMouseOverText(['logs'], 1000)) then
begin
fastClick(mouse_Left);
if waitForInterface then
if getInterface = 'knife' then
begin
smartImage.drawBox(IntToBox(460, 309, 503, 354), false, clLime);
MouseBox(IntToBox(460, 309, 503, 354), mouse_Left);
smartImage.clearArea(IntToBox(460, 309, 503, 354));
waitForCraftInterface;
end;
if getInterface = 'craft' then
begin
smartImage.drawBox(IntToBox(480, 453, 575, 479), false, clLime);
MouseBox(IntToBox(482, 454, 702, 477), mouse_Left);
smartImage.clearArea(IntToBox(480, 453, 575, 479));
t := getSystemTime() + 51000;
k := false;
a := randomRange(24, 27);
repeat
wait(100 + random(350));
case random(1000) of
0:
begin
smartImage.drawBox(tabStats.getSkillBox(SKILL_FLETCHING), false, clLime);
MouseBox(tabStats.getSkillBox(SKILL_FLETCHING), mouse_Move);
smartImage.clearArea(tabStats.getSkillBox(SKILL_FLETCHING));
end;
14: tabBackpack.open();
60: randomRClickItem();
90: sleepAndMoveMouse(1000 + random(2000));
150: pickUpMouse();
180: mouseOffClient(4);
220: smallRandomMouse();
280: randomCameraAngle(MS_ANGLE_HIGH);
350: randomCompass(10, 30, true);
400: randomGameTabCommon();
end;
if (countColor(131072, tabBackPack.getSlotBox(a)) = 75) then
begin
if not k then
findBankChest(true);
k := true;
end;
until (countColor(131072, tabBackPack.getSlotBox(28)) = 75) or (getSystemTime() >= t);
sleep(600 + random(200));
amountCut := amountCut + 28;
ProgressReport;
end;
end;
end;
if findBankChest(false) then
begin
if (BankScreen.isOpen(5000)) then
begin
smartImage.drawBox(IntToBox(481, 586, 508, 604), false, clLime);
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
smartImage.clearArea(IntToBox(481, 586, 508, 604));
smartImage.drawBox(IntToBox(521, 120, 542, 136), false, clLime);
MouseBox(IntToBox(521, 120, 542, 136), mouse_move);
smartImage.clearArea(IntToBox(521, 120, 542, 136));
if (isMouseOverText(['logs'], 1000)) then
begin
fastClick(MOUSE_RIGHT);
chooseOption.select(['All']);
sleep(60 + random(140));
bankScreen.close();
sleep(60 + random(140));
if bankScreen.isOpen() then
bankScreen.close();
smartImage.drawBox(tabBackPack.getSlotBox(1), false, clLime);
tabBackpack.mouseSlot(1, MOUSE_MOVE);
smartImage.clearArea(tabBackPack.getSlotBox(1));
waitForUnlock;
end;
end else
begin
bankScreen.close();
sleep(60 + random(140));
end;
end;
until (false);
end;

begin
declarePlayers();
smartEnableDrawing := true;
_img_name := GetPage('http://srljustin.com/sw_name');
img_name := BitmapFromString(159, 165, _img_name);
SetupSRL;
smartImage.drawBitmap(img_name, Point(576, 427));
MouseSpeed := randomRange(20, 28);
players[currentPlayer].login();
mainLoop();
end.

Ashaman88

2013-10-05 09:54:28

Nice job Justin!

rj

2013-10-05 09:56:05

Grats on first SRL6 script release (and your first release in a while)

Ian

2013-10-05 10:29:36

Congrats on the release Justin! :D

Justin

2013-10-05 10:32:15

Thanks guys. I plan on releasing more scripts for RS3, just unsure what to make.

Sjoe

2013-10-05 10:36:22

clay softener please :whistling:

rj

2013-10-05 10:54:34

From: Justin
Thanks guys. I plan on releasing more scripts for RS3, just unsure what to make.


Any-where miner with me

thx4thescript

2013-10-05 16:53:07

I am getting this error when I try to run this script
-- TPlayerArray.setup()
---- ERROR: Couldn't find army file()
-- TPlayerArray.setup(): false
Successfully executed.

Olly

2013-10-05 17:10:28

From: thx4thescript
I am getting this error when I try to run this script
-- TPlayerArray.setup()
---- ERROR: Couldn't find army file()
-- TPlayerArray.setup(): false
Successfully executed.


change the second parameter of players.setup to whatever your army is named, so on default it's default so try players.setup(['myplayerusername or nick'], 'default');

thx4thescript

2013-10-05 17:50:08

thanks olly that got the client loading but now after I configured all my settings on RS it wont log me in
------ Entering username...
Exception in Script: Runtime error: "You passed a wrong xe to a finder function: 960. The client has a width of 960, thus the xe is out of bounds." at line 145, column 23 in file "C:\Simba\Includes\SRL-6\lib\utilities\wrappers.simba"
The following bitmaps were not freed: [0, SMART Debug Image]
File[C:\Simba\Includes\SRL-6/logs/SRL log (05-10-13 at 02.48.18 PM).txt] has not been freed in the script, freeing it now.

Justin

2013-10-05 20:38:57

From: thx4thescript
thanks olly that got the client loading but now after I configured all my settings on RS it wont log me in
------ Entering username...
Exception in Script: Runtime error: "You passed a wrong xe to a finder function: 960. The client has a width of 960, thus the xe is out of bounds." at line 145, column 23 in file "C:\Simba\Includes\SRL-6\lib\utilities\wrappers.simba"
The following bitmaps were not freed: [0, SMART Debug Image]
File[C:\Simba\Includes\SRL-6/logs/SRL log (05-10-13 at 02.48.18 PM).txt] has not been freed in the script, freeing it now.


Please make sure you read this thread: http://villavu.com/forum/showthread.php?t=106161

Dead_Photos

2013-10-06 00:56:48


-- WARNING: TRSGameTabs.areAnyOpen(): No gametabs are open
-- WARNING: tabBackpack.isOpen(): Tab is not open
-- WARNING: TRSGameTabs.areAnyOpen(): No gametabs are open
It just spams this in the debug while constantly opening and closing my inventory :s

Justin

2013-10-06 01:33:03

From: Dead_Photos

-- WARNING: TRSGameTabs.areAnyOpen(): No gametabs are open
-- WARNING: tabBackpack.isOpen(): Tab is not open
-- WARNING: TRSGameTabs.areAnyOpen(): No gametabs are open
It just spams this in the debug while constantly opening and closing my inventory :s


Can you post a screenshot of your game client please?

rtyrty100

2013-10-06 03:40:23

Thanks so much for releasing an SRL6 script. Really needed a practical example of it in order to continue developing my own.

 fastClick(MOUSE_RIGHT);       
chooseOption.select(['All']);

Me likey this syntax. Compact and so useful.

Justin

2013-10-06 04:01:31

From: rtyrty100
Thanks so much for releasing an SRL6 script. Really needed a practical example of it in order to continue developing my own.

 fastClick(MOUSE_RIGHT);       
chooseOption.select(['All']);

Me likey this syntax. Compact and so useful.


No worries :) Hope I've helped you

Dead_Photos

2013-10-06 09:37:57


Screen setup


-- TRSGameTabs.openTab(24)
---- Opening tab via gametab navigation bar
-- TRSGameTabs.openTab(24): False

Justin

2013-10-06 10:03:45

From: Dead_Photos

Screen setup


-- TRSGameTabs.openTab(24)
---- Opening tab via gametab navigation bar
-- TRSGameTabs.openTab(24): False


Please make sure you have the correct brightness and game settings.

devilskin9

2013-10-06 12:18:05

Exception in Script: Unknown declaration "quickDeposit" at line 243, column 19
how do I fix it?

Wu-Tang Clan

2013-10-06 13:29:35

From: devilskin9
Exception in Script: Unknown declaration "quickDeposit" at line 243, column 19
how do I fix it?


update your SIMBA
go to the SRL on your toolbar in simba and update

Olly

2013-10-06 13:33:11

:s is the auto updater not working or something?

Justin

2013-10-06 15:01:50

Not sure Olly, I got my SRL-6 manually

Olly

2013-10-06 15:08:14

From: Justin
Not sure Olly, I got my SRL-6 manually


I just pushed a commit to fix findObject(), I don't think you use it so can you see how long (if ever) it takes for your srl to update? (make sure you actually have auto updating on..).

Justin

2013-10-06 16:49:23

From: Olly
I just pushed a commit to fix findObject(), I don't think you use it so can you see how long (if ever) it takes for your srl to update? (make sure you actually have auto updating on..).


My issue is settings.xml isn't saving/reading so my SRL Local Version is always 1

SRL Updater: Local Version - "1"  |  Remote Version = "576"

E: I just went to SRL -> Update, checked gametab.simba and I didn't have the
print('Freeing gametabs bitmaps..');
line (232) as you added it in this commit https://github.com/SRL/SRL-6/commit/ef6b6d9374454a13bc386ce1e1ee6b90580f956d

Godless

2013-10-07 05:22:36

From: Justin
Thanks guys. I plan on releasing more scripts for RS3, just unsure what to make.


Cooker/Firemaker. :P


Get this when I try to start the script… Exception in Script: Duplicate declaration "procedure((False=0, True=1))" at line 274, column 51 in file "C:\Simba\Includes\srl-6\lib\misc\smart.simba"

Nubzor

2013-10-07 12:43:54

Thanks for this script, fixed the constantly opening inventory by opening multiple tabs like prayer and stats, not just the backpack. Divination script would be very welcome :)

Edit: Also a magic log support would be sweet!

Godless

2013-10-08 01:26:52

Anyone got any suggestions for my issue? :(
I'm not an idiot but I am still getting used to the way Simba works. :P

Justin

2013-10-08 02:09:53

From: Desirousphere
Anyone got any suggestions for my issue? :(
I'm not an idiot but I am still getting used to the way Simba works. :P


Give this thread a read please: http://villavu.com/forum/showthread.php?t=47714

slayr288

2013-10-09 19:42:28

@Justin
Love the script, works perfect for my needs.
I just added a proggy and removed the mouse click of the maple shieldbow (u) icon before it clicks the blue 'Fletch' button, other than that it seems to be perfect.
If you were wondering, your script averages ~1700 logs p/h and ~100k xp p/h with maples which is also ~100k gp p/h.

And a request:
Would it be possible to make a firemaking script? (Bonfire)

Justin

2013-10-09 20:25:17

From: slayr288
@Justin
Love the script, works perfect for my needs.
I just added a proggy and removed the mouse click of the maple shieldbow (u) icon before it clicks the blue 'Fletch' button, other than that it seems to be perfect.
If you were wondering, your script averages ~1700 logs p/h and ~100k xp p/h with maples which is also ~100k gp p/h.

And a request:
Would it be possible to make a firemaking script? (Bonfire)


It should only click that once if it isn't selected. I'll remove that 'feature'.

Thanks for the progress report :)

purerange86

2013-10-09 22:07:29

Hmm, I just got back after this whole RS3 and SRL6 stuff happened; it doesn't seem to detect when RS has loaded. This is probably not a script problem but could I get a little help with this?

slayr288

2013-10-10 00:36:32

Here's an edited version of your script that adds a paint proggy and changes the mouse movements to more human-like. Tell me what you think, just getting into scripting.

program SWFletcher;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

var
resetup = true;
x, y, amountCut: integer;

procedure declarePlayers();
begin
players.setup([''], '');
currentPlayer := 0;
end;

function waitForInterface: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(2070783, 465, 279, 497, 293) = 54) or (countColor(10987173, 352, 159, 385, 181) = 3) or (getSystemTime() >= t));
result := (countColor(2070783, 465, 279, 497, 293) = 54) or (countColor(10987173, 352, 159, 385, 181) = 3);
end;

procedure mMouse(XX: integer; YY: integer; XXX: integer; YYY: integer);
var
point: TPoint;
begin
point.create(randomRange(XX, XXX), randomRange(YY, YYY));
mouse(point, MOUSE_LEFT, MOUSE_HUMAN);
end

function waitForCraftInterface: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(10987173, 352, 159, 385, 181) = 3) or (getSystemTime() >= t));
result := (countColor(10987173, 352, 159, 385, 181) = 3);
end;

function waitForUnlock: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(13553357, IntToBox(866, 275, 933, 297)) <> 4) or (getSystemTime() >= t));
result := (countColor(13553357, IntToBox(866, 275, 933, 297)) <> 4);
sleep(300 + random(300));
end;

function getInterface: string;
begin
if countColor(2070783, 465, 279, 497, 293) = 54 then
result := 'knife';
if countColor(10987173, 352, 159, 385, 181) = 3 then
result := 'craft';
end;

function findBankChest(hover: boolean): boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := getToleranceSpeed();
setColorToleranceSpeed(2);
settolerancespeed2modifiers(0.43, 0.36);
if not (FindColorsTolerance(arP, 1449251, mainscreen.getBounds(), 5)) then
begin
setColorToleranceSpeed(tmpCTS);
settolerancespeed2modifiers(0.2, 0.2);
if (bankScreen.isOpen()) then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 0.66) and (X <= 2.23) and (Y >= 0.67) and (Y <= 2.26) and (Z >= 0.50) and (Z <= 1.56) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(423, 248));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then
Continue;
P := MiddleTPA(ararP[i]);
smartImage.drawBox(IntToBox(P.x, P.y, P.x + 35, P.y + 35), false, clLime);
Mouse(Point(P.x + random(35), P.y + random(35)), mouse_Move, MOUSE_HUMAN);
smartImage.clearArea(IntToBox(P.x, P.y, P.x + 35, P.y + 35));
Wait(100 + Random(100));
if (isMouseOverText(['Bank'], 1000)) then
begin
Result := True;
if not hover then
fastClick(mouse_Left);
Break;
end;
end;
setColorToleranceSpeed(tmpCTS);
settolerancespeed2modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
if (bankScreen.isOpen()) then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
Exit;
end;
end;

procedure randomGameTabCommon();
var
allTabs, commonTabs, t: Integer;
TIA: TIntegerArray;
begin
if not (isLoggedIn()) then
exit();

t := gameTabs.getActiveTab();
TIA := [TAB_STATS, TAB_BACKPACK, TAB_EQUIPMENT, TAB_FRIENDS, TAB_MAGIC];

repeat
commonTabs := TIA[random(length(TIA))];
until(commonTabs <> t);

gameTabs.openTab(commonTabs);

wait(randomRange(300, 600));

gameTabs.openTab(t);
end

procedure Proggy;
var
T1, T2, T3: Integer;
XPPerHour, XPGain, TimeGone, LogsPerHour: Extended
begin
ClearDebug;
TimeGone := (GetTimeRunning/1000);
XPGain := 58.3 * amountCut;
XPPerhour := (3600*(XPGain))/((TimeGone));
LogsPerHour := (3600*(amountCut))/((TimeGone));
ConvertTime(GetTimeRunning, T1, T2, T3);
begin
smartImage.clear();
smartImage.DrawText('///*Justins Fletcher*\\\', Point(577, 440), upchars, false, clRed);
smartImage.DrawText('Time Ran: ' + IntToStr(T1) + ':' + IntToStr(T2) + ':' + IntToStr(T3), Point(577, 450), upchars, false, clRed);
smartImage.DrawText('Logs cut: ' + IntToStr(amountCut), Point(577, 460), upchars, false, clRed);
smartImage.DrawText('Logs cut p/h: ' + IntToStr(Round(LogsPerHour)), Point(577, 470), upchars, false, clRed);
smartImage.DrawText('XP Gained: ' + IntToStr(Round(XPGain)), Point(577, 480), upchars, false, clRed);
smartImage.DrawText('XP p/h: ' + IntToStr(Round(XPPerhour)), Point(577, 490), upchars, false, clRed);
end;
end;

procedure mainLoop()
var
p: TPointArray;
b: TBox;
t, a: integer;
k: boolean;
begin
if resetup then
begin
MouseBox(mainscreen.getBounds(), mouse_move);
getMousePos(x, y);
if (countColor(1613523, IntToBox(945, 591, 959, 610)) = 9) then
typeSend('l', false);
mouseScroll(Point(x, y), randomRange(20, 55), false);
typeByteWait(vk_up, 800 + random(200));
resetup := false;
end;
repeat
if not IsLoggedIn then
begin
players[currentPlayer].login();
sleep(3000 + random(1400));
resetup := true;
exit;
end;
if (tabBackpack.count() = 28) then
begin
if(bankScreen.isOpen()) then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
tabBackpack.mouseSlot(1, MOUSE_MOVE);
if (isMouseOverText(['logs'], 1000)) then
begin
fastClick(mouse_Left);
if waitForInterface then
if getInterface = 'knife' then
begin
mMouse(460, 309, 503, 354);
waitForCraftInterface;
end;
if getInterface = 'craft' then
begin
if (countColor(1356525, IntToBox(343, 229, 383, 269)) <> 154) then
mMouse(482, 454, 702, 477);
sleep(randomRange(100, 225));
t := getSystemTime() + 51000;
k := false;
a := randomRange(24, 27);
repeat
wait(100 + random(350));
Proggy;
case random(1000) of
0:
begin
smartImage.drawBox(tabStats.getSkillBox(SKILL_FLETCHING), false, clLime);
MouseBox(tabStats.getSkillBox(SKILL_FLETCHING), mouse_Move);
smartImage.clearArea(tabStats.getSkillBox(SKILL_FLETCHING));
end;
14: tabBackpack.open();
60: randomRClickItem();
90: sleepAndMoveMouse(1000 + random(2000));
150: pickUpMouse();
180: mouseOffClient(4);
220: smallRandomMouse();
280: randomCameraAngle(MS_ANGLE_HIGH);
350: randomCompass(10, 30, true);
400: randomGameTabCommon();
end;
if (countColor(131072, tabBackPack.getSlotBox(a)) = 75) then
begin
if not k then
findBankChest(true);
k := true;
end;
until (countColor(131072, tabBackPack.getSlotBox(28)) = 75) or (getSystemTime() >= t);
sleep(600 + random(200));
amountCut := amountCut + 28;
end;
end;
end;
if findBankChest(false) then
begin
if (BankScreen.isOpen(5000)) then
begin
sleep(randomRange(100, 225));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
sleep(randomRange(100, 225));
MouseBox(IntToBox(521, 120, 542, 136), mouse_move);
if (isMouseOverText(['logs'], 1000)) then
begin
fastClick(MOUSE_RIGHT);
sleep(randomRange(100, 225));
chooseOption.select(['All']);
sleep(randomRange(100, 225));
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
if bankScreen.isOpen() then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
tabBackpack.mouseSlot(1, MOUSE_MOVE);
waitForUnlock;
end else
begin
players[currentPlayer].isActive = false;
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
players[currentPlayer].logout();
FreeBitMap(0);
TerminateScript();
end;
end else
begin
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
end;
end;
if resetup then
exit;
until not (IsLoggedIn);
mainLoop();
end;

begin
declarePlayers();
smartEnableDrawing := true;
SetupSRL;
MouseSpeed := randomRange(19, 25);
players[currentPlayer].login();
Proggy;
mainLoop();
end.

Example proggy:

Justin

2013-10-10 02:15:27

From: slayr288
Here's an edited version of your script that adds a paint proggy and changes the mouse movements to more human-like. Tell me what you think, just getting into scripting.

program SWFletcher;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}

var
resetup = true;
x, y, amountCut: integer;

procedure declarePlayers();
begin
players.setup([''], '');
currentPlayer := 0;
end;

function waitForInterface: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(2070783, 465, 279, 497, 293) = 54) or (countColor(10987173, 352, 159, 385, 181) = 3) or (getSystemTime() >= t));
result := (countColor(2070783, 465, 279, 497, 293) = 54) or (countColor(10987173, 352, 159, 385, 181) = 3);
end;

procedure mMouse(XX: integer; YY: integer; XXX: integer; YYY: integer);
var
point: TPoint;
begin
point.create(randomRange(XX, XXX), randomRange(YY, YYY));
mouse(point, MOUSE_LEFT, MOUSE_HUMAN);
end

function waitForCraftInterface: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(10987173, 352, 159, 385, 181) = 3) or (getSystemTime() >= t));
result := (countColor(10987173, 352, 159, 385, 181) = 3);
end;

function waitForUnlock: Boolean;
var
p: TPoint;
t: Integer;
begin
t := getSystemTime() + 5000;
repeat
wait(100);
until ((countColor(13553357, IntToBox(866, 275, 933, 297)) <> 4) or (getSystemTime() >= t));
result := (countColor(13553357, IntToBox(866, 275, 933, 297)) <> 4);
sleep(300 + random(300));
end;

function getInterface: string;
begin
if countColor(2070783, 465, 279, 497, 293) = 54 then
result := 'knife';
if countColor(10987173, 352, 159, 385, 181) = 3 then
result := 'craft';
end;

function findBankChest(hover: boolean): boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := getToleranceSpeed();
setColorToleranceSpeed(2);
settolerancespeed2modifiers(0.43, 0.36);
if not (FindColorsTolerance(arP, 1449251, mainscreen.getBounds(), 5)) then
begin
setColorToleranceSpeed(tmpCTS);
settolerancespeed2modifiers(0.2, 0.2);
if (bankScreen.isOpen()) then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 0.66) and (X <= 2.23) and (Y >= 0.67) and (Y <= 2.26) and (Z >= 0.50) and (Z <= 1.56) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(423, 248));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then
Continue;
P := MiddleTPA(ararP[i]);
smartImage.drawBox(IntToBox(P.x, P.y, P.x + 35, P.y + 35), false, clLime);
Mouse(Point(P.x + random(35), P.y + random(35)), mouse_Move, MOUSE_HUMAN);
smartImage.clearArea(IntToBox(P.x, P.y, P.x + 35, P.y + 35));
Wait(100 + Random(100));
if (isMouseOverText(['Bank'], 1000)) then
begin
Result := True;
if not hover then
fastClick(mouse_Left);
Break;
end;
end;
setColorToleranceSpeed(tmpCTS);
settolerancespeed2modifiers(0.2, 0.2);
if (i = arL + 1) then
begin
if (bankScreen.isOpen()) then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
Exit;
end;
end;

procedure randomGameTabCommon();
var
allTabs, commonTabs, t: Integer;
TIA: TIntegerArray;
begin
if not (isLoggedIn()) then
exit();

t := gameTabs.getActiveTab();
TIA := [TAB_STATS, TAB_BACKPACK, TAB_EQUIPMENT, TAB_FRIENDS, TAB_MAGIC];

repeat
commonTabs := TIA[random(length(TIA))];
until(commonTabs <> t);

gameTabs.openTab(commonTabs);

wait(randomRange(300, 600));

gameTabs.openTab(t);
end

procedure Proggy;
var
T1, T2, T3: Integer;
OriginalXP, XPPerHour, XPGain, TimeGone, LogsPerHour: Extended
begin
ClearDebug;
TimeGone := (GetTimeRunning/1000);
XPGain := 58.3 * amountCut;
XPPerhour := (3600*(XPGain))/((TimeGone));
LogsPerHour := (3600*(amountCut))/((TimeGone));
ConvertTime(GetTimeRunning, T1, T2, T3);
begin
smartImage.clear();
smartImage.DrawText('///*Justins Fletcher*\\\', Point(577, 440), upchars, false, clRed);
smartImage.DrawText('Time Ran: ' + IntToStr(T1) + ':' + IntToStr(T2) + ':' + IntToStr(T3), Point(577, 450), upchars, false, clRed);
smartImage.DrawText('Logs cut: ' + IntToStr(amountCut), Point(577, 460), upchars, false, clRed);
smartImage.DrawText('Logs cut p/h: ' + IntToStr(Round(LogsPerHour)), Point(577, 470), upchars, false, clRed);
smartImage.DrawText('XP Gained: ' + IntToStr(Round(XPGain)), Point(577, 480), upchars, false, clRed);
smartImage.DrawText('XP p/h: ' + IntToStr(Round(XPPerhour)), Point(577, 490), upchars, false, clRed);
end;
end;

procedure mainLoop()
var
p: TPointArray;
b: TBox;
t, a: integer;
k: boolean;
begin
if resetup then
begin
MouseBox(mainscreen.getBounds(), mouse_move);
getMousePos(x, y);
if (countColor(1613523, IntToBox(945, 591, 959, 610)) = 9) then
typeSend('l', false);
mouseScroll(Point(x, y), randomRange(20, 55), false);
typeByteWait(vk_up, 800 + random(200));
resetup := false;
end;
repeat
if not IsLoggedIn then
begin
players[currentPlayer].login();
sleep(3000 + random(1400));
resetup := true;
exit;
end;
if (tabBackpack.count() = 28) then
begin
if(bankScreen.isOpen()) then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
tabBackpack.mouseSlot(1, MOUSE_MOVE);
if (isMouseOverText(['logs'], 1000)) then
begin
fastClick(mouse_Left);
if waitForInterface then
if getInterface = 'knife' then
begin
mMouse(460, 309, 503, 354);
waitForCraftInterface;
end;
if getInterface = 'craft' then
begin
if (countColor(1356525, IntToBox(343, 229, 383, 269)) <> 154) then
mMouse(482, 454, 702, 477);
sleep(randomRange(100, 225));
t := getSystemTime() + 51000;
k := false;
a := randomRange(24, 27);
repeat
wait(100 + random(350));
Proggy;
case random(1000) of
0:
begin
smartImage.drawBox(tabStats.getSkillBox(SKILL_FLETCHING), false, clLime);
MouseBox(tabStats.getSkillBox(SKILL_FLETCHING), mouse_Move);
smartImage.clearArea(tabStats.getSkillBox(SKILL_FLETCHING));
end;
14: tabBackpack.open();
60: randomRClickItem();
90: sleepAndMoveMouse(1000 + random(2000));
150: pickUpMouse();
180: mouseOffClient(4);
220: smallRandomMouse();
280: randomCameraAngle(MS_ANGLE_HIGH);
350: randomCompass(10, 30, true);
400: randomGameTabCommon();
end;
if (countColor(131072, tabBackPack.getSlotBox(a)) = 75) then
begin
if not k then
findBankChest(true);
k := true;
end;
until (countColor(131072, tabBackPack.getSlotBox(28)) = 75) or (getSystemTime() >= t);
sleep(600 + random(200));
amountCut := amountCut + 28;
end;
end;
end;
if findBankChest(false) then
begin
if (BankScreen.isOpen(5000)) then
begin
sleep(randomRange(100, 225));
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
sleep(randomRange(100, 225));
MouseBox(IntToBox(521, 120, 542, 136), mouse_move);
if (isMouseOverText(['logs'], 1000)) then
begin
fastClick(MOUSE_RIGHT);
sleep(randomRange(100, 225));
chooseOption.select(['All']);
sleep(randomRange(100, 225));
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
if bankScreen.isOpen() then
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
tabBackpack.mouseSlot(1, MOUSE_MOVE);
waitForUnlock;
end else
begin
players[currentPlayer].isActive = false;
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
players[currentPlayer].logout();
FreeBitMap(0);
TerminateScript();
end;
end else
begin
mMouse(600, 35, 613, 48);
sleep(randomRange(100, 225));
end;
end;
if resetup then
exit;
until not (IsLoggedIn);
mainLoop();
end;

begin
declarePlayers();
smartEnableDrawing := true;
SetupSRL;
MouseSpeed := randomRange(19, 25);
players[currentPlayer].login();
Proggy;
mainLoop();
end.

Example proggy:


procedure mouse(pnt: TPoint; button: integer; mmType: integer = MOUSE_HUMAN); overload;

From my understanding, the default mouse procedure will use MOUSE_HUMAN.

Nice work with the progress report, Do you mind if I add it into the live script? (Credits will be given given of course)

Justin.

slayr288

2013-10-10 06:38:39

Yeh sure, go ahead. And I didn't know mouse_human was default :P, was just being safe. Oh well.

Justin

2013-10-10 06:40:17

From: slayr288
Yeh sure, go ahead. And I didn't know mouse_human was default :P, was just being safe. Oh well.


Cheers mate. No stress, you learn something new everyday :)

Justin

2013-10-11 23:38:18

Updated version, fixed a few bugs and added Progress Report (Thanks @slayr288;!)

Nubzor

2013-10-12 05:37:07

Sweet update and sweet progress report aswell, prepare for a long proggy :)

Justin

2013-10-12 05:41:42

From: Nubzor
Sweet update and sweet progress report aswell, prepare for a long proggy :)


Goodluck with the long progress report. SRL-6 always bugs out when it reloads for the 6 hour session :(

Olly

2013-10-12 06:17:01

From: Justin
Goodluck with the long progress report. SRL-6 always bugs out when it reloads for the 6 hour session :(


still?!?!

Justin

2013-10-12 06:23:31

From: Olly
still?!?!



-------- Saving screenshot: IP_address.png
------ Found lobby screen
---- TPlayer.loginToLobby(): True
------ minimap.__createMask(): Creating the bitmap mask
Exception in Script: Runtime error: "Out of memory" at line 370, column 35 in file "C:\Simba\Includes\SRL-6\lib\interfaces\minimap.simba"
The following bitmaps were not freed: [0, SMART Debug Image]

As of 1 minute ago. I've been forcing the session expire reload.

slayr288

2013-10-13 09:24:46

Here's a 6 hour proggy since it glitched on 6 hours.

Olly

2013-10-13 10:10:16

From: slayr288
Here's a 6 hour proggy since it glitched on 6 hours.


what was the error?

purerange86

2013-10-13 14:32:03

I know I'm being stupid, this looks great and it's a great help as a reference when I'm building scripts. How do I get new fonts v15?

Justin

2013-10-13 16:34:26

From: purerange86
I know I'm being stupid, this looks great and it's a great help as a reference when I'm building scripts. How do I get new fonts v15?


Simba will automatically download and 'install' them for you.

purerange86

2013-10-13 21:54:38

From: Justin
Simba will automatically download and 'install' them for you.


Ah, it has not done so for me, should I have some option selected?

Nubzor

2013-10-14 02:44:35


:)

footballjds

2013-10-15 15:23:02

Thanks Justin, I'm going to look over this to get up to speed with SRL-6.

kudos

l6bustank

2013-10-17 10:25:06

any bans? im planning to start scripting again sometime this month.

slayr288

2013-10-17 17:28:55

From: l6bustank
any bans? im planning to start scripting again sometime this month.


I've done 71-80 fm, 71-93 fletching, 87-90 wc, and 66-76 crafting with no bans yet.

l6bustank

2013-10-17 17:34:42

From: slayr288
I've done 71-80 fm, 71-93 fletching, 87-90 wc, and 66-76 crafting with no bans yet.

with simba only?

E: and what routines or principles have you followed? (OpenGL/safemode, breaks, total time botted/day etc. )

Ian

2013-10-17 17:35:19

From: l6bustank
any bans? im planning to start scripting again sometime this month.


I've done 1->75 smithing without a ban but I wasn't botting 24 hours straight or anything.

E: That's since the NIS, not since SRL6.

l6bustank

2013-10-17 17:38:20

From: BMWxi
I've done 1->75 smithing without a ban but I wasn't botting 24 hours straight or anything.

E: That's since the NIS, not since SRL6.


cool, how busy have you been with antiban in your scripts?

slayr288

2013-10-17 17:57:11

From: l6bustank
with simba only?

E: and what routines or principles have you followed? (OpenGL/safemode, breaks, total time botted/day etc. )


Yes, simba only.
SRL-6 only.
Private scripts.
Max 18 hours a day, not straight 18 hours though.

Ian

2013-10-17 18:02:17

From: l6bustank
cool, how busy have you been with antiban in your scripts?


I actually haven't put in any antiban activities yet. It just smelts. I guess you could say I've just been hiding in plain sight. ;)

Also sorry for being offtopic Justin

slayr288

2013-10-17 18:07:14

From: BMWxi
I actually haven't put in any antiban activities yet. It just smelts. I guess you could say I've just been hiding in plain sight. ;)

Also sorry for being offtopic Justin


Hiding in plain site with the classic bot character style xD.
And yeh, we are getting a bit off-topic.

Justin

2013-10-18 02:55:08

I'm currently sitting on ~20m fletching exp from this script on 1 account and level 94 on another account, no bans, almost 24/7 (When SRL-6 isMouseOverText() doesn't crash it :P)

l6bustank

2013-10-18 06:43:00

From: Justin
I'm currently sitting on ~20m fletching exp from this script on 1 account and level 94 on another account, no bans, almost 24/7 (When SRL-6 isMouseOverText() doesn't crash it :P)


nice, man! keep up the good work!

footballjds

2013-10-18 10:31:14

From: Justin
I'm currently sitting on ~20m fletching exp from this script on 1 account and level 94 on another account, no bans, almost 24/7 (When SRL-6 isMouseOverText() doesn't crash it :P)


i can't get it to do anything and I don't think of myself as an idiot.

Perhaps you'd have some knowledge to share?

slayr288

2013-10-18 15:12:38

From: footballjds
i can't get it to do anything and I don't think of myself as an idiot.

Perhaps you'd have some knowledge to share?


I had an issue where the xp bar was overlapping the minimap not causing it to work, maybe that's your issue?

footballjds

2013-10-21 10:38:58

From: slayr288
I had an issue where the xp bar was overlapping the minimap not causing it to work, maybe that's your issue?


my xp bar isn't displayed.

Ian

2013-10-21 12:02:01

From: footballjds
my xp bar isn't displayed.


You can toggle whether it's displayed in the interface settings

footballjds

2013-10-21 13:50:57

From: BMWxi
You can toggle whether it's displayed in the interface settings


does it need to be displayed?

Ian

2013-10-21 14:30:25

From: footballjds
does it need to be displayed?


I haven't used the script, but Justin might use it to get information for the proggy. If not then I don't think it needs to be displayed. Make your all your settings are correct like brightness, resolution, OpenGL, interface placement, ect.

footballjds

2013-10-21 14:48:28

From: BMWxi
I haven't used the script, but Justin might use it to get information for the proggy. If not then I don't think it needs to be displayed. Make your all your settings are correct like brightness, resolution, OpenGL, interface placement, ect.


i did all this. i think things are buggy with simba/smart/(incomplete)SRL…

Olly

2013-10-21 14:56:07

From: footballjds
i did all this. i think things are buggy with simba/smart/(incomplete)SRL…


So what exactly happens..?

footballjds

2013-10-21 15:13:12

From: Olly
So what exactly happens..?


a lot of nothing.

If you could teamviewer if you wanted, let me know.

Justin

2013-10-21 16:55:05

You can hide the XP Bar, I don't read/use it at all.

Olly

2013-10-21 16:57:42

From: footballjds
a lot of nothing.

If you could teamviewer if you wanted, let me know.


Lol, you can do better than that bro.. Im guessing smart loads.. then what happens in the debug box?

footballjds

2013-10-22 12:07:32

From: Olly
Lol, you can do better than that bro.. Im guessing smart loads.. then what happens in the debug box?


it doesn't seem like the script knows i'm logged in. it has issues logging in properly. it doesn't do anything when standing there.

Sorry, i'm like tired and out of touch.

I'll try to get it going again and report back with something substantial…

Justin

2013-10-22 16:40:38

Script will no longer work as RS Updated fonts - http://villavu.com/forum/issue.php?do=gotonote&issuenoteid=591 . You will need to wait for a SRL-6 update.

stickyninja

2013-11-04 20:01:59

Does anyone know when fonts will be updated?

Moneymake

2013-11-07 14:23:55

Is this script still out of date?

Olly

2013-11-07 15:11:03

It should actually work again. :)

The Killer

2013-11-07 15:15:18

From: Olly
It should actually work again. :)


but unfortunately it uses srl6 so it won't ;)

footballjds

2013-11-07 15:36:48

From: The Killer
but unfortunately it uses srl6 so it won't ;)


olly fixed srl-6?

Justin

2013-11-07 15:41:59

I'll revise this when I get home from work today :)

The Killer

2013-11-07 15:44:36

From: footballjds
olly fixed srl-6?


It was a joke :/

ajg01991

2013-11-15 05:28:04

just tried using this script set everything up as stated it logs me in then just stay at the next interface where u select play know or world select (lobby u think it is)

is this script currently fuctional wanted to edit this to make headless arrows and get a small insight in how srl 6 works good job by the way

stickyninja

2013-12-14 13:45:03

Is this script going to be updated?

Justin

2013-12-21 07:04:56

Moved to out-dated. Accounts have ran out of membership.