Results 1 to 8 of 8

Thread: ChooseOption

  1. #1
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default ChooseOption

    I know it is a noob question. But could someone make an example using ChooseOption or other function like this? It's just that it is not working for me... So could anyone do me this?

  2. #2
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Nirvana View Post
    I know it is a noob question. But could someone make an example using ChooseOption or other function like this? It's just that it is not working for me... So could anyone do me this?
    Simba Code:
    if(FindColorTolerance(x, y, 2279655 , MCX1, MCY1, MCX2, MCY2, 32)) then
    begin
      mouse(x, y, 5, 5, false);
      wait(200+random(150));
      WaitOption('e All', 500);
    end;

    edit:


    also you can check or you have that option.
    by
    Simba Code:
    OptionsExist(['e all'], false); // false does nothing if option found it returns TRUE, if you change it to (next line)
    OptionsExist(['e all'], true); // if found option it moves mouse on that option but do not click (i guess) not tested though. still should return true.

    // in both way if not find option returns false

  3. #3
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Well I was doing it correctly I dont know why but it doesn't work for me. I mean the mouse moves but when it is supposed to cchoose the option the script stops. And it says successfully executed.

  4. #4
    Join Date
    Nov 2008
    Location
    Norway, Alesund
    Posts
    924
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Nirvana View Post
    Well I was doing it correctly I dont know why but it doesn't work for me. I mean the mouse moves but when it is supposed to cchoose the option the script stops. And it says successfully executed.
    Hm, Make sure, SRL is included and setupSRL;, is in main section, I have noticed that if you run not from smart sometimes scripts act strange do do things so make sure you run it on smart

    Simba Code:
    program NoName;
    {$DEFINE SMART}
    {$i srl/srl.Simba}  //here
    procedure mainloop;
    var x, y:integer;
    begin
      if(FindColorTolerance(x, y, 2279655 , MSX1, MSY1, MSX2, MSY2, 32)) then
      begin
         mouse(x, y, 5, 5, false);
         wait(200+random(150));
         WaitOption('here', 500);//walk here option
      end;
    end;

    begin
      Smart_FixSpeed := true;//if smart loads quite too long.. :)
      SetupSRL;   //here
      wait(20000); wait 20sec till you manually login.
      repeat
        mainloop; //this will repeat searching for 2279655 color, and if finds it,
    // right clicks it and chooses "walk here"; if starts to walk it works well though..
      until(false);
    end;

    EDIT: didn't tested so don't judge me it's 2AM here, going to sleep though.. if didn't helped i will try to help tomorrow, good night for now

  5. #5
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    What text are you trying to find?

    I find that doing Multiple Options of very small strings works far more often than using longer strings. Sometimes the strings will not be recognized. I couldn't find 'eleport' option but I could find 'ele' and 'port' for some odd reason when I searched for multiple options. So try to split it up like that (whatever text you're finding).
    Currently: Playing OSRS legit until I get bored

  6. #6
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Use WaitOptionMulti.
    example, for attacking:
    Simba Code:
    if not WaitOptionMulti(['ttack', 'tack', 'Att'], RandomRange(300,600)) then
      Writeln('Failed!')
    else Writeln('Success!');
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  7. #7
    Join Date
    Oct 2012
    Location
    Porto, Portugal
    Posts
    218
    Mentioned
    0 Post(s)
    Quoted
    42 Post(s)

    Default

    Sorry didn't reply cuz I have been busy. Thank you all for your reply. I knew the functions and how to use them it just didnt work for some reason. Well I ran the script in smart and worked fine.

    Now Im getting a problem in uptext detection. Sometimes it detects but other times it doesn't even though it is always the same item.

  8. #8
    Join Date
    Jan 2012
    Location
    In A Farm
    Posts
    3,301
    Mentioned
    30 Post(s)
    Quoted
    444 Post(s)

    Default

    Quote Originally Posted by Nirvana View Post
    Sorry didn't reply cuz I have been busy. Thank you all for your reply. I knew the functions and how to use them it just didnt work for some reason. Well I ran the script in smart and worked fine.

    Now Im getting a problem in uptext detection. Sometimes it detects but other times it doesn't even though it is always the same item.
    Why not post the script here...

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
  •