Page 1 of 2 12 LastLast
Results 1 to 25 of 26

Thread: RSPS Script

  1. #1
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default RSPS Script

    I'm new to coding and all, but I'm looking to try and make/convert a script for CorruptionX private server.
    It is Runescape just before EOC. I'm looking for a script that can chop willows at draynor (or seers) and bank them. And i'm also trying to make a script that will fly fish at shilo village, and bank.
    I've tried following some tutorials, but after i start the script nothing happens. It compiles, but doesn't perform any actions.
    If anyone could help, that would be great. Thanks

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

    Default

    Make sure that you select the client with the crosshairs before starting the script, that may have been your issue.

  3. #3
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    Make sure that you select the client with the crosshairs before starting the script, that may have been your issue.
    Thanks, I've been doing that. It will either focus on the window i selected when i press run, or just run and say completed and do nothing.
    I was trying to follow a tutorial on how to use Simba on an RSPS, and this is the code (It just says it compiled, and completed successfully).
    I changed the color to willows, but didn't save it.:
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
    MouseSpeed := 15;
    SetupSRL;
    end.
    I also downloaded other scripts, and removed things i didn't need (antiban and stuff) just to see if i could get anything working, and they would compile, focus on the RSPS client but do nothing.
    Last edited by himynamesnoah; 04-09-2013 at 09:06 PM.

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

    Default

    You need the procedure in your main loop

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

    Default

    Quote Originally Posted by himynamesnoah View Post
    Thanks, I've been doing that. It will either focus on the window i selected when i press run, or just run and say completed and do nothing.
    I was trying to follow a tutorial on how to use Simba on an RSPS, and this is the code (It just says it compiled, and completed successfully).
    I changed the color to willows, but didn't save it.:
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
    MouseSpeed := 15;
    SetupSRL;
    end.
    I also downloaded other scripts, and removed things i didn't need (antiban and stuff) just to see if i could get anything working, and they would compile, focus on the RSPS client but do nothing.
    Change your mainloop from
    Simba Code:
    Begin
      MouseSpeed := 15;
      SetupSRL;
    end.
    to
    Simba Code:
    Begin
      MouseSpeed := 15;
      SetupSRL;
      ClickTree;
    end.

  6. #6
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Thanks to both of you. Sadly, it still doesn't work.
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2702913, 374, 171, 457, 237, 5) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
      MouseSpeed := 15;
      SetupSRL;
      ClickTree;
    end.
    I select the client with the green target, press Run, then I get:
    Code:
    Compiled successfully in 717 ms.
    SRL Compiled in 16 msec
    Successfully executed.
    But it still doesn't do anything. It doesn't even focus on the client window, doesn't move the mouse or anything. Maybe I am doing something wrong with the coords for finding the color? I mean if i could get it to just click the tree I'd be happy


    EDIT:
    Also, what is needed to convert Runescape script to a RSPS?
    Last edited by himynamesnoah; 04-09-2013 at 10:07 PM.

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

    Default

    Quote Originally Posted by himynamesnoah View Post
    Also, what is needed to convert Runescape script to a RSPS?
    It's usually easier just to start from scratch, but if it's from just before EOC or something some recently outdated ones might work.

    What does do when you run this:
    Simba Code:
    program ChopTree;
    {$i srl/srl.simba}

    begin
      MouseSpeed := 15;
      SetupSRL;
      MMouse(0, 0, 0, 0);
    end.

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

    Default

    Quote Originally Posted by BMWxi View Post
    It's usually easier just to start from scratch, but if it's from just before EOC or something some recently outdated ones might work.

    What does do when you run this:
    Simba Code:
    program ChopTree;

    {$i srl/srl.simba}

    begin
      MouseSpeed := 15;
      SetupSRL;
      MMouse(0, 0, 0, 0);
    end.
    Call mousespeed after SetupSRL;

    Quote Originally Posted by himynamesnoah View Post
    Thanks to both of you. Sadly, it still doesn't work.
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2702913, 374, 171, 457, 237, 5) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
      MouseSpeed := 15;
      SetupSRL;
      ClickTree;
    end.
    I select the client with the green target, press Run, then I get:
    Code:
    Compiled successfully in 717 ms.
    SRL Compiled in 16 msec
    Successfully executed.
    But it still doesn't do anything. It doesn't even focus on the client window, doesn't move the mouse or anything. Maybe I am doing something wrong with the coords for finding the color? I mean if i could get it to just click the tree I'd be happy


    EDIT:
    Also, what is needed to convert Runescape script to a RSPS?
    Use BMWxi's tester script, see if it moves the corner of the client (if not then there are coordinates off-set)

    and
    Simba Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2702913, 374, 171, 457, 237, 5) then
    begin
    Writeln('Found Color')  // always use debug lines after if then statements to see whether it HAS been found.
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;

    end.
    Last edited by Sjoe; 04-09-2013 at 10:41 PM.

    Creds to DannyRS for this wonderful sig!

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

    Default

    Quote Originally Posted by BMWxi View Post
    It's usually easier just to start from scratch, but if it's from just before EOC or something some recently outdated ones might work.

    What does do when you run this:
    Simba Code:
    program ChopTree;
    {$i srl/srl.simba}

    begin
      MouseSpeed := 15;
      SetupSRL;
      MMouse(0, 0, 0, 0);
    end.
    Or he can go hardcore and make working up text and edit sps,

    But yea just start from scratch since the srl functions won't work unless the server is 100% like rs

  10. #10
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    It's usually easier just to start from scratch, but if it's from just before EOC or something some recently outdated ones might work.

    What does do when you run this:
    Simba Code:
    program ChopTree;
    {$i srl/srl.simba}

    begin
      MouseSpeed := 15;
      SetupSRL;
      MMouse(0, 0, 0, 0);
    end.
    That moves the mouse over to the top left corner of the client.

    Quote Originally Posted by Sjoekeloe View Post
    Call mousespeed after SetupSRL;



    Use BMWxi's tester script, see if it moves the corner of the client (if not then there are coordinates off-set)

    and
    Simba Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2702913, 374, 171, 457, 237, 5) then
    begin
    Writeln('Found Color')  // always use debug lines after if then statements to see whether it HAS been found.
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;

    end.
    This is the code i just tried:
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2702913, 374, 171, 457, 237, 5) then
    begin
    Writeln('Found Color')  // always use debug lines after if then statements to see whether it HAS been found.
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
      SetupSRL;
      MouseSpeed := 15;
      ClickTree;
    end.
    It still doesn't do anything. This is all i get:
    Code:
    Compiled successfully in 702 ms.
    SRL Compiled in 15 msec
    Successfully executed.
    Quote Originally Posted by RJJ95 View Post
    Or he can go hardcore and make working up text and edit sps,

    But yea just start from scratch since the srl functions won't work unless the server is 100% like rs
    I was following you're guide, just to get a basic idea of what to do. I just can't get it to do anything. And i don't think i know enough to make my own upText and edit the SPS

    Thanks for the help everyone!

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

    Default

    Quote Originally Posted by himynamesnoah View Post
    That moves the mouse over to the top left corner of the client.



    This is the code i just tried:
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2702913, 374, 171, 457, 237, 5) then
    begin
    Writeln('Found Color')  // always use debug lines after if then statements to see whether it HAS been found.
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
      SetupSRL;
      MouseSpeed := 15;
      ClickTree;
    end.
    It still doesn't do anything. This is all i get:
    Code:
    Compiled successfully in 702 ms.
    SRL Compiled in 15 msec
    Successfully executed.

    I was following you're guide, just to get a basic idea of what to do. I just can't get it to do anything. And i don't think i know enough to make my own upText and edit the SPS

    Thanks for the help everyone!
    You appear to be making it search in a very small box did you use the color picker to find the boxed area to search?

  12. #12
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    You appear to be making it search in a very small box did you use the color picker to find the boxed area to search?
    I'm really new to using Simba, and coding in general. How big should i be making the searching area? The color picker just gives me the coords of the color and the color.

  13. #13
    Join Date
    Mar 2007
    Posts
    393
    Mentioned
    1 Post(s)
    Quoted
    98 Post(s)

    Default

    You can use
    Code:
    if FindColorTolerance(X, Y, 2702913, MSX1, MSY1, MSX2, MSY2, 5)
    This searches whole main screen

    and this line is right
    Code:
    mmouse(x, y,1,1);
    wait(250);
    but add some randomness for perfection
    Code:
    mmouse(x, y,2,2);
    wait(250+random(100));
    Last edited by t4q; 04-10-2013 at 06:40 PM.

  14. #14
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by t4q View Post
    You can use
    Code:
    if FindColorTolerance(X, Y, 2702913, MSX1, MSY1, MSX2, MSY2, 5)
    This searches whole main screen

    and this line is right
    Code:
    mmouse(x, y,1,1);
    wait(250);
    but add some randomness for perfection
    Code:
    mmouse(x, y,2,2);
    wait(250+random(100));
    Thanks for the help. The main problem right now is getting it to actually do something.
    This is my code at the moment:
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2572095, MSX1, MSY1, MSX2, MSY2, 5) then
    begin
    Writeln('Found Color')  // always use debug lines after if then statements to see whether it HAS been found.
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
      SetupSRL;
      MouseSpeed := 15;
      ClickTree;
    end.
    It just doesn't do anything, this is what it outputs:
    Code:
    Compiled successfully in 687 ms.
    SRL Compiled in 0 msec
    Successfully executed.
    Thanks for all the help guys, but i guess with my limited knowledge i'm not going to be able to do this. Thanks anyway.

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

    Default

    Quote Originally Posted by himynamesnoah View Post
    Thanks for the help. The main problem right now is getting it to actually do something.
    This is my code at the moment:
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2572095, MSX1, MSY1, MSX2, MSY2, 5) then
    begin
    Writeln('Found Color')  // always use debug lines after if then statements to see whether it HAS been found.
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
      SetupSRL;
      MouseSpeed := 15;
      ClickTree;
    end.
    It just doesn't do anything, this is what it outputs:
    Code:
    Compiled successfully in 687 ms.
    SRL Compiled in 0 msec
    Successfully executed.
    Thanks for all the help guys, but i guess with my limited knowledge i'm not going to be able to do this. Thanks anyway.
    Try taking out setup srl;

  16. #16
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Try taking out setup srl;
    Still nothing. It just compiles and says it successfully executed.

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

    Default

    Quote Originally Posted by himynamesnoah View Post
    Still nothing. It just compiles and says it successfully executed.
    Use Mouse(0,0,0,0, true); See if it moves the left top corner of the client, (must be perfect) else there is an offset.
    (there's a x -50, y -50 for Mainscreen coordinates due to the topbar on Eoc Runescape)

    if that's fine then your colors and tolerance are wrong, pick new colors + a big higher tolerance.
    And make sure the box u made is correct.
    Last edited by Sjoe; 04-10-2013 at 09:06 PM.

    Creds to DannyRS for this wonderful sig!

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

    Default

    Quote Originally Posted by himynamesnoah View Post
    Still nothing. It just compiles and says it successfully executed.
    Try picking a different color and is a higher tolerance

  19. #19
    Join Date
    Mar 2007
    Posts
    393
    Mentioned
    1 Post(s)
    Quoted
    98 Post(s)

    Default

    Right now it just does one click if it finds the tree. You must add repeat and until to make it click more times
    Also you need to make sure if you are just standing or you are cutting the tree
    This is function that might come helpful
    Code:
    function iscutting: Boolean;
    var
    PBox: TBox;
    begin
    PBox := IntToBox(245, 130, 285, 195);
    Result := (AveragePixelShift(PBox, 250, 500) > 300);
    end;
    and adding repeat. Repeats clicking trees and waits while is cutting them until inventory is full
    Code:
    Begin
      SetupSRL;
      MouseSpeed := 15;
      repeat 
      if not iscutting then
      ClickTree;
      wait(100+random(50));
      until invfull
    end.
    And please use account which doesn't make you sad if it's gets banned while testing your scripts
    Last edited by t4q; 04-10-2013 at 09:21 PM.

  20. #20
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Use Mouse(0,0,0,0, true); See if it moves the left top corner of the client, (must be perfect) else there is an offset.

    if that's fine then your colors and tolerance are wrong, pick new colors + a big higher tolerance.
    This is where it goes:


    Also, i raised the tolerance to 10 and still nothing. So i raised it to 100:
    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 2176052, MSX1, MSY1, MSX2, MSY2, 100) then
    begin
    Writeln('Found Color')  // always use debug lines after if then statements to see whether it HAS been found.
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
      MouseSpeed := 15;
      ClickTree;
    end.
    Now it moves the mouse here:


    The lowest tolerance i could get it to move the mouse at was 81, and it would move the mouse to the same spot as above. The spot it moves to is not even remotely close to the color i selected. I don't really understand how much the value changes for the tolerance, but atleast it moves the mouse now

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

    Default

    100 tolerance.... LOL . It will basically find all colors.

    try 10-15

    Creds to DannyRS for this wonderful sig!

  22. #22
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    100 tolerance.... LOL . It will basically find all colors.

    try 10-15
    Yea, i was just seeing if i could get it to do anything. It won't do anything at all unless it is 81+ tolerance. So it's having problems finding the color. Is there a good spot i should be getting colors from on willow trees?

  23. #23
    Join Date
    Mar 2007
    Posts
    393
    Mentioned
    1 Post(s)
    Quoted
    98 Post(s)

    Default

    Have you selected your client? Use crosshair next to "Pick-a-color" thing and drag it on your client

  24. #24
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by t4q View Post
    Have you selected your client? Use crosshair next to "Pick-a-color" thing and drag it on your client
    Yes, i have.
    And i found that removing SetupSRL; from this:
    Code:
    program ChopTree;
    {$i srl/srl.simba}
    
    begin
      MouseSpeed := 15;
      MMouse(0, 0, 0, 0);
    end.
    Will now make the mouse go exactly in the top left corner.

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

    Default

    Quote Originally Posted by himynamesnoah View Post
    Yes, i have.
    And i found that removing SetupSRL; from this:
    Code:
    program ChopTree;
    {$i srl/srl.simba}
    
    begin
      MouseSpeed := 15;
      MMouse(0, 0, 0, 0);
    end.
    Will now make the mouse go exactly in the top left corner.
    y-coordinates might be 20 to 50 off. Best way is to keep SetupSRL; and when u pick coordinates eg: 454,127 => deduct 20/50 : 454,87 (experiment on your own to see how much the offset is)

    Creds to DannyRS for this wonderful sig!

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