Page 3 of 6 FirstFirst 12345 ... LastLast
Results 51 to 75 of 139

Thread: How to script for a RSPS - Beginner level

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

    Default

    Are you searching in the right area?

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

    Default

    Quote Originally Posted by rjj95 View Post
    Are you searching in the right area?
    What do you mean?

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

    Default

    Are the course correct?

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

    Default

    Quote Originally Posted by rjj95 View Post
    Are the course correct?
    I believe so yes, but I didn't get a square or anything like you did....

    Could you refer to this topic please!

    http://villavu.com/forum/showthread.php?t=97750

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

    Default

    Added text/include stuff

  6. #56
    Join Date
    Jan 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Hmmm, my bitmaps don't seem to be being found... would you mind helping here?
    var
    Drop:Integer;
    Procedure DropLog;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 7370637, 555, 214, 727, 459, 5) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Right)
    wait(450);
    if FindBitmapToleranceIn(Drop, X, Y, 555, 214, 727, 459, 145) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    end;



    Begin
    MouseSpeed := 15;
    Drop := BitmapFromString(134, 8, 'meJztlc0NwyAMhRkk9x66REfshV' +
    '0yQdZqo1iyXP88W0ClHoo4OA48Yz4DfT/6frTWttu9X/ZpLO+P54u' +
    '6+qS4Y2pjc9fqWIV5zW6IzGcKiKj+J1InQrY6Na4T+O06rWGR RSij' +
    'rKO5oCSAM40bKaSLAZryMyXSrib/nk1ufuSPaolGSg/b7FezIj8Y4' +
    '0aXbfu8POtx+ZdVtrXnriHKpUKEA6WnCd976el2b7MZu16foE IA/U' +
    'peaRUpgkUiHOt7RIZ3xkXpElFns7hLKfFiXvX1/xqRGVteHaCvPYM' +
    'LiXC1yEfZfTVkOmCk9deJuKUO6h/PjShgHaAZxVUjcaxIk/wyxBtU' +
    'a9Z+');
    Droplog
    FreeBitmap(Drop);
    SetupSRL;
    end.

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

    Default

    Quote Originally Posted by g ked View Post
    Hmmm, my bitmaps don't seem to be being found... would you mind helping here?
    var
    Drop:Integer;
    Procedure DropLog;
    var
    X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 7370637, 555, 214, 727, 459, 5) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Right)
    wait(450);
    if FindBitmapToleranceIn(Drop, X, Y, 555, 214, 727, 459, 145) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    end;



    Begin
    MouseSpeed := 15;
    Drop := BitmapFromString(134, 8, 'meJztlc0NwyAMhRkk9x66REfshV' +
    '0yQdZqo1iyXP88W0ClHoo4OA48Yz4DfT/6frTWttu9X/ZpLO+P54u' +
    '6+qS4Y2pjc9fqWIV5zW6IzGcKiKj+J1InQrY6Na4T+O06rWGR RSij' +
    'rKO5oCSAM40bKaSLAZryMyXSrib/nk1ufuSPaolGSg/b7FezIj8Y4' +
    '0aXbfu8POtx+ZdVtrXnriHKpUKEA6WnCd976el2b7MZu16foE IA/U' +
    'peaRUpgkUiHOt7RIZ3xkXpElFns7hLKfFiXvX1/xqRGVteHaCvPYM' +
    'LiXC1yEfZfTVkOmCk9deJuKUO6h/PjShgHaAZxVUjcaxIk/wyxBtU' +
    'a9Z+');
    Droplog
    FreeBitmap(Drop);
    SetupSRL;
    end.
    Make sure the bitmap is 24-bit when you saved it and make sure its searching in the right area

  8. #58
    Join Date
    Jan 2012
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Wow, come to find out, i was merely a few pixel out of the bitmap's range. Almost quit but finally got it!
    Now my problem is entering text when im "buying x" from a shop. Mind helping me on that one?

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

    Default

    Quote Originally Posted by g ked View Post
    Wow, come to find out, i was merely a few pixel out of the bitmap's range. Almost quit but finally got it!
    Now my problem is entering text when im "buying x" from a shop. Mind helping me on that one?
    SendKeys('25');

  10. #60
    Join Date
    Jan 2012
    Location
    in a galaxy far far away
    Posts
    371
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    Are you searching in the right area?
    yo heres what i have so far, basically the script will turn uncut dragstones into ammys i just nned some help with it stopping at 27.

    Program DTM;
    {$i srl/srl.simba}
    var
    Dragon:Integer;
    Chisel:Integer;
    c:Integer;
    Procedure ClickStone;
    var
    X,Y:Integer;
    begin
    if FindDTM(Dragon, x, y, 554, 230, 732, 479) then
    begin
    mmouse(x, y, 1, 1);
    wait(randomrange(100, 200));
    clickmouse2(mouse_Left);
    wait(randomrange(150, 250));
    end;

    end;

    Procedure ClickChisel;
    var
    X,Y:Integer;
    begin
    if FindDTM(Chisel, x, y, 554, 230, 732, 479) then
    begin
    mmouse(x, y, 1, 1);
    wait(randomrange(100, 200));
    clickmouse2(mouse_Left);
    wait(randomrange(150, 250));
    end;
    end;


    Begin
    SetUpSRL;
    Dragon := DTMFromString('mbQAAAHicY2VgYFBnYWAwB2ItIDYBYkMg3s nEwHACincB8SEg9mTOZTBgcmfwYM5iMGLyYXBmTmFAB6xAzIgF gwEANUAH8Q==');
    Chisel := DTMFromString('mbQAAAHicY2VgYIhnYWBIAuJYIA4D4mAg3s LEwLAViHcD8RkgPgXEepqaDIba2gyqiooMvtrMDJ4azAzYACMW DAYAXd0IBw==');
    repeat
    Clickstone;
    repeat
    begin
    c := c + 1;
    until (c = 27);//will click 27 times
    end;
    ClickChisel;
    until
    FreeDtm(Dragon);
    FreeDtm(Chisel);
    end.
    >:)

  11. #61
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by chief herb View Post
    yo heres what i have so far, basically the script will turn uncut dragstones into ammys i just nned some help with it stopping at 27.

    Program DTM;
    {$i srl/srl.simba}
    var
    Dragon:Integer;
    Chisel:Integer;
    c:Integer;
    Procedure ClickStone;
    var
    X,Y:Integer;
    begin
    if FindDTM(Dragon, x, y, 554, 230, 732, 479) then
    begin
    mmouse(x, y, 1, 1);
    wait(randomrange(100, 200));
    clickmouse2(mouse_Left);
    wait(randomrange(150, 250));
    end;

    end;

    Procedure ClickChisel;
    var
    X,Y:Integer;
    begin
    if FindDTM(Chisel, x, y, 554, 230, 732, 479) then
    begin
    mmouse(x, y, 1, 1);
    wait(randomrange(100, 200));
    clickmouse2(mouse_Left);
    wait(randomrange(150, 250));
    end;
    end;


    Begin
    SetUpSRL;
    Dragon := DTMFromString('mbQAAAHicY2VgYFBnYWAwB2ItIDYBYkMg3s nEwHACincB8SEg9mTOZTBgcmfwYM5iMGLyYXBmTmFAB6xAzIgF gwEANUAH8Q==');
    Chisel := DTMFromString('mbQAAAHicY2VgYIhnYWBIAuJYIA4D4mAg3s LEwLAViHcD8RkgPgXEepqaDIba2gyqiooMvtrMDJ4azAzYACMW DAYAXd0IBw==');
    repeat
    Clickstone;
    repeat
    begin
    c := c + 1;
    until (c = 27);//will click 27 times
    end;
    ClickChisel;
    until
    FreeDtm(Dragon);
    FreeDtm(Chisel);
    end.
    I would have read your code but it wasn't in tags - please post in those as it makes your programs more readable.

  12. #62
    Join Date
    Jan 2012
    Location
    in a galaxy far far away
    Posts
    371
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    yo here

    Simba Code:
    Program DTM;
    {$i srl/srl.simba}
    var
    Dragon:Integer;
    Chisel:Integer;
    c:Integer;
    Procedure ClickStone;
    var
    X,Y:Integer;
    begin
    if FindDTM(Dragon, x, y, 554, 230, 732, 479) then
    begin
    mmouse(x, y, 1, 1);
    wait(randomrange(100, 200));
    clickmouse2(mouse_Left);
    wait(randomrange(150, 250));
    end;

    end;

    Procedure ClickChisel;
    var
    X,Y:Integer;
    begin
    if FindDTM(Chisel, x, y, 554, 230, 732, 479) then
    begin
    mmouse(x, y, 1, 1);
    wait(randomrange(100, 200));
    clickmouse2(mouse_Left);
    wait(randomrange(150, 250));
    end;
    end;


    Begin
    SetUpSRL;
    Dragon := DTMFromString('mbQAAAHicY2VgYFBnYWAwB2ItIDYBYkMg3s nEwHACincB8SEg9mTOZTBgcmfwYM5iMGLyYXBmTmFAB6xAzIgF gwEANUAH8Q==');
    Chisel := DTMFromString('mbQAAAHicY2VgYIhnYWBIAuJYIA4D4mAg3s LEwLAViHcD8RkgPgXEepqaDIba2gyqiooMvtrMDJ4azAzYACMW DAYAXd0IBw==');
    repeat
    Clickstone;
    repeat
    begin
    c := c + 1;
    until (c = 27);//will click 27 times
    end;
    ClickChisel;
    until
    FreeDtm(Dragon);
    FreeDtm(Chisel);
    end.
    >:)

  13. #63
    Join Date
    Jan 2012
    Location
    in a galaxy far far away
    Posts
    371
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    Quote Originally Posted by Le_don View Post
    I would have read your code but it wasn't in tags - please post in those as it makes your programs more readable.
    i did it check it out plzz
    >:)

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

    Default

    @chief herb I would advise you to do a for loop:

    for i := 0 to 26 do

    // stuff here

    So that applied in your main loop would be:

    Simba Code:
    repeat
      for i := 0 to 26 do // this will repeat the next line 27 times
        Clickstone;
      ClickChisel;
    until (false);
    FreeDTM(Dragon);
    FreeDTM(Chisel);
    end.

    If you want to see what count it was on, then you would have to use begin and end after the loop because it is doing more then 1 line like so:

    Simba Code:
    repeat
      for i := 0 to 26 do // this will repeat the things inside of begin and end 27 times
      begin
        Writeln('Count ' + ToStr(i));
        Clickstone;
      end;
      ClickChisel;
    until (false);
    FreeDTM(Dragon);
    FreeDTM(Chisel);
    end.

  15. #65
    Join Date
    Jun 2012
    Posts
    6
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    What do I add to my script after I have implemented your function, all I have is your function substituted with my font file name. What do i do now, I'm trying to use the custom font for uptext to find a magic tree then click it.

  16. #66
    Join Date
    Jan 2012
    Location
    in a galaxy far far away
    Posts
    371
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    @Officer Barbrady

    ive never used them before and my bad



    please hurry with tpa rewrite yo <3
    >:)

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

    Default

    @chief herb Use mention tags please instead of quoting a massive block lol


  18. #68
    Join Date
    Aug 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    I'm trying to code a stall stealer on a server called ultimatescape. Problem is, no matter how hard I try to get the coordinates right..
    I can't get it to click. Will you help me?

  19. #69
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Quote Originally Posted by Leekeleek View Post
    I'm trying to code a stall stealer on a server called ultimatescape. Problem is, no matter how hard I try to get the coordinates right..
    I can't get it to click. Will you help me?
    If you would post your script or atleast some of the code . we will be able to help, but we can't help unless you show us the problem really :P

    Does it just need to Click one spot? You using mousebox? or Colour or TPA's? We need to know stuff like that. Post some code and i can try to help

  20. #70
    Join Date
    Aug 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    I'm using colour, I want it to click a stall. I don't think I'm putting in the coordinates properly. I get the colour after the X and Y, and then I put the two coordinates underneath,
    then I go to the spot right next to it and put the other 2 X Y coordinates and nothing happens once I execute. I have to rewrite it cause I deleted it, I got mad cause it didn't work but it was only the script skeleton in the tutorial changed a tiny bit :P

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

    Default

    Quote Originally Posted by Leekeleek View Post
    I'm using colour, I want it to click a stall. I don't think I'm putting in the coordinates properly. I get the colour after the X and Y, and then I put the two coordinates underneath,
    then I go to the spot right next to it and put the other 2 X Y coordinates and nothing happens once I execute. I have to rewrite it cause I deleted it, I got mad cause it didn't work but it was only the script skeleton in the tutorial changed a tiny bit :P
    FindColorTolerance(x, y, color, X1, Y1, X2, Y2, TOL)

    X1 and Y1 are the x and y coords of the top left corner
    X2 and Y2 are the x and y coords of the bottom right corner

    can you also post some code that your using?

  22. #72
    Join Date
    Aug 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    yeah one second i'll edit this hold up i'll remake it. I'm going to try to use ACA

  23. #73
    Join Date
    Aug 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Code:
    Program StealStall;
    {$i srl/srl.simba}
    Procedure ClickStall;
    var
      X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 9464458, 169, 298, 192, 310, 5) then
    begin
    mmouse(x, y,1,1);
    wait(250);
    ClickMouse(X, Y, mouse_Left)
    end;
    end;
    Begin
    MouseSpeed := 15;
    SetupSRL;
    end.

  24. #74
    Join Date
    Aug 2013
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    K forget about above code.
    How come this isn't looping properly what I have written now.
    I can't get the shit to stop. I coded this absolute garbage up without the tutorial because I couldn't understand how to properly put the coordinates in..
    I tell it to only click 28 times, and it just goes on forever. Is there a easier way of looping it until inventory is full?

    Code:
    program LeekSpice;
    {$define sr15}
    {$loadlib sps}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    
    var
    i: Integer;
    c: Integer;
    Procedure StealSpice;
    var
    x, y: Integer;
    begin
    FindColorTolerance(x, y, 1095691 , MSX1, MSY1, MSX2, MSY2, 5);
    Mouse(x, y, 0, 0, True);
    end;
    
    Begin
    SetUpSRL;
    repeat
    for i := 0 to 27 do
    StealSpice;
    until (false);
    end.
    Last edited by Leekeleek; 08-04-2013 at 08:51 PM.

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

    Default

    Quote Originally Posted by Leekeleek View Post
    K forget about above code.
    How come this isn't looping properly what I have written now.
    I can't get the shit to stop. I coded this absolute garbage up without the tutorial because I couldn't understand how to properly put the coordinates in..
    I tell it to only click 28 times, and it just goes on forever. Is there a easier way of looping it until inventory is full?

    Code:
    program LeekSpice;
    {$define sr15}
    {$loadlib sps}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    
    var
    i: Integer;
    c: Integer;
    Procedure StealSpice;
    var
    x, y: Integer;
    begin
    FindColorTolerance(x, y, 1095691 , MSX1, MSY1, MSX2, MSY2, 5);
    Mouse(x, y, 0, 0, True);
    end;
    
    Begin
    SetUpSRL;
    repeat
    for i := 0 to 27 do
    StealSpice;
    until (false);
    end.
    It's doing it infinite times because you have

    repeat
    for i := 0 to 27 do
    StealSpice;
    until (false);
    end.

    repeat until false

    that's a infinite loop

Page 3 of 6 FirstFirst 12345 ... 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
  •