Results 1 to 8 of 8

Thread: Chooseoption not working?

  1. #1
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Chooseoption not working?

    Hey folks,

    Quick question here which may just be me missing something blatantly obvious.

    I've got the following code:
    Simba Code:
    begin
        MouseBox(696, 133, 716, 151, 2);
        Wait(100 + Random(200));
        ChooseOption('ast');
        Wait(100 + Random(50));
        InvMouse(i, 1);
       end;

    That MouseBox is for the summoning button around the minimap. The mouse rolls over the button but will not chooseoption or even right click to chose.

    What am I missing here?

  2. #2
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    You need to have it right click first so something like:

    Mouse(x, y, 2, 2, False);

    or

    ClickMouse2(mouse_right);

    So like this:

    Simba Code:
    begin
        MouseBox(696, 133, 716, 151, 2);
        Wait(100 + Random(200));
        ClickMouse2(mouse_right);
        Wait(200 + Random(200));
        ChooseOption('ast');
        Wait(100 + Random(50));
        InvMouse(i, 1);
     end;
    Current Project: Retired

  3. #3
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    If you're using a wait before and after, why not use a WaitOption function?

  4. #4
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    I believe that's the reason for the MouseBox.. It right clicks for him when the last parameter is set to 2 aka MOUSE_RIGHT.

    ChooseOption has has a bug for weeks where it won't choose the option.. The fix is to do:

    a Repeat loop with a If (NOT ChooseOption) embedded.

    Simba Code:
    Tries:= 0;

    repeat
        MouseBox(696, 133, 716, 151, 2);
        Wait(100 + Random(200));
        if ChooseOption('ast') then
        begin
             Wait(100 + Random(50));
             InvMouse(i, 1);
             break;
        end;
        Inc(Tries);
    until(Tries > 5);
    I am Ggzz..
    Hackintosher

  5. #5
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by ggzz View Post
    I believe that's the reason for the MouseBox.. It right clicks for him when the last parameter is set to 2 aka MOUSE_RIGHT.

    ChooseOption has has a bug for weeks where it won't choose the option.. The fix is to do:

    a Repeat loop with a If (NOT ChooseOption) embedded.

    Simba Code:
    Tries:= 0;

    repeat
        MouseBox(696, 133, 716, 151, 2);
        Wait(100 + Random(200));
        if ChooseOption('ast') then
        begin
             Wait(100 + Random(50));
             InvMouse(i, 1);
             break;
        end;
        Inc(Tries);
    until(Tries > 5);
    But he said it isn't right clicking either, didn't know it was bugged been working fine for me
    Current Project: Retired

  6. #6
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the help, I'll give both options a try when I get home and see how it goes.

  7. #7
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    If it's not right-clicking either, then try replacing MouseBox with
    Simba Code:
    MouseOval(706, 142, 10, 9, mouse_Right);
    GetMousePos(mX, mY);
    Wait(500 + Random(300));
    Mouse(mX, mY, 0, 0, false);
    You'd need to add mX and mY as integers.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  8. #8
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    27
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ClickMouse2(mouse_right);

    Did the trick perfectly.

    Thanks you ridiculously helpful people!

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
  •