Results 1 to 17 of 17

Thread: How to make a perfect script (Planning stage)

  1. #1
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default How to make a perfect script (Planning stage)

    How to make a perfect script (Planning stage of Development)


    Everyone wants to make a perfectly running script, in the minimal amount of time. That will run endless without anything stopping it. But theres always PROBLEMS when you begin making your Mr Perfecto scripts.

    There are many stages of making a script, but the most important one, that we will take a look at today is:
    - Planning


    Planning/Options
    Planning is easily on the most important stage of script development, in this stage you will need to plan out all the steps in which the script will undertake. If you can create a mind map of what you want your script to exactly be doing, without a doubt you will be able to script and create that script with minimal errors, and if you do have errors. You will easily be able to know where the problem lies and can work to fix it from there. If a script is poorly layed out, it takes hours to get it cleaned and fixed up so it all works correctly! so why not just do it right the first time and save yourself the trouble later!

    In this example im aiming to make the script do the following:
    • Check if Glory/Duel Ring is currently wielded
    • Teleport to Karamja
    • Pick bananas off the trees
    • Teleport to Castle Wars via Duel Ring
    • Bank
    • Repeat

    It may sound simple this way, but you need to think further ahead, with all the other little details that need to be payed attention too!






    When creating your script, you have to think beyond what you want your script to achieve, and think of the smaller details of what will you do if this or that function fails? A major part of planning your script includes planning your FAILSAFES! in the picture above, I have minimal failsafes covering my functions. For example teleporting to Karamja, What if the script misclicked the teleport to Karajma button, or it did click but took longer then normal to load the new location? You need to have something built in the script to cover these fails. With failsafes, to be completely safe I advise using a failsafe, within another failsafe in case the failsafe decides its not going to work out, you need something too boot your account off to save it from attempting things multiple times, deeming you as a stupid bot. Bellow I have structured a semi failsafed outline of my script.

    How the script should be displayed on a Mind map:


    Here in this mind map we have a more structured, failsafed mindmap, Its not completely failsafed but it has the just to it to help you understand WHY YOU NEED TO have these systems in place in order to have your script running for a long time!

    So why is Planning so important?
    • It gives you a set of things to work off, so you dont miss things
    • When scripts get large, having a great structure helps eliminate any bugs!
    • Cleaner script, as you know the functions/procedures you need!
    • Fail proofing your script, you can work backwards when your complete, to see if you met the standards of your plan!
    Attached Images Attached Images
    Last edited by BobboHobbo; 07-04-2013 at 09:21 AM.

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    I never thought about drawing a script out on a mindmap like this, neat idea. Usually what I do is do the core of the script, then go though each part and think "If this fails, what do I need to do to make it recover?" It's really important to look through each function to see what could go wrong, how to avoid it, and then what to do if it still goes wrong.

    Anyhow good guide, I'm sure it will be a handy resource for those who are having trouble getting their scripts to run as long as they would like

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Nice guide, though it should be noted that this checking stuff must be done quickly, for the script to be fast

  4. #4
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    I never thought about drawing a script out on a mindmap like this, neat idea. Usually what I do is do the core of the script, then go though each part and think "If this fails, what do I need to do to make it recover?" It's really important to look through each function to see what could go wrong, how to avoid it, and then what to do if it still goes wrong.

    Anyhow good guide, I'm sure it will be a handy resource for those who are having trouble getting their scripts to run as long as they would like
    http://en.wikipedia.org/wiki/Flowchart
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  5. #5
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Nice guide, though it should be noted that this checking stuff must be done quickly, for the script to be fast
    I believe if your going to make a script, mirroring the movements of a human, would be deemed as common sense :P.

  6. #6
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Quote Originally Posted by zmon
    Perfect script? There is no such thing as "perfect", only "better than you expect".


    I'v never drawn a picture before... But I do plan stuff which helps
    Nice tutorial, something different :P

  7. #7
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Love it, nice guide

    Creds to DannyRS for this wonderful sig!

  8. #8
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Very nice...I still have your banana picking script :P It is a perfect script for sure...Still works with a few modifications to keep it up to date with rs updates

  9. #9
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Quote Originally Posted by grats View Post
    He used the phrase mind map so that's what I used, although now that you point it out it does look like a flowchart

  10. #10
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Itankbots View Post
    Very nice...I still have your banana picking script :P It is a perfect script for sure...Still works with a few modifications to keep it up to date with rs updates
    Haha oh really, no wonder the prices of Bannana (5)'s is dropping . And yeah I updated it too, but never released, banana prices are pretty good, dont want it dropping back to 550 like before haha.

    And thanks guys .

  11. #11
    Join Date
    Feb 2012
    Location
    Canada
    Posts
    1,164
    Mentioned
    26 Post(s)
    Quoted
    433 Post(s)

  12. #12
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    He used the phrase mind map so that's what I used, although now that you point it out it does look like a flowchart
    I linked them just because it seemed you didn't know of a flowchart from the "I never thought of drawing it out" part lol
    you can call it whatever you want, doesn't bug me
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  13. #13
    Join Date
    Sep 2012
    Posts
    270
    Mentioned
    4 Post(s)
    Quoted
    97 Post(s)

    Default

    Hmmm interesting. Most guides teach you something specific but this... is something that is ALWAYS useful.

  14. #14
    Join Date
    Sep 2013
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    20 Post(s)

    Default

    Great tutorial. It has made me realise the ironically obvious benefits of creating an effective plan first. Sure, plans will likely change as I actually code, but at least I will have a solid track to run on. Cheers!

  15. #15
    Join Date
    Oct 2014
    Posts
    56
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Thank you for this. Very useful starting out.

  16. #16
    Join Date
    Jan 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Love, nice guide!

  17. #17
    Join Date
    Jan 2015
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    very nice idea. Will use it when i am ready to script. learning atm.

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
  •