Results 1 to 4 of 4

Thread: Small Problem - What's Wrong?

  1. #1
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Exclamation Small Problem - What's Wrong?

    This is a Procedure I'm using in my Hill Giant script... but I have no idea why
    Simba Code:
    Hue := 5.35; // Hue

    Is being highlighted... to be more convenient I have added the whole procedure, but because I am going to apply this for Putonajonny's Scripting Compertition I cannot post the whole script. If you NEED the whole script PM me (Please no 3 post count Registered Users...)

    Simba Code:
    procedure SwagPicker; // Picks Up: Runes (all of them) and Coins (all stacks) -> Working on more
    var
    Col, Hue, Sat, Tol, a, tmpCTS: Integer;
    TPA  : TPointArray;
    ATPA : T2DPointArray;

    begin
      if (WerePoor = True) then // If you selected True up in the Const, then you will be Picking Up Items off of the Ground
        begin // All of this is from ACA Color Finder by Nielsie95 and Sumulion
          case Swag of
            'Runes' : begin // Sorry, but it's just more convenient (linewise) to pick them all up
                        Col := 11711143; // Color
                        Hue := 5.35; // Hue
                        Sat := 0.32; // Saturation
                        Tol := 9; // Tolerance
                      end;

            'Coins' : begin // Whether it be 2GP or 3M it should pick it up...
                        Col := 4905207; // Color
                        Hue := 0.72; // Hue
                        Sat := 4.24; // Saturation
                        Tol := 2; // Tolerance
                      end;
        end; // Until I can get around the finicky Colors of these other Items

        {   'Iron Kite' : begin
                            Col :=
                            Hue :=
                            Sat :=
                            Tol :=
                          end;

            'Stell Helm' : begin
                            Col :=
                            Hue :=
                            Sat :=
                            Tol :=
                           end;

            'Limpwurt Root' : begin
                                Col :=
                                Hue :=
                                Sat :=
                                Tol :=
                              end;

        IN DEVELOPEMENT
        }

      end;

      begin
        if(not(LoggedIn))then Exit; // If you aren't Logged In it Exits (To get to a Multiplayer Change)
        if (invfull) then Exit; // If your Inventory is Full then it Exits (To get to a Banking Loop)
        tmpCTS := GetColorToleranceSpeed; // Gets the CTS
        ColorToleranceSpeed(2); // We click 2 in the ACA Color Finder
        SetColorSpeed2Modifiers(6.91, 6.67); // Hue then Saturation Modifiers

        FindColorsSpiralTolerance(MSCX, MSCY, TPA, Col, MSX1, MSY1, MSX2, MSY2, Tol); // Finds the Swag in the Runescape Mainscreen (Varied Tolerance)
        SortTPAFrom(TPA, Point(MSCX, MSCY)); // Sorts the TPA
        ATPA := TPAtoATPAEx(TPA, 2, 2); // Finds the Swag using a Box of 2x2 Pixels of the same Color

        for a := 0 to High(ATPA) do
        begin
          if (IsUpTextMultiCustom(['ake', 'oins', 'unes'])) then // Multiple possibilities of Uptext for the Swag
          begin
            result := True; // If it finds the Swag then...
            ClickMouse2(False) // Right Clicks rather than Left Clicks
            ChooseOption('ake'); // Chooses the Option 'Take'
            Break; // Straightforward...
            WriteLn('We picked up some Swag!'); // If it doesn't say this, something went wrong
          end;
        end;

        ColorToleranceSpeed(tmpCTS); // Defaults the CTS
        SetColorSpeed2Modifiers(0.22, 0.22); // Resets the Hue and Saturation Modifiers
      end;
    end;

    Thanks for your time!

  2. #2
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Set Hue and Sat variables as Extended, not Integer
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  3. #3
    Join Date
    Jun 2011
    Location
    Anywhere that has WIFI
    Posts
    669
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    Set Hue and Sat variables as Extended, not Integer
    Yep only whole numbers as integers I believe.

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    Set Hue and Sat variables as Extended, not Integer
    and just to expand; if you plan to turn extended values in to integers, use round(..).

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
  •