Results 1 to 7 of 7

Thread: GetColor Not Returning Right Color?

  1. #1
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default GetColor Not Returning Right Color?

    Picked colour: 2070783 at (186, 36)


    Simba Code:
    Writeln(IntToStr(GetColor(186, 36)));
    Writeln(IntToStr(GetColor(186, 36+50)));
    Writeln(IntToStr(GetColor(186, 36-50)));

    5000782 NOPE
    3358280 NOPE
    1796428 NOPE

    So what the heck?
    More Info:
    Simba Code:
    {$i SRL/srl.simba}
    {$I P07Include.Simba}
    {$i sps/sps.simba}
    {.Include SRL\SRL\Misc\Debug.simba}





    begin
      SetupP07Include;
      SetupSRL;
      MouseSpeed:=30;
      SetupWalker;
      MarkTime(StartTime);
      SRL_EnableNavBar;


    Yet in my sample script with the EXACT SAME start to the mainloop, it works just fine.

  2. #2
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    Picked colour: 12502726 at (186, 36)

    Writeln(IntToStr(GetColor(186, 36-20))) ;

    12502726

  3. #3
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Quote Originally Posted by x[Warrior]x3500 View Post
    Picked colour: 12502726 at (186, 36)

    Writeln(IntToStr(GetColor(186, 36-20))) ;

    12502726

    Thanks.
    WHY?! What the hell is this -20 stuff.
    Navbar was -50 before.

    Also how come

    Simba Code:
    program Walker;
    {$i SRL/srl.simba}
    {$I P07Include.Simba}
    {$i sps/sps.simba}
    {.Include SRL\SRL\Misc\Debug.simba}



    begin
      SetupP07Include;
      SetupSRL;
      MouseSpeed:=30;
      SRL_EnableNavBar;
      Writeln(IntToStr(GetColor(564, 446)));


    end.

    Works WITHOUT the -20?

    What is the reason I must do -20.

  4. #4
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Thanks.
    WHY?! What the hell is this -20 stuff.
    Navbar was -50 before.

    Also how come

    Simba Code:
    program Walker;
    {$i SRL/srl.simba}
    {$I P07Include.Simba}
    {$i sps/sps.simba}
    {.Include SRL\SRL\Misc\Debug.simba}



    begin
      SetupP07Include;
      SetupSRL;
      MouseSpeed:=30;
      SRL_EnableNavBar;
      Writeln(IntToStr(GetColor(564, 446)));


    end.

    Works WITHOUT the -20?

    What is the reason I must do -20.
    It's because you are calling 07Include THEN SetupSRL

    Swap them around

    (This has also been fixed in the SRL-OSR)

    Forum account issues? Please send me a PM

  5. #5
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Both scripts call the includes and the setups in the same order.
    One works one doesn't. Why :/?
    Thanks though Justin and Warrior.

    I still have to do the -20 even when called in the same order you said Justin.
    I'm just gonna get official SRLOCR.

  6. #6
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    SRL_EnableNavBar;
    setupSRL;


    its the nav bar update (that annoys me like crazy). this will make the coords normal.

  7. #7
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Got SRL OCR from Git.
    Sticking with that now.
    <3


    Quote Originally Posted by masterBB
    You closed the thread before there was a real answer why. IIRC in SRL the difference is set to -20 because the navbar on the inlogscreen is only 20 pixels high. After logging in it is changed to -50, cause rs self got a bigger navbar. The -20 offset is set when you call SetupSRL since you normally start on the loginscreen.

    Gr,
    Bart
    Last edited by YoHoJo; 03-05-2013 at 02:51 PM.

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
  •