Page 4 of 5 FirstFirst ... 2345 LastLast
Results 76 to 100 of 120

Thread: Simplistic Beginners Guide To RS3 Scripting

  1. #76
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Quick question about GE parameters:

    You have options for +5/-5% in the prices. Is the "Any other number" option a designated price or can it be "+10"?

    Just wondering... for reasons.

    Also for simple operations, everything should be called from the main GE screen? It handles all of the GE Slot clicking and getting out of offers etc?
    Any other number as in a number, not anything with '+' or '-'.

    If you wanted to buy at +10% you could just do something like:

    Simba Code:
    procedure buyStuff();
    var
      price: integer;
    begin
      price := grandExchange.getPrice(1234);
      price += round(price * 0.1);
      grandExchange.buyItem('Item', toStr(price), '100');
    end;

    You can call any function from any screen. It will return to the main summary screen if necessary.

  2. #77
    Join Date
    Dec 2011
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    very good thread lerning alot :P thank you so much

  3. #78
    Join Date
    Dec 2014
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Ok im not sure if this question belongs here but I'm sure you can answer it anyways @ The Mayor . Is using DTMs for walking more accurate than SPS? . I've noticed that SPS sometimes messes up walk paths that I set.

  4. #79
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by Tristana View Post
    Ok im not sure if this question belongs here but I'm sure you can answer it anyways @ The Mayor . Is using DTMs for walking more accurate than SPS? . I've noticed that SPS sometimes messes up walk paths that I set.
    Except in very select areas, SPS is probably faster than DTMs. Made properly, I bet you'd probably have more "accurate" DTMs than SPS, but you should be able to walk to a given tile with the required accuracy using SPS.

    The key if you're finding misclicks is to properly set the map up. I don't have the function memorized (or Simba in front of me) but if you look around the help forum and find SPS threads there should be some mentions of SPS settings.

    Accuracy, Tolerance, Match Percent are the ones you're looking for. They can be changed around at will and tested until they work perfectly to whatever accuracy you need.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  5. #80
    Join Date
    Dec 2014
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    Except in very select areas, SPS is probably faster than DTMs. Made properly, I bet you'd probably have more "accurate" DTMs than SPS, but you should be able to walk to a given tile with the required accuracy using SPS.

    The key if you're finding misclicks is to properly set the map up. I don't have the function memorized (or Simba in front of me) but if you look around the help forum and find SPS threads there should be some mentions of SPS settings.

    Accuracy, Tolerance, Match Percent are the ones you're looking for. They can be changed around at will and tested until they work perfectly to whatever accuracy you need.
    Ah thanks . I'll take a look at DTMS for now.

  6. #81
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by Tristana View Post
    Ah thanks . I'll take a look at DTMS for now.
    Sorry, to be completely explicit: I highly recommend SPS in all situations. At least try it first. It's much easier and works just as accurately in almost all situations. In the case that you need highly precise walking for some special case, try changing settings with your SPS map until you're sure that it can't be done with SPS. Then maybe try DTMs, but they're so much harder to make, maintain, troubleshoot, etc.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  7. #82
    Join Date
    Jun 2013
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    This guide is beautiful, thanks for putting this together! Going to help a looot with learning

  8. #83
    Join Date
    Feb 2015
    Location
    Taguig, Philippines
    Posts
    342
    Mentioned
    15 Post(s)
    Quoted
    137 Post(s)

    Default

    Thanks for the wonderful intro! I've actually made a very simple alch'ing script while reading this.

  9. #84
    Join Date
    Mar 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    i don't get why i'm getting a compilation error
    program new;

    begin
    mouse(123, 123, MOUSE_MOVE);
    end.
    Error: Unknown declaration "Mouse" at line 4
    Compiling failed.

    e: didnt know it doesnt work outside of the smart client zzzzzzzzzzzzzzzzzzzzzzzzzz
    Last edited by forest; 03-06-2015 at 01:35 PM.

  10. #85
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by forest View Post
    i don't get why i'm getting a compilation error


    Error: Unknown declaration "Mouse" at line 4
    Compiling failed.

    e: didnt know it doesnt work outside of the smart client zzzzzzzzzzzzzzzzzzzzzzzzzz
    It doesn't work, because mouse() is a function inside the SRL-6 library. You need to include the SRL-6 library in your script. Read section 2 "Mouse and Clicking Basics".

  11. #86
    Join Date
    Feb 2015
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Great guide, I really enjoyed it.
    But I have a quick question. If I create a combat script and I would like to bot to use momentum, how would I check if the combat mode is already set to momentum? Is that even possible?

  12. #87
    Join Date
    Sep 2014
    Posts
    447
    Mentioned
    10 Post(s)
    Quoted
    203 Post(s)

    Default

    Quote Originally Posted by Kopa View Post
    Great guide, I really enjoyed it.
    But I have a quick question. If I create a combat script and I would like to bot to use momentum, how would I check if the combat mode is already set to momentum? Is that even possible?
    I didn't even know it existed because its not in the documentation, but I did some research and apparently you can do:

    Simba Code:
    powersScreen.open();
    if powersScreen.getCombatMode() = 3 then //Momentum's value is three
    begin
    //blah
    end;

    To set the bot to turn on momentum you can do something like:

    Simba Code:
    powersScreen.setCombatMode(MODE_MOMENTUM);

  13. #88
    Join Date
    Feb 2015
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by yourule97 View Post
    I didn't even know it existed because its not in the documentation, but I did some research and apparently you can do:

    Simba Code:
    powersScreen.open();
    if powersScreen.getCombatMode() = 3 then //Momentum's value is three
    begin
    //blah
    end;

    To set the bot to turn on momentum you can do something like:

    Simba Code:
    powersScreen.setCombatMode(MODE_MOMENTUM);
    Yeah I guessed that it will be the only solution.
    Thanks man!

  14. #89
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Kopa View Post
    Great guide, I really enjoyed it.
    But I have a quick question. If I create a combat script and I would like to bot to use momentum, how would I check if the combat mode is already set to momentum? Is that even possible?
    When you setCombatMode(), it checks that it's not already on the selected combat mode before clicking it.

  15. #90
    Join Date
    Feb 2015
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    When you setCombatMode(), it checks that it's not already on the selected combat mode before clicking it.
    Oh, that's great, thank you very much!
    But it has to open the combat settings to check it, right? I haven't made a test yet, as I'm still searching around and learning.

  16. #91
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by Kopa View Post
    Oh, that's great, thank you very much!
    But it has to open the combat settings to check it, right? I haven't made a test yet, as I'm still searching around and learning.
    Yes it does have to open it. I don't think there is another way to check what mode you are on?

  17. #92
    Join Date
    Mar 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Thanks for the guide

  18. #93
    Join Date
    Mar 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Does bankScreen.open(BANK_NPC_BLUE); still work for V West banks? I tried executing the same code you provided but it doesn't open the bank screen for me. Do I have to hardcode opening banks or is there an easier solution? Thanks

  19. #94
    Join Date
    Apr 2015
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    I have a question. What if i want to make a if statement? Like i have one procedure that can run if somthing happens

    like if my character logs out i log it back in using that procedure and it continues doing whatever its doing

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

    Default

    Quote Originally Posted by drag2270 View Post
    I have a question. What if i want to make a if statement? Like i have one procedure that can run if somthing happens

    like if my character logs out i log it back in using that procedure and it continues doing whatever its doing
    Simba Code:
    if not (isLoggedIn()) then
     begin
       players[currentPlayer].login();
       recoverFromLogout(); //This would ideally be a routine that opens
                            //the backpack, sets the camera, normal stuff
                            //that you'd do upon logging in to prepare for
                            //the script's run.
     end;
    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

  21. #96
    Join Date
    Apr 2015
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Ok lets take this to a different siutation and not with logs-outs what if my character is in wildy killing revs, what if it gets lured to another spot how can i take it back to revs? like what would be the lines of code.

  22. #97
    Join Date
    Jun 2014
    Location
    Oklahoma
    Posts
    336
    Mentioned
    22 Post(s)
    Quoted
    231 Post(s)

    Default

    Quote Originally Posted by drag2270 View Post
    Ok lets take this to a different siutation and not with logs-outs what if my character is in wildy killing revs, what if it gets lured to another spot how can i take it back to revs? like what would be the lines of code.
    It would likely involve SPS. If not it would require some clever solution.

    No one will write the code for you, I would suggest reading this https://villavu.com/forum/showthread.php?t=107757 guide to learn about SPS and more advanced scripting... Which doing something like fighting revs will require.

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

    Default

    Quote Originally Posted by drag2270 View Post
    Ok lets take this to a different siutation and not with logs-outs what if my character is in wildy killing revs, what if it gets lured to another spot how can i take it back to revs? like what would be the lines of code.
    I agree with what Camel said. However I'll point you to this thread, where a member was helped with location checking. The same concept can be used to accomplish your goal.
    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

  24. #99
    Join Date
    Jul 2012
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Great tutorial, may I suggest recording yourself making a new script from start to finish? That would be incredibly informative.

  25. #100
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by UrbanSmoke View Post
    Great tutorial, may I suggest recording yourself making a new script from start to finish? That would be incredibly informative.
    I've always thought about doing that! Maybe someday when I get the time

Page 4 of 5 FirstFirst ... 2345 LastLast

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
  •