PDA

View Full Version : [Crafting] [SRL][OSRS] Falador Flax Spinner



StickToTheScript
03-22-2018, 12:56 AM
Falador Flax Spinner
By StickToTheScript
Version 1.1

About The Script:
A fairly simple flax spinner that banks at Falador east bank and spins the flax at the spinning wheel in south Falador.
This script uses the SRL (https://github.com/SRL/SRL/) & RSWalker (https://github.com/slackydev/RSWalker/releases) includes.

Features:
- Accurate object finding using a combination of RSWalker and the SRL includes.
- Antiban (Feel free to customize to your own liking).
- Multiple breaks to allow the script to be run for days.

Requirements:
- The most recent version of the SRL Include (https://github.com/SRL/SRL/)
- The most recent version of the RSWalker Include (https://github.com/slackydev/RSWalker/releases)
- Simba 1.2 (https://github.com/slackydev/Simba/releases/tag/Simba-1.2.0-rc6_fixes) or Higher (https://github.com/Olly-/Simba/releases/tag/Simba-1.3)
- Make sure to have the 'Falador.png' downloaded from the bottom of this thread and place it in 'C:\Simba\Includes\RSWalker\maps'.

Setup:
- Download the script from the bottom of the thread.
- Be sure to have the 'Falador.png' downloaded and placed in 'C:\Simba\Includes\RSWalker\maps'.
- Fill out the player info in the script.
- Make sure to set the brightness to maximum and be zoomed all of the way out.
- Make sure to locate yourself somewhere between the Falador spinning wheel and the Falador east bank.
- Have Flax in the right corner of the bank (Slot 7).
- Start the script.

Changelog:
- V1.0: Initial Release
- V1.1: Added ability to find flax in any visible location in the bank via DTMs.

Extra Information:
- I understand this is also a 'Money Making' script, but since I made it to get crafting levels, I decided to place it here.
- Please use at your own risk. Spinning flax has a fairly high ban rate.
- If you happen to have any questions, comments, or the bot happens to become outdated, please post here.

You can find the needed files on the GitHub page (https://github.com/StickToTheScript/FaladorFlaxSpinner), or you can download them below.

Dan the man
03-22-2018, 01:14 AM
Looks good mate. Very clean.

Would it be worth changing the slot banking to actively find the DTM?
Flax is fairly unique and you have already created a DTM for inventory use.
Could also enable tab banking with this as well if the user didn't want to rearrange their bank.

Nice work :)

StickToTheScript
03-22-2018, 01:27 AM
Looks good mate. Very clean.

Would it be worth changing the slot banking to actively find the DTM?
Flax is fairly unique and you have already created a DTM for inventory use.
Could also enable tab banking with this as well if the user didn't want to rearrange their bank.

Nice work :)

Ha ha. Thanks!

Those ideas were my initial thoughts, but I had used this to attempt to get the feeling for the include and to see what was all built in and how well it all worked. I'll happily add those to the next version.

slacky
03-22-2018, 07:59 AM
Looks nice. Nice to see my work helped you.

justforfun
03-22-2018, 08:42 AM
Nice work man.

How do you find the map for falador, without all the symbols? I need maps for dwarven mines, which is underground and cant seem to find one with adequate pixels and without symbols.

slacky
03-22-2018, 08:54 AM
Nice work man.

How do you find the map for falador, without all the symbols? I need maps for dwarven mines, which is underground and cant seem to find one with adequate pixels and without symbols.
underground.png (https://github.com/slackydev/RSWalker/blob/master/maps/underground.png) is included in RSWalker, which contains the dwarven mine.
In the map folder you can also find a script, MapGrabber.simba (https://github.com/slackydev/RSWalker/blob/master/maps/MapGrabber.simba), which you can run to grab 410x410 clean map pieces, which you can then combine into a larger map using what ever image editor you have.

Tho, just to be clear symbols themself are probably not an issue, in fact at times they can help.

justforfun
03-22-2018, 09:53 AM
underground.png (https://github.com/slackydev/RSWalker/blob/master/maps/underground.png) is included in RSWalker, which contains the dwarven mine.
In the map folder you can also find a script, MapGrabber.simba (https://github.com/slackydev/RSWalker/blob/master/maps/MapGrabber.simba), which you can run to grab 410x410 clean map pieces, which you can then combine into a larger map using what ever image editor you have.

Tho, just to be clear symbols themself are probably not an issue, in fact at times they can help.

Nice, The script im talknig about is your miner. I used it in mining guild extension and it breaks because the map saved by config is not of the dwarven mines. i have tried it again and again but still doesnt work. So i will save the config and manually update the map to that of dwarven mines.

If you can try to make a config and see if it works for you, will be helpful.

Nixes
04-22-2018, 08:24 AM
I tried this script out. It seemed great, but it gave me error after 15 minutes like this. When I logged in it was near a Spinning wheel. I try again, maybe now works better.
|- Time Running: 15m 44s
|- Strings Made: 195
|- XP Gained: 2925
|- Strings/Hour: 743
|- XP/Hour: 11145.1
|- Time Since Break : 15m 42s
Terminating script: Could not find bank.
Successfully executed.

StickToTheScript
04-22-2018, 09:03 AM
I tried this script out. It seemed great, but it gave me error after 15 minutes like this. When I logged in it was near a Spinning wheel. I try again, maybe now works better.
|- Time Running: 15m 44s
|- Strings Made: 195
|- XP Gained: 2925
|- Strings/Hour: 743
|- XP/Hour: 11145.1
|- Time Since Break : 15m 42s
Terminating script: Could not find bank.
Successfully executed.

Interesting. It could be that I didn't have my failsafe for checking its location built into that script. I might push that update.

Anyways, let me know how it goes. I'd recommend observing it for a while and see if it happens again. I was able to get my initial version running for almost a full day and it only stopped because I forced it, so I cannot say I have come across this problem.

Nixes
04-22-2018, 09:16 AM
Interesting. It could be that I didn't have my failsafe for checking its location built into that script. I might push that update.

Anyways, let me know how it goes. I'd recommend observing it for a while and see if it happens again. I was able to get my initial version running for almost a full day and it only stopped because I forced it, so I cannot say I have come across this problem.

I tried running the script once more and it ran for over 45 minutes. I then ran out of flax to spin. So it seemed to be working flawlessly this time around.

slacky
04-22-2018, 09:30 AM
Interesting. It could be that I didn't have my failsafe for checking its location built into that script. I might push that update.

Anyways, let me know how it goes. I'd recommend observing it for a while and see if it happens again. I was able to get my initial version running for almost a full day and it only stopped because I forced it, so I cannot say I have come across this problem.
A trick I at times use is to throw a small loop around the walking like so:

function TRSWalker.WalkPath2(Path: TPointArray; Tries:Int32=3): Boolean;
begin
for 1 to Tries do
if Self.WalkPath(Path) then
Exit(True)
else
Wait(600,900);
end;


Now it can be used like:

if not Walk.WalkPath2(pBank) then
TerminateScript('[pBank] Failed to walk path');


because, it does happen that walking just fails on a rare occation, but it's able to recover if you just wait a little and retry.

Edit: I can probably add this directly to RSWalker

StickToTheScript
04-22-2018, 09:44 AM
A trick I at times use is to throw a small loop around the walking like so:

function TRSWalker.WalkPath2(Path: TPointArray; Tries:Int32=3): Boolean;
begin
for 1 to Tries do
if Self.WalkPath(Path) then
Exit(True)
else
Wait(600,900);
end;


Now it can be used like:

if not Walk.WalkPath2(pBank) then
TerminateScript('[pBank] Failed to walk path');


because, it does happen that walking just fails on a rare occation, but it's able to recover if you just wait a little and retry.

Edit: I can probably add this directly to RSWalker

I wrote this function:


function playerInArea(area : TPointArray): Boolean;
var
myPos: TPoint;
areaBox: TBox;
begin
myPos := Walk.GetMyPos();
areaBox := [area[0].X, area[0].Y, area[1].X, area[1].Y];
if (myPos.InBox(areaBox)) then
begin
writeln('Player is in area!');
Result := True;
end else
Result := False;
end;


which can be simplified to:

function playerInArea(area : TPointArray): Boolean;
var
myPos: TPoint;
areaBox: TBox;
begin
myPos := Walk.GetMyPos();
areaBox := [area[0].X, area[0].Y, area[1].X, area[1].Y];
Result := myPos.InBox(areaBox);
end;


Not the cleanest function (the first one is used for debugging purposes), but you pass it a TPointArray of two coordinates and it will check if it is inside the area. It uses your InBox function, but I just wanted to be able to pass TPAs since I dont need to do any conversions when using the path generators.

I normally use this and a TTimeMarker so that I don't get caught in an infinite loop.


I tried running the script once more and it ran for over 45 minutes. I then ran out of flax to spin. So it seemed to be working flawlessly this time around.

Cool! Good to hear!

bab22
06-08-2019, 08:07 PM
Anyone try this for a longer run recently, considering using this on an alt, but considering the last post was a year ago I'm a little leery

wthomas
06-08-2019, 10:51 PM
It's using up to date includes so should be fine, give it a go :)

ShadowsTM
06-09-2019, 10:07 AM
Anyone try this for a longer run recently, considering using this on an alt, but considering the last post was a year ago I'm a little leery

I gave it a go on a throwaway a few months back and was permed the day after using it, ran for an hour or two so don't use it on an alt you're bothered about