Results 1 to 8 of 8

Thread: ChooseOptionDual

  1. #1
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default ChooseOptionDual

    much the same as the reflection equivalent but in colour

    its quite hard to explain what it does so here is a example

    on fishing spots there are two spots which includes nets and two which include harpoons

    so one might be
    Cage and Harpoon
    the next one might be
    Harpoon and Net

    if there are two spots on top of each other then it could easily get them mixed up
    so you want to choose the harpoon that is on the cage spot, but it could choose the harpoon on the net spot

    what this does is you enter the first and second options (so cage and harpoon) then you can put whether you want it to choose the first option or the second option

    Simba Code:
    function ChooseOptionDual(First, Second: string; FirstOption: Boolean; Action: fnct_ActionOptions): Boolean;
    var
       B: TBox;
       i, H, ii, L, x: Integer;
       T: TPoint;
       Options: array of TOptions;
    begin
      Result := False;
      Options := GetChooseOptions('jack shit');
      if (Length(Options) < 1) then
        Exit;
      H := High(Options);
      for ii := 0 to H-1 do
        If Pos(First, Options[ii].Str) > 0 Then
          If Pos(Second, Options[ii+1].Str) > 0 Then
          begin
            Result := True;
            if FirstOption then
              B := Options[ii].Bounds
            else
              B := Options[ii+1].Bounds
            GetMousePos(T.x, T.y);
            case Action of
              ClickLeft: if PointInBox(T, B) then
                             ClickMouse2(true)
                           else
                             MouseBoxEx(B.x1 + 5, B.Y1, B.x2 - 5, B.Y1 + 5,5, 1);
              Move: if not PointInBox(T, B) then
                      MouseBoxEx(B.x1 + 5, B.Y1, B.x2 - 5, B.Y1 + 5,5, 3);
              Nothing:   begin end;
              else
                srl_warn('ChooseOptionDual', 'ClickRight not a valid click for RS menus!', warn_AllVersions);
            end;
            Exit;
          end;
      B := Options[0].BigBox;//to mmouse away
      if Action <> Nothing then
      begin
        x := Max(B.X1 - 52, 0);
        if x = 0 then
          x := B.X2+10;
        MMouse(x, Max(B.Y1 - 50, 0), 40, B.Y2-B.Y1);
        Wait(200 + Random(100));
      end;
    end;

    ~shut
    Last edited by Shuttleu; 01-20-2012 at 04:13 PM.

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    I don't understand. Why not just do:
    Simba Code:
    WaitUptext('age and Harp', 200);
    ?

  3. #3
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    I don't understand. Why not just do:
    Simba Code:
    WaitUptext('age and Harp', 200);
    ?
    They are on 2 different lines. One above another.

    At fishing guild etc it's like so:
    Cage spot
    Harpoon spot
    Net Spot
    Harpoon spot
    First harpoon does swordfish, 2nd one does sharks. Same names. Different lines.

    Does this work with the "hidden" menu though Shuttleu? The menu that expands when it's too long of a chooseoption?


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Yeah this would be handy for this exactly purpose. I believe, however, N1ke (or whatever his name was) made this in the past. I assume it doesn't work now?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  5. #5
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    yea would be awesome for places like the fishing guild.. for sharks
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  6. #6
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Harry View Post
    They are on 2 different lines. One above another.

    At fishing guild etc it's like so:
    Cage spot
    Harpoon spot
    Net Spot
    Harpoon spot
    First harpoon does swordfish, 2nd one does sharks. Same names. Different lines.

    Does this work with the "hidden" menu though Shuttleu? The menu that expands when it's too long of a chooseoption?
    unfortunately no, but im not too sure how to do it without it being... ugly

    ~shut

  7. #7
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    I think this should be made into array setup (for more just in case). Also with this add to this (or another function) to do hidden menus. Like

    ChooseOptionMany(['fishing spot', 'Cage'], HiddenMenu, FirstOption: boolean): boolean;

    something like that
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  8. #8
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Harry View Post
    They are on 2 different lines. One above another.

    At fishing guild etc it's like so:
    Cage spot
    Harpoon spot
    Net Spot
    Harpoon spot
    First harpoon does swordfish, 2nd one does sharks. Same names. Different lines.

    Does this work with the "hidden" menu though Shuttleu? The menu that expands when it's too long of a chooseoption?
    Oh, I see.

    Quote Originally Posted by Narcle View Post
    I think this should be made into array setup (for more just in case). Also with this add to this (or another function) to do hidden menus. Like

    ChooseOptionMany(['fishing spot', 'Cage'], HiddenMenu, FirstOption: boolean): boolean;

    something like that
    I agree. The "sub-menus" can probably be added in ChooseOptionMultiEx (or maybe not, I'm not sure).

    Are there any other instances this may happen, other than when fishing?

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
  •