Page 2 of 5 FirstFirst 1234 ... LastLast
Results 26 to 50 of 120

Thread: Simplistic Beginners Guide To RS3 Scripting

  1. #26
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Well, fastClick is a function built into SRL6, so you have to 'include' the SRL6 files at the top of your script to give simba access to them. Make sure you have:

    {$I SRL-6/SRL.simba}

    at the top, and then

    setupSRL

    at the start of your main loop, just like it shows you.
    Oh ok Sorry about that!
    I got it to work thank you very much!

  2. #27
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Sorry for posting again, trying to withdraw some maple logs
    when I enter "aple" or "logs" as the mouse over text it opens bank, looks for the logs, but doesnt recognize it and it terminates the script.
    I tried switching the item to fellstalk herbs and used that for mouse over text but it worked fine, just wont work with maple logs.

    Any idea what might be going on?
    Last edited by Adieux; 08-05-2014 at 01:51 AM.

  3. #28
    Join Date
    Jul 2014
    Posts
    204
    Mentioned
    4 Post(s)
    Quoted
    125 Post(s)

    Default

    Quote Originally Posted by luispadron View Post
    Sorry for posting again, trying to withdraw some maple logs
    when I enter "aple" or "logs" as the mouse over text it opens bank, looks for the logs, but doesnt recognize it and it terminates the script.
    I tried switching the item to fellstalk herbs and used that for mouse over text but it worked fine, just wont work with maple logs.

    Any idea what might be going on?
    You can just put maple logs in slot 1 and use:
    bankScreen.withdraw(1, WITHDRAW_AMOUNT_ALL, ['']);

    1 = the bankslot, so you can put it in wathever bank slot you want.

  4. #29
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    180
    Mentioned
    14 Post(s)
    Quoted
    101 Post(s)

    Default

    Quote Originally Posted by lanadekat View Post
    You can just put maple logs in slot 1 and use:
    bankScreen.withdraw(1, WITHDRAW_AMOUNT_ALL, ['']);

    1 = the bankslot, so you can put it in wathever bank slot you want.
    Yeah I was going to do this but, if the logs run out will the script keep withdrawing anything from slot 1?

  5. #30
    Join Date
    Jul 2014
    Posts
    135
    Mentioned
    0 Post(s)
    Quoted
    55 Post(s)

    Default

    Quote Originally Posted by A Bit Poor View Post
    Yeah I was going to do this but, if the logs run out will the script keep withdrawing anything from slot 1?
    Have the script check, after your withdraw function, to see what the backpack count is.
    backpack.count()
    Is what i think the function is, it will return an integer, if the number it returns is less than 28, break out of the script, as you have no more logs left in the bank.

  6. #31
    Join Date
    May 2013
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Hi nice tutorial i learned a few things from here , anyway i wanted to make a script to spread ashes for prayer skill ... i wanted to use the preset button code and action bar ... and i cant find the action bar code ... could somene help me please.
    Thank You!

  7. #32
    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 Ionutz900 View Post
    Hi nice tutorial i learned a few things from here , anyway i wanted to make a script to spread ashes for prayer skill ... i wanted to use the preset button code and action bar ... and i cant find the action bar code ... could somene help me please.
    Thank You!
    I guess I could add an action bar section. To click slot 1:

    Simba Code:
    actionBar.clickSlot(1, MOUSE_LEFT)

  8. #33
    Join Date
    May 2013
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Thanks for replaying ...i found this code in iBuryBones script
    Simba Code:
    typeSend('1', false);
      wait(randomRange(500, 700));
     until tabBackpack.count() = 0 or chatbox.findAnyText(['ave any lef']);
    Do you think this could work for me to ? didn't had time to test

  9. #34
    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 Ionutz900 View Post
    Do you think this could work for me to ? didn't had time to test
    I can't test everything for you too...

  10. #35
    Join Date
    May 2013
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Hi, I tested that code and it does work really well.. anyway i asked you maybe you have encounterd that code before and you may know if it would worked ...anyway thank you for your replyes

  11. #36
    Join Date
    Feb 2013
    Location
    The Boonies
    Posts
    203
    Mentioned
    9 Post(s)
    Quoted
    70 Post(s)

    Default

    You should emphasize case sensitivity for isMouseOverText and chooseOption.select, in the sense of (['rop Logs']), not (['rop logs']). It wasn't entirely apparent for me at least, but I figured it out quickly enough.

  12. #37
    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 Lama0 View Post
    You should emphasize case sensitivity for isMouseOverText and chooseOption.select, in the sense of (['rop Logs']), not (['rop logs']). It wasn't entirely apparent for me at least, but I figured it out quickly enough.
    It's a good idea to mention that. Done!

  13. #38
    Join Date
    Nov 2013
    Location
    Lithuania
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    74 Post(s)

    Default

    Nice now i have a grasp of what is what. Now all that's left is the rest... which is a lot. My first attempt will probably be a bunch of copy and paste from all the scripts i have and see if i can make something work. Can't wait for action bar basics. Trying to find out how to press actionbar slot with a keyboard. Not with a mouse. Is there some kind of manual for these things in github? I found something there but i dont know if it's up to date.

  14. #39
    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 tulpiuka View Post
    Nice now i have a grasp of what is what. Now all that's left is the rest... which is a lot. My first attempt will probably be a bunch of copy and paste from all the scripts i have and see if i can make something work. Can't wait for action bar basics. Trying to find out how to press actionbar slot with a keyboard. Not with a mouse. Is there some kind of manual for these things in github? I found something there but i dont know if it's up to date.
    You can click an action bar slot

    Simba Code:
    mouseBox(actionbar.getSlotBox(1), MOUSE_LEFT);

    Or you can type '1' using typeSend(text: string; pressEnter: boolean = true);

    To type 1 and not press enter:

    Simba Code:
    typeSend('1', false)

    To type 1 and press enter:

    Simba Code:
    typeSend('1', true)

    but you will see pressEnter is actually true by default, so if you leave that parameter blank, it will resort to the default. So to press enter after typing you could simply:

    Simba Code:
    typeSend('1')


    I hope to finish the other sections sometime! You should open the include files in C:/simba/includes/srl6/lib/ and have a look at the function list on the left to see what's available.

  15. #40
    Join Date
    Nov 2013
    Location
    Lithuania
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    74 Post(s)

    Default

    procedure Spellcast; // Presses 1 to cast spell
    begin
    KeyDown(31);
    wait(RandomRange(30, 100));
    KeyUp(31);
    end

    I ended up finding this. (it's most human like key press?) The problem is the script does one loop (sometimes fails) then the second one comes and 100% fail. I assume it presses up and down while the bank is open or actionbar isn't loaded. Added a waitRandom but it didn't help.

    Probably found the problem. Gonna try something.

  16. #41
    Join Date
    Oct 2014
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    very in depth guide I like it, very easy to understand

  17. #42
    Join Date
    Jun 2007
    Location
    Michigan
    Posts
    269
    Mentioned
    2 Post(s)
    Quoted
    141 Post(s)

    Default

    For
    Simba Code:
    minimap.setAngle(45)
    can it be set to a range of angles? For example having it turn to an angle between 40 and 50 with a gaussian distribution or an normal distribution. I want to detect the vines in the Karamja Dungeon, so a west angle, I think it is west ha, would be best but don't want it to go exactly west each time.

  18. #43
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by IROC-Z View Post
    For
    Simba Code:
    minimap.setAngle(45)
    can it be set to a range of angles? For example having it turn to an angle between 40 and 50 with a gaussian distribution or an normal distribution. I want to detect the vines in the Karamja Dungeon, so a west angle, I think it is west ha, would be best but don't want it to go exactly west each time.
    Minimap.setAngle(Random(40, 50));
    Minimap.setAngle(GaussRangeInt(40, 50));

  19. #44
    Join Date
    Jun 2007
    Location
    Michigan
    Posts
    269
    Mentioned
    2 Post(s)
    Quoted
    141 Post(s)

    Default

    Quote Originally Posted by Olly View Post
    Minimap.setAngle(Random(40, 50));
    Minimap.setAngle(GaussRangeInt(40, 50));
    Thanks! I figured it would be something like that, just wasn't sure where the random/gauss and parenthesis would fall.

  20. #45
    Join Date
    Mar 2014
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    53 Post(s)

    Default

    Would you use the mouseoverobject for picking up items as well ? can you write a little tutorial on looters ?

  21. #46
    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 victordono View Post
    Would you use the mouseoverobject for picking up items as well ? can you write a little tutorial on looters ?

    mouseOverObject?


    You could use mainScreen.findObject, the same way you find the tree.

  22. #47
    Join Date
    Mar 2014
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    53 Post(s)

    Default

    Hmm so would a looter be similar to
    Code:
    program new;
    {$DEFINE SMART}
    {$I SRL-6/SRL.simba}
    
    procedure lootItem();
    var
      x, y: integer; //we need to declare these variables since findObject outputs these
    begin
      if mainscreen.findObject(x, y, 925721, 11, ['ffigy'], MOUSE_RIGHT) then
      begin
        writeLn('We found an item!'); //if findObject results true, this will print
        chooseOption.select(['ake']); // this will choose ‘Take’ option in chooseOptions menu
      end;
    end;
    
    begin
      clearDebug();
      setupSRL();
      lootItem();
    end.

  23. #48
    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 victordono View Post
    Hmm so would a looter be similar to
    Simba Code:
    program new;
    {$DEFINE SMART}
    {$I SRL-6/SRL.simba}

    procedure lootItem();
    var
      x, y: integer; //we need to declare these variables since findObject outputs these
    begin
      if mainscreen.findObject(x, y, 925721, 11, ['ffigy'], MOUSE_RIGHT) then
      begin
        writeLn('We found an item!'); //if findObject results true, this will print
        chooseOption.select(['ake']); // this will choose ‘Take’ option in chooseOptions menu
      end;
    end;

    begin
      clearDebug();
      setupSRL();
      lootItem();
    end.
    In the most basic form, yes That will work if your colour and tolerance are correct.

  24. #49
    Join Date
    Jan 2012
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    This is beautiful.

  25. #50
    Join Date
    Aug 2013
    Posts
    159
    Mentioned
    4 Post(s)
    Quoted
    90 Post(s)

    Default

    I'm starting to wonder if there should be a line, or text, separating the original tutorial from the to be added sections. It's started to go from the basics to all of the inbuilt features of the client.

    Edit: I mean a more dominate line.

Page 2 of 5 FirstFirst 1234 ... 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
  •