PDA

View Full Version : [Smithing] [SRL] Simple VWest smither



lollol012
07-29-2018, 07:30 PM
A very simple script that starts at the southern side of vWest, and keeps smithing (darts and such, you choose exact point of the item on the smithing screen).

Goes afk once in a while, fully configurable in the main function.

Will output the number of files completed into "SmithRounds.txt" in your scripts folder (in case Simba crashes for some reason).

It's not very close to optimal efficiency, but mainly due to breaks that help avoid a ban.

Example code for smithing Mithril Darts:


WITHDRAW_UPTEXT = 'Mithril'; //Uptext of bars to withdraw
WORLD_TO_LOG_INTO = -1; //World to log back into
BARS_TAB = 0; //Tabs where bars are in the first slot!
SMITHING_POINT_X = 369;
SMITHING_POINT_Y = 88; //Where the item you want to smith is located.
PLAYER_LOGIN = '';
PLAYER_PASS = '';
SMITH_OPTION_TEXT = 'All'; // Will smith "All" darts! This is the text it will
// select once right clicking the point on the Smith Screen.


As usual, Fully Zoomed out and full brightness!

slacky
07-29-2018, 11:52 PM
Thank you for this :-)

Might be interested in taking a look at this little "guide", it's quite a solid solution for just this, if you ever intend to do more work on it:
https://villavu.com/forum/showthread.php?t=118039

KeepBotting
07-30-2018, 03:13 AM
Nice release, rep+

Nice to see some more members writing scripts with SRL :)

lollol012
07-31-2018, 01:29 AM
Thank you for this :-)

Might be interested in taking a look at this little "guide", it's quite a solid solution for just this, if you ever intend to do more work on it:
https://villavu.com/forum/showthread.php?t=118039

No problem. I've already seen that guide, as well as looked at the files, and written some basic extension like distance calculation from current location, and movement detection that's based on your location function rather than pixel shift (which can break if there is a ton of players running near you on screen and in the minimap). Might release them once I've tested them (seen them work well in scripts). Anyhow, I think this specific script uses your walker for the basic movement.



Nice release, rep+

Nice to see some more members writing scripts with SRL :)

Thanks for the rep! I'll release some more of my scripts the moment I finish rewriting them to actually work with the current libraries (some of the scripts are 4 years old).

acow
07-31-2018, 04:39 AM
Congrats on the release.

I had a quick look at the code and noticed two things that I'd done before and have since found improvements for.

You could shorten stuff like this

function MX_Chance(chance, outOf:integer):boolean
begin
if (RandomRange(0,outOf)<chance) then
result:=true
else
result:=false;
end;

By doing something like this

function MX_Chance(chance, outOf:integer):boolean
begin
result := RandomRange(0,outOf) < chance;
end;


I often recommend people consider something like srl's waitfunc, over wait(). Instead of waiting for an amount of time decided by the scripter, you'd be waiting for a function to return something (with a max time to wait for). This in my experience helps make scripts much easier to write, more humanlike ingame, and more stable.

srl.waitfunc https://github.com/SRL/SRL/blob/e89a1a732644a7e57f1c2bac9c23ab7988824ada/shared/time.simba#L83
Example usage https://i.imgur.com/ruP3bVu.png. The srl.waitfunc I used was modified from the original, which is why the parameters are different

JSmooth
05-22-2019, 04:11 PM
Anyhow, I think this specific script uses your walker for the basic movement.


This script doesn't run - it throws errors due to RS Walker. It does compile though.


Error: Exception ('TRSWalker.Init -> Map `world.png` not found') at line 95
Execution failed.


Edit: I should note this isn't an issue on my end...


{$I SRL/OSR.simba}
{$I RSWalker/Walker.simba}
begin
end.

Compiled successfully in 3031 ms.
Successfully executed.