Page 2 of 6 FirstFirst 1234 ... LastLast
Results 26 to 50 of 139

Thread: How to script for a RSPS - Beginner level

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

    Default

    Quote Originally Posted by Dormik View Post
    I mean walking using DTM.

    And then making a procedure with it;
    Not the best way to walk but ill add it later

  2. #27
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Okay thanks man! ='D

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

    Default

    Thanks, I had formal experience with pascal from a class but this has taught me how to utilize it for my purpose.

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

    Default

    Quote Originally Posted by Schnauzer View Post
    Thanks, I had formal experience with pascal from a class but this has taught me how to utilize it for my purpose.
    One of the few new members who don't post a leeching question on their first post and goes straight to the tutorials!
    Bravo.

    Creds to DannyRS for this wonderful sig!

  5. #30
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    When do you have time to make the walking tutorial? :')

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

    Default

    Quote Originally Posted by Dormik View Post
    When do you have time to make the walking tutorial? :')
    Tbh it's not even worth adding but when I have time I will

  7. #32
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Tbh it's not even worth adding but when I have time I will
    Thanks mate! =')

  8. #33
    Join Date
    Feb 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Hey, I am running into this error:
    Exception in Script: Unable to find file 'srl/srl.simba'

    With this line: {$i srl/srl.simba}

    I don't seem to have the files that are used for srl.simba or something

    What should I do?

  9. #34
    Join Date
    Sep 2012
    Location
    Australia.
    Posts
    839
    Mentioned
    16 Post(s)
    Quoted
    225 Post(s)

    Default

    Quote Originally Posted by Gh0stt View Post
    Hey, I am running into this error:
    Exception in Script: Unable to find file 'srl/srl.simba'

    With this line: {$i srl/srl.simba}

    I don't seem to have the files that are used for srl.simba or something

    What should I do?
    Have you fully installed SRL and Simba? Follow this guide: http://villavu.com/forum/forumdisplay.php?f=351

  10. #35
    Join Date
    Feb 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Chris! View Post
    Have you fully installed SRL and Simba? Follow this guide: http://villavu.com/forum/forumdisplay.php?f=351
    Silly me, I tried to update it the first time I ran it but it must have failed. I restated the program and tried again and it was successful this time.

    Thanks for the quick reply and help anyway! Good to know this forum is active!

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

    Default

    added basic walking

  12. #37
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    What does this do? Is it a failsafe?
    If (TimeFromMark(Counter) > 5000) Then

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

    Default

    Quote Originally Posted by Dormik View Post
    What does this do? Is it a failsafe?
    Yes, if it cannot find it after 5 seconds then it will break the loop

  14. #39
    Join Date
    Feb 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Hello, I am trying to get your program to click a large piece of grey ground just for a test but when I do this nothing happens at all

    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 5395034, 217, 128, 217, 128, 5) then
      begin
        mmouse(x, y,1,1);
        wait(1000);
        ClickMouse(X, Y, mouse_Left)
    
      //  mmouse(x, y,1,1);
      //  wait(1000);
      // ClickMouse(X, Y, mouse_Left)
      end;
    end;
    Begin
    MouseSpeed := 15;
    SetupSRL;
    end.

    Just to clarify:
    Code:
    X, Y, 5395034, 217, 128, 218, 127, 5
    The 217 & 128 are where I want the mouse to click
    & the 218 & 127 are like the peramiters of the 'box' that I want the mouse to click in? Right?

    Sorry for the noob questions.


    Other than that.. What am I doing wrong?

    Thanks for the help.

  15. #40
    Join Date
    Sep 2012
    Location
    Australia.
    Posts
    839
    Mentioned
    16 Post(s)
    Quoted
    225 Post(s)

    Default

    Quote Originally Posted by Gh0stt View Post
    Hello, I am trying to get your program to click a large piece of grey ground just for a test but when I do this nothing happens at all

    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 5395034, 217, 128, 217, 128, 5) then
      begin
        mmouse(x, y,1,1);
        wait(1000);
        ClickMouse(X, Y, mouse_Left)
    
      //  mmouse(x, y,1,1);
      //  wait(1000);
      // ClickMouse(X, Y, mouse_Left)
      end;
    end;
    Begin
    MouseSpeed := 15;
    SetupSRL;
    end.

    Just to clarify:
    Code:
    X, Y, 5395034, 217, 128, 218, 127, 5
    The 217 & 128 are where I want the mouse to click
    & the 218 & 127 are like the peramiters of the 'box' that I want the mouse to click in? Right?

    Sorry for the noob questions.


    Other than that.. What am I doing wrong?

    Thanks for the help.
    You didn't call your procedure ClickTree; in your mainloop.

    Give this a whirl:

    Simba Code:
    1. Program ChopTree;
    2. {$i srl/srl.simba}
    3. Procedure ClickTree;
    4. var
    5.   X,Y:Integer;
    6.  
    7. begin
    8.   if FindColorTolerance(X, Y, 5395034, 217, 128, 217, 128, 5) then
    9.   begin
    10.     mmouse(x, y,1,1);
    11.     wait(1000);
    12.     ClickMouse(X, Y, mouse_Left)
    13.  
    14.   end;
    15. end;
    16.  
    17. begin
    18.   SetupSRL;
    19.   ClickTree;
    20. end.

  16. #41
    Join Date
    Feb 2013
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Chris! View Post
    You didn't call your procedure ClickTree; in your mainloop.

    Give this a whirl:

    Simba Code:
    1. Program ChopTree;
    2. {$i srl/srl.simba}
    3. Procedure ClickTree;
    4. var
    5.   X,Y:Integer;
    6.  
    7. begin
    8.   if FindColorTolerance(X, Y, 5395034, 217, 128, 217, 128, 5) then
    9.   begin
    10.     mmouse(x, y,1,1);
    11.     wait(1000);
    12.     ClickMouse(X, Y, mouse_Left)
    13.  
    14.   end;
    15. end;
    16.  
    17. begin
    18.   SetupSRL;
    19.   ClickTree;
    20. end.
    Ah yes, Thanks. I did try calling the ClickTree process but it was in the wrong place.

    I tried your code, it still did the same thing. But now knowing that it should work I tried something else. (This is what I get for having a old crappy computer D
    I noticed that the game would freeze as the script was being compiled, so it was starting to run the script as the game was frozen, that was making that stuff up.

    Anywho, I just added another wait(2000); above the mmouse and now it works! (With your help too!)
    Thanks once again Chris!

  17. #42
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    When I use something like this:
    If (P06_IsUpTextMultiCustom(['Harpoon','arpoon', 'rpoon'])) Then
    begin
    mouse(x,y,1,1,mouse_left);
    end;
    Then it won't click it. It doesn't give errors or something. What am I doing wrong?
    Last edited by Dormik; 02-12-2013 at 09:57 PM.

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

    Default

    Quote Originally Posted by Dormik View Post
    When I use something like this:

    Then it won't click it. It doesn't give errors or something. What am I doing wrong?
    Did you do SetupSRL; and SetupP06; ?

  19. #44
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Did you do SetupSRL; and SetupP06; ?
    You dont need to use SetupSRL;, do you? I thought it was only for real runescape

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

    Default

    Quote Originally Posted by Dormik View Post
    You dont need to use SetupSRL;, do you? I thought it was only for real runescape
    If I don't add it then Uptext doesn't work for me for some odd reason idk about anyone else.

  21. #46
    Join Date
    Feb 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Program DeskThiever;
    {$i srl/srl.simba}

    Procedure ClickDesk;
    var
    X,Y: Integer;

    begin
    if FindColorTolerance(X, Y, 1356303, 363, 121, 363, 121, 5) then
    begin
    mmouse(x, y, 1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;

    begin
    SetupSRL;
    ClickDesk;
    end.

    __________________________________________________ ___________

    It is successfully executing but not doing anything, could someone please tell me what is wrong?

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

    Default

    Quote Originally Posted by Namedontcare View Post
    __________________________________________________ ___________

    It is successfully executing but not doing anything, could someone please tell me what is wrong?

    First off comment out SetupSRL; you won't need it you just need to include it, second off make sure:

    Simba Code:
    363, 121, 363, 121,)
    Forms a box around the area you want to search, also pick a good color, and a decent tolerance.

  23. #48
    Join Date
    Feb 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm rather new to Simba and I'm wondering how I can check if the inventory is full or not when scripting for RSPS's? (do you have some sort of tip?)
    Also, many of the functions are only usable when scripting for RS right? For example OpenBank etc.
    Thanks in advance!

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

    Default

    You can us count colors

    Simba Code:
    Procedure InterfaceReady;
    var
       X, Y,Count: Integer;
    begin
      Count := CountColorTolerance(128, 6, 345, 496, 458, 15);
      Writeln('Interface:' + IntToStr(Count));
    End;
    Begin
      InterfaceReady;
    End.

  25. #50
    Join Date
    Mar 2013
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    You can us count colors

    Simba Code:
    Procedure InterfaceReady;
    var
       X, Y,Count: Integer;
    begin
      Count := CountColorTolerance(128, 6, 345, 496, 458, 15);
      Writeln('Interface:' + IntToStr(Count));
    End;
    Begin
      InterfaceReady;
    End.

    @ rjj95
    I want to click a bank booth and I have this code

    Code:
    Program SmithingRune2h;
    {$i srl/srl.simba}
    Procedure ClickBank;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 1065811, 256, 155, 256, 155, 5) then
      begin
        mmouse(x, y,1,1);
        wait(250);
        ClickMouse(X, Y, mouse_Left)
      end;
    end;
    Begin
    MouseSpeed := 15;
    SetupSRL;
    end.
    THe problem is the script does not click the bank booth, idk why
    Last edited by Kozs; 03-03-2013 at 04:15 AM.

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