Results 1 to 7 of 7

Thread: Is SRL outdated?

  1. #1
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default Is SRL outdated?

    Stuff like FindObj and FindColorSpiralTolerance won't work for me, it just sits and does nothing.

    My procedure:

    Simba Code:
    procedure ChallengeSlave;
    var x,y:integer;
    begin
    ScriptStatus:= 'Challenging the Slave to a friendly duel';
    ProgressReport;
    WriteLn('We are trying to find the Slave.');
    if FindColorSpiralTolerance(x, y, SLAVE_COLOR, MSX1, MSY1, MSX2, MSY2, 10) and IsUpText(SLAVE_USERNAME) then //Check for the Slave's color and if found, makes sure the correct UpText also exists.
    WriteLn('Detected correct colors and UpText.');
    begin
    Mouse(x, y, 0, 0, mouse_Right);
    ChooseOption('hallenge');
    if DidRedClick then //To make sure we actually clicked Challenge.
    begin
    wait(500+random(500)); //Waits a bit for the interface to show up.
    MouseBox(202, 196, 317, 210, mouse_Left); //Will be replaced with a WaitUpText.
    end
    else
    begin
    WriteLn('We failed to find the Slave, retrying in 1sec...');
    wait(1000);
    ChallengeSlave;
    end;
    end;
    end;
    Last edited by KeepBotting; 09-27-2012 at 12:02 AM.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    FindObj generally isn't my favorite favorite function, creating personal / owns functions can be much better. As for FindColorSpiralTolerance, try adjusting your tolerance by increasing it / picking a more accurate color to start searching for.

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Le Jingle View Post
    FindObj generally isn't my favorite favorite function, creating personal / owns functions can be much better. As for FindColorSpiralTolerance, try adjusting your tolerance by increasing it / picking a more accurate color to start searching for.
    No, I mean it doesn't work. Doesn't do anything, doesn't move the cursor or execute any code. It worked fine yesterday.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  4. #4
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Post your code? you probably forgot something like SetupSRL or you didn't put your proc/func in your mainloop.

  5. #5
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by Nebula View Post
    Post your code? you probably forgot something like SetupSRL or you didn't put your proc/func in your mainloop.
    Simba Code:
    procedure ChallengeSlave;
    var x,y:integer;
    begin
    ScriptStatus:= 'Challenging the Slave to a friendly duel';
    ProgressReport;
    WriteLn('We are trying to find the Slave.');
    if FindColorSpiralTolerance(x, y, SLAVE_COLOR, MSX1, MSY1, MSX2, MSY2, 10) and IsUpText(SLAVE_USERNAME) then //Check for the Slave's color and if found, makes sure the correct UpText also exists.
    WriteLn('Detected correct colors and UpText.');
    begin
    Mouse(x, y, 0, 0, mouse_Right);
    ChooseOption('hallenge');
    if DidRedClick then //To make sure we actually clicked Challenge.
    begin
    wait(500+random(500)); //Waits a bit for the interface to show up.
    MouseBox(202, 196, 317, 210, mouse_Left); //Will be replaced with a WaitUpText.
    end
    else
    begin
    WriteLn('We failed to find the Slave, retrying in 1sec...');
    wait(1000);
    ChallengeSlave;
    end;
    end;
    end;
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  6. #6
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Dude.
    What is with the standards.
    D:

    Edit: You check for uptext, without moving the mouse first?

  7. #7
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    Dude.
    What is with the standards.
    D:
    Those are my standards. That's how I read and write code.
    Dunno why, but reading indented stuff hurts my eyes.

    No one ever bothered to teach me standards XD

    Quote Originally Posted by NKN View Post
    Dude.
    Edit: You check for uptext, without moving the mouse first?
    Hmm.
    That seems illogical yeah. But it worked perfectly yesterday.

    And besides, it doesn't do anything.
    Last edited by KeepBotting; 09-27-2012 at 12:06 AM.
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

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
  •