Page 2 of 8 FirstFirst 1234 ... LastLast
Results 26 to 50 of 200

Thread: All-In-One RS3 and SRL6 Scripting Tutorial!

  1. #26
    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 rsbots2013 View Post
    that's it. and how do I change the default world when it goes to log in?
    Simba Code:
    procedure declarePlayers();
    begin
      setLength(players, 1);
      with players[0] do
      begin
        loginName := 'username';
        password := 'password';
        isActive := true;
        isMember := true;
        world := 108; //This
      end
      currentPlayer := 0;
    end;

  2. #27
    Join Date
    Feb 2014
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    i didnt even have to look i knew it be you writing this mayor you rock dude

  3. #28
    Join Date
    Nov 2012
    Location
    Vice City
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Awesome tut, has helped me tons.

    Was wondering in future updates if you're going to include painting a progress report on SMART.

  4. #29
    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 SOUPalmighty View Post
    Awesome tut, has helped me tons.

    Was wondering in future updates if you're going to include painting a progress report on SMART.
    I guess I could a a little section about that. Drawing bitmaps + text. I might put it in one of the reserves.

  5. #30
    Join Date
    Nov 2012
    Location
    Vice City
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    I guess I could a a little section about that. Drawing bitmaps + text. I might put it in one of the reserves.
    Very cool, im just looking for something that outlines the diff ways to do it. I got it figured out on my Flax spinner but i think im handling it the most complicated way lol.

    Linked in my sig, if you want to take a look

  6. #31
    Join Date
    Mar 2013
    Posts
    222
    Mentioned
    3 Post(s)
    Quoted
    143 Post(s)

    Default

    incredible guide!

    i have a couple questions regarding tpas:
    1. the new aca tool has a cts option 3. do you recommend using that over option 2?

    2. for the object height/width does it have to be exact? what's a good way of accurately measuring this?

    3. what does findcolorspiral offer over just findcolor?

    4. for mincount how does the script identify that these pixels are a 'part' of the same object?

    I also get a access violation error when I attempt to use smartdebug for tpa/atpas

  7. #32
    Join Date
    May 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    So within Simba the minimap is completely black whenever I log in and I'm not able to see any detail of the map except the mini-map markers like a mining spot, trees, bank, etc. How do I fix this? Because I don't think I'll be able to make the pathway if there is no color in the minimap although, I haven't yet tried going to the actual runescape client then taking that picture and just seeing if it'll still work although the map is colorless on the Simba RS3 client.

    Thanks,
    Jake

  8. #33
    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 Im Dooby View Post
    So within Simba the minimap is completely black whenever I log in and I'm not able to see any detail of the map except the mini-map markers like a mining spot, trees, bank, etc. How do I fix this? Because I don't think I'll be able to make the pathway if there is no color in the minimap although, I haven't yet tried going to the actual runescape client then taking that picture and just seeing if it'll still work although the map is colorless on the Simba RS3 client.

    Thanks,
    Jake
    Sounds like the openGL minimap glitch. It's a Jagex issue, but can supposedly be fixed by logging out and in again.

  9. #34
    Join Date
    Mar 2013
    Posts
    222
    Mentioned
    3 Post(s)
    Quoted
    143 Post(s)

    Default

    Nobody can answer my questions?

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

    Default

    Quote Originally Posted by RlagkRud View Post
    incredible guide!

    i have a couple questions regarding tpas:
    1. the new aca tool has a cts option 3. do you recommend using that over option 2?

    2. for the object height/width does it have to be exact? what's a good way of accurately measuring this?

    3. what does findcolorspiral offer over just findcolor?

    4. for mincount how does the script identify that these pixels are a 'part' of the same object?

    I also get a access violation error when I attempt to use smartdebug for tpa/atpas
    6am, making it quick..

    No i prefer cts2, its alot faster + new aca doesn't give you the best tolerance / modifiers for cts3

    No it doesn't have to be exact and its measured by pixels, this is what sizes simba will try and split the TPointArray into.

    FindColorSpiral searches out from from the middle, which is a more human way than row by row although it is useless when playing with tpa's since your most likely to sort it.

    mincount - It doesn't it's just useful for removing small random pixels it may find on the screen

  11. #36
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    I don't recommend CTS 3 for runescape at all. Well, maybe for some special cases. It is made to be closer to human perception, not to give more accurate results. But the calculations are so slow.
    Working on: Tithe Farmer

  12. #37
    Join Date
    Mar 2013
    Posts
    222
    Mentioned
    3 Post(s)
    Quoted
    143 Post(s)

    Default

    Quote Originally Posted by Olly View Post
    6am, making it quick..

    No i prefer cts2, its alot faster + new aca doesn't give you the best tolerance / modifiers for cts3

    No it doesn't have to be exact and its measured by pixels, this is what sizes simba will try and split the TPointArray into.

    FindColorSpiral searches out from from the middle, which is a more human way than row by row although it is useless when playing with tpa's since your most likely to sort it.

    mincount - It doesn't it's just useful for removing small random pixels it may find on the screen
    Tahnks for the reply!

    One more question. How does simba determine if a certain TPoint goes inside a certain TPA that's in a ATPA?
    For example, let's see I have a green tree in the middle and random green specks around it. How does simba know that only the green tree TPoints go into the same array while the green specks go into their own, separate TPA (maybe even a separate array for each green speck?)

  13. #38
    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 RlagkRud View Post
    Tahnks for the reply!

    One more question. How does simba determine if a certain TPoint goes inside a certain TPA that's in a ATPA?
    For example, let's see I have a green tree in the middle and random green specks around it. How does simba know that only the green tree TPoints go into the same array while the green specks go into their own, separate TPA (maybe even a separate array for each green speck?)
    This is what the width/height parameters in most TPA/ATPA functions are for. If the green specks are a certain distance from the other green points (the ones on the tree) then they will get put into another array.

  14. #39
    Join Date
    Mar 2013
    Posts
    222
    Mentioned
    3 Post(s)
    Quoted
    143 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    This is what the width/height parameters in most TPA/ATPA functions are for. If the green specks are a certain distance from the other green points (the ones on the tree) then they will get put into another array.
    Ahh I see. This makes a lot of sense. Thanks!

  15. #40
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I followed this tutorial and my clay mining script mostly works, but it won't deposit in the deposit box.
    It opens the box fine, but when it goes to deposit all I get is a bunch of this.
    Code:
    -- TRSMainscreen.findObject()
    ---- No colors found
    -- TRSMainscreen.findObject(): False
    I've tried digging through the include and going to the functions that depositbox calls and switching out the functions. There was no change in messages and it didn't fix.

    Here is my current code.
    Code:
    procedure depositClay();
    var
      bankTimer: TTimeMarker;
    
    begin
      if not isLoggedIn() then
        exit;
    
      if depositBox.isOpen(500) then
      begin
    
        bankTimer.start();
    
        repeat
          if (depositBox.count > 0) then
          begin
            TRSBankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
          end;
        until(depositBox.isEmpty()) or (not isLoggedIn()) or (bankTimer.getTime() > 2500);
    
      end;
    
      depositBox.close();
    
    end;
    I wanted to start a separate thread about this issue, but I can't manage to start any threads or find a list of admins/webmasters to contact about the issue.

  16. #41
    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 Arseface View Post
    I followed this tutorial and my clay mining script mostly works, but it won't deposit in the deposit box.
    It opens the box fine, but when it goes to deposit all I get is a bunch of this.
    Code:
    -- TRSMainscreen.findObject()
    ---- No colors found
    -- TRSMainscreen.findObject(): False
    Based on this, I'd say it isn't the depositClay procedure, but the findDepositBox procedure that is the problem. It successfully found the deposit box and opened it, but it doesn't recognize it's open. Because it doesn't think it's open, it keeps looking for the deposit box color, but it can't find it because the deposit box interface is blocking the screen (which is why you get the no color found error).

    As you can see, it probably prints that error 15 times until it breaks out of the loop:
    Simba Code:
    procedure findDepositBox();
    var
      x, y, i: integer;
    begin
      if not isLoggedIn() then
        exit;

      repeat
        mainscreen.findObject(x, y, 5270142, 5, colorSetting(2, 0.07, 0.15), mainscreen.playerPoint, 30, 50, 50, ['eposit', 'box'], MOUSE_LEFT);
        wait(randomRange(1000, 2000));
        inc(i);
      until depositBox.isOpen() or (i >= 15);
    end;

    If your interfaces are correctly set, then depositBox.isOpen() must be broken due to a game update. You can file a bug report here and one of the SRL developers will fix it ASAP.

  17. #42
    Join Date
    Mar 2014
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Based on this, I'd say it isn't the depositClay procedure, but the findDepositBox procedure that is the problem. It successfully found the deposit box and opened it, but it doesn't recognize it's open. Because it doesn't think it's open, it keeps looking for the deposit box color, but it can't find it because the deposit box interface is blocking the screen (which is why you get the no color found error).

    As you can see, it probably prints that error 15 times until it breaks out of the loop:
    Simba Code:
    until depositBox.isOpen() or (i >= 15);
    If your interfaces are correctly set, then depositBox.isOpen() must be broken due to a game update. You can file a bug report here and one of the SRL developers will fix it ASAP.
    Ah, didn't think to count the errors. I figured it was timing out because of the bankTimer.

    I'm pretty sure all my interfaces are correctly set, and since the script didn't continue into the next procedure after finishing the error loop it seems like .isOpen() being busted is the most likely.

    Bug posted. Thanks for the quick reply on top of the amazing tutorial.
    Pollinate, don't hate.

  18. #43
    Join Date
    Jul 2012
    Location
    Australia
    Posts
    136
    Mentioned
    0 Post(s)
    Quoted
    57 Post(s)

    Default

    This looks like a wealth of information and a better place to start learning than I could have hoped for. Will make a mental note to give this a thorough read after the Easter break. Who knows... Something might click in this dull brain of mine!

  19. #44
    Join Date
    Feb 2014
    Location
    TORONTO, ONTARIO, CANADA
    Posts
    87
    Mentioned
    1 Post(s)
    Quoted
    49 Post(s)

    Default

    How do i make a procedure that will select an option when talking to a npc?

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

    Default

    On phone at the moment so this might look a little messy
    Simba Code:
    If findColorTolerance(etc... ) then
      If isMouseOverText([`banker`]) then
      Begin
        Fastclick(MOUSE_RIGHT);
        ChooseOptions(['attack', 'walk']);
      End;
    End;

    E: @jayman19981 so I realised that you might be talking about the conversation box, in which case you can use the function:

    Simba Code:
    if converstionBox.isOpen() then
      conversationBox.selectOption(2); //what ever number the option is

    I think last time I tried that it was a little buggy. You can look at the bear fur script for more ideas.
    Last edited by The Mayor; 04-22-2014 at 09:14 PM.

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

    Default

    Quote Originally Posted by The Mayor View Post
    On phone at the moment so this might look a little messy
    Simba Code:
    If findColorTolerance(etc... ) then
      If isMouseOverText([`banker`]) then
      Begin
        Fastclick(MOUSE_RIGHT);
        ChooseOptions([`attack`, `walk ;])
      End;
    End;
    Fixed quotes:
    Simba Code:
    if findColorTolerance(etc... ) then
      if isMouseOverText(['banker']) then
      begin
        Fastclick(MOUSE_RIGHT);
        ChooseOptions(['attack', 'walk']);
      end;
    end;

  22. #47
    Join Date
    Feb 2014
    Location
    TORONTO, ONTARIO, CANADA
    Posts
    87
    Mentioned
    1 Post(s)
    Quoted
    49 Post(s)

    Default

    thanks.

    And also procedure that detects black minimap on openGL and then logs out and back in.

  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 jayman19981 View Post
    thanks.

    And also procedure that detects black minimap on openGL and then logs out and back in.
    Haven't tested this but it should work:

    Simba Code:
    function isMapGlitched(): boolean;
    begin
      result := (round(minimap.getColorPercent(minimap.getBlackBackground(), 0)) > 25);
    end;

    procedure fixGlitch();
    begin
      if isMapGlitched() then
      begin
        players[currentPlayer].exitToLobby();
        wait(randomRange(7000, 15000));
        players[currentPlayer].login();
      end else
        writeLn('The map looks normal');
    end;

  24. #49
    Join Date
    Feb 2014
    Location
    TORONTO, ONTARIO, CANADA
    Posts
    87
    Mentioned
    1 Post(s)
    Quoted
    49 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Haven't tested this but it should work:

    Simba Code:
    function isMapGlitched(): boolean;
    begin
      result := (round(minimap.getColorPercent(minimap.getBlackBackground(), 0)) > 25);
    end;

    procedure fixGlitch();
    begin
      if isMapGlitched() then
      begin
        players[currentPlayer].exitToLobby();
        wait(randomRange(7000, 15000));
        players[currentPlayer].login();
      end else
        writeLn('The map looks normal');
    end;
    nope.. doesn't work.

  25. #50
    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 jayman19981 View Post
    nope.. doesn't work.
    Ok I just took a look and the map isn't actually black, it's the interface colour:

    Simba Code:
    function isMapGlitched(): boolean;
    begin
      result := countColorTolerance(1774858, minimap.getBounds(), 24) > 15000;
    end;

    Just call fixGlitch() when you want it to check.

Page 2 of 8 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
  •