Results 1 to 6 of 6

Thread: [SRL] Simple VWest smither

  1. #1
    Join Date
    Jan 2014
    Posts
    58
    Mentioned
    1 Post(s)
    Quoted
    37 Post(s)

    Default [SRL] Simple VWest smither

    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:
    Code:
     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!
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    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 priv. messages please

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Nice release, rep+

    Nice to see some more members writing scripts with SRL
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  4. #4
    Join Date
    Jan 2014
    Posts
    58
    Mentioned
    1 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    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.


    Quote Originally Posted by KeepBotting View Post
    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).

  5. #5
    Join Date
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

    Default

    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.
    Possible improvements, for your consideration

    You could shorten stuff like this
    Simba Code:
    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
    Simba Code:
    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/e89a...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

  6. #6
    Join Date
    Jul 2014
    Posts
    125
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Quote Originally Posted by lollol012 View Post
    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.

    Simba Code:
    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...

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

    Compiled successfully in 3031 ms.
    Successfully executed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •