Page 1 of 2 12 LastLast
Results 1 to 25 of 28

Thread: GameTab Fix

  1. #1
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default GameTab Fix

    Well I fixed the procedure GetCurrentTab, I have not tested any other broken functions (I have tested with one, see below), but if I am right, it should fix a chain of broken functions.

    SCAR Code:
    {*******************************************************************************
    function GetCurrentTab: Integer;
    By: ZephyrsFury
    Description: Returns current tab.
    *******************************************************************************}


    function GetCurrentTab: Integer;
    var
      tP: TPoint;
    begin
      if (not LoggedIn) then exit;

      for Result := 1 to 16 do
      begin
        tP.X := 535 + (Result - 1) mod 8 * 30;
        tP.Y := 169 + (Result - 1) div 8 * 298;
        if (GetColor(tP.X, tP.Y) = 3775974) then
          Break;
      end;
      result := result + 20; //SO IT ACTUALLY WORKS WITH THE TABS KTHX
    end;

    Ran this:

    SCAR Code:
    program New;
    {.include SRL/srl.scar}
    begin
      ClearDebug;
      SetupSRL;
      ActivateClient;
      Wait(5000);
      If GetCurrentTab=25 Then
        Writeln('Found it!');
    end.
    Code:
    SRL Compiled in 16 msec
    Found it!
    Successfully executed


    E: InvFull is what was breaking in my script, so I ran this:

    SCAR Code:
    program New;
    {.include SRL/srl.scar}
    begin
      ClearDebug;
      SetupSRL;
      ActivateClient;
      Wait(5000);
      If InvFull Then
        Writeln('Inv full!');
    end.

    Code:
    SRL Compiled in 15 msec
    Inv full!
    Successfully executed
    Mwahaha
    Last edited by Bionicle; 02-02-2010 at 04:47 PM.
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

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

    Default

    He changed a color
    SCAR Code:
    if (GetColor(tP.X, tP.Y) = 3841510) then
    to
    SCAR Code:
    if (GetColor(tP.X, tP.Y) = 3775974) then

    PLEASE tell what you change when you make fixes. Thanks!

    E: What/where exactly is that color from.

  3. #3
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    He changed a color
    SCAR Code:
    if (GetColor(tP.X, tP.Y) = 3841510) then
    to
    SCAR Code:
    if (GetColor(tP.X, tP.Y) = 3775974) then

    PLEASE tell what you change when you make fixes. Thanks!
    My bad ^.^
    Yea, the colour was out, so I ran a MMouse when it searched for the color, changed the For...To...Do loop from 1 To 16 to 1 To 5, and when it hovered over the Inventory tab, i used SCAR to pick out the new colour.
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

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

  5. #5
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Err.. you didnt fix the logout one. I did, its a simple colour change.

  6. #6
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    TabExists() > GameTab() is still broken though.
    Last edited by WhiteShadow; 02-02-2010 at 01:13 AM.

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

    Default

    Quote Originally Posted by WhiteShadow View Post
    TabExists() > GameTab() is still broken though.
    Yeah, TabExists needs a fix also (if its broken), and then GameTab will also work (GameTab uses TabExists).


    Quote Originally Posted by Timer View Post
    Err.. you didnt fix the logout one. I did, its a simple colour change.
    Who said he fixed it? Wat?

  8. #8
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Aha, i see a sneak peek into your next script
    @whiteshadow I'll take a look at those
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

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

    Default

    Quote Originally Posted by bionicle1800 View Post
    Aha, i see a sneak peek into your next script
    @whiteshadow I'll take a look at those
    lolol! . Yap, just need to fix a few little bugs, close to done!

  10. #10
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Err...GameTab and TabExists both work now

    SCAR Code:
    program New;
    {.include SRL/srl.scar}
    begin
      ClearDebug;
      SetupSRL;
      ActivateClient;
      Wait(5000);
      If GameTab(25) Then
        Writeln('Went to inventory tab!');
    end.

    Code:
    SRL Compiled in 15 msec
    Went to inventory tab!
    Successfully executed
    I did a similar thing with the other function, and it worked.
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  11. #11
    Join Date
    Nov 2009
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm, there is a problem with the banking it attempts to click on invtab while the bankscreen is open and no tabs visible..

  12. #12
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by IwriteCode View Post
    Hmm, there is a problem with the banking it attempts to click on invtab while the bankscreen is open and no tabs visible..
    I can't see anything about that atm...but it's late...I'm going to turn in for the night. If it isn't fixed by morning, I'll look into it further .

    ~G'd Night
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  13. #13
    Join Date
    Nov 2009
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bionicle1800 View Post
    I can't see anything about that atm...but it's late...I'm going to turn in for the night. If it isn't fixed by morning, I'll look into it further .

    ~G'd Night
    OK playing around with it abit more it looks like the problem is from the Deposit(slot, toslot, thetype: Integer); procedure.

    nite

  14. #14
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    GameTab and GetCurrent tab works

    Tab Exists does not work for the logged out tab (#37) making LogOut; not work

    SCAR Code:
    program TestSRLGameTab;

    {.Include SRL\SRL.SCAR}

    var
      I: Byte;

    begin
      SetUpSRL;
      ActivateClient;
      Wait(1000);
      for I := 21 to 37 do
      begin
        WriteLn(TabExists(I));
        GameTab(I);
        Wait(RandomRange(500, 800));
        WriteLn(GetCurrentTab);
      end;
    end.

    LoginPlayer/same file stuff works!

    Graphic setting is still buggy from before though -.-

    SCAR Code:
    program TestSRLLogin;

    {.Include SRL\SRL.SCAR}

    begin
      SetUpSRL;
      ActivateClient;
      Wait(1000);
      WriteLn(RSReady);
      NumberOfPlayers(1);
      Players[0].Name := 'zezima';
      Players[0].Pass := 'stillneedsalifeman';
      Players[0].Active := True;
      LoginPlayer;
    end.
    Last edited by Wanted; 02-02-2010 at 04:38 AM.

  15. #15
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Also!

    Jagex just made a very fail update with the banking!

    There are no longer ANY Tabs whilst you are banking... so it is impossible to unequip items and place them into your bank... you have to accordingly un-equip before you even open the bank.

    This is massive retarded... it also messes up banking functions... my script just hovers over the Inventory tab (where it should it be but is missing) and does nothing for the longest time.

    Jagex, why... just why??

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

    Default

    ROFL! I think that's why the "Deposit All Equipped Items" button in the bank also no longer works! Haha

  17. #17
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ExistTab does not work. The way it works is if it doesn't find the background color of the tab, then it assumes that there is a tab there. I was testing with the bank open, where there is no tabs, and it kept coming back true. The color I posted above in the thing i thought would fix it only works for some tabs, as the background is kind of rocky, and has different colors for the different tabs. I am currently getting those colors and will post the fix soon enough

    @Icefire, i think its doing nothing because it is trying to get to the inventory tab, and because ExistTab it broken, it just keeps clicking the inventory tab (or where it should be). This is just a guess, i didn't sort through anything in the SRL include to back it up.
    Last edited by Bionicle; 02-02-2010 at 04:43 PM.
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  18. #18
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Fix'd
    SCAR Code:
    {*******************************************************************************
    function TabExists(Tab: Integer): Boolean;
    By: ZephyrsFury
    Description: Returns True if the Tab exists.
    *******************************************************************************}


    function TabExists(Tab: Integer): Boolean;
    var
      tP: TPoint;
     
    begin
      if (tab < 20) then
      begin
        SRL_Warn('TabExists', 'Tab ' + IntToStr(Tab) + ' is not using the new constants! Please upgrade your script.', warn_AllVersions);
        Exit;
      end;

      if (not(InRange(Tab, Tab_Combat, Tab_LogOut))) then
      begin
        SRL_Warn('TabExists', 'Tab ' + IntToStr(Tab) + ' is not a valid tab number.', warn_AllVersions);
        Exit;
      end;

      if (Tab = tab_LogOut) then
      begin
        Result := (GetColor(753, 6) = 6261404);
        Exit;
      end;

      tP := Point(536 + (Tab - 21) mod 8 * 30, 187 + (Tab - 21) div 8 * 298);
      Result := (GetColor(tP.X, tP.y) <> 4412771);
    end;

    Changed
    SCAR Code:
    if (Tab = tab_LogOut) then
    begin
      Result := (GetColor(753, 6) = 6327197);
      Exit;
    end;
    To (logout 'x' color)
    SCAR Code:
    if (Tab = tab_LogOut) then
    begin
      Result := (GetColor(753, 6) = 6261404);
      Exit;
    end;
    And
    SCAR Code:
    Result := (GetColor(tP.X, tP.y) <> 4478564);
    To (rocky background color of the tabs)
    SCAR Code:
    Result := (GetColor(tP.X, tP.y) <> 4412771);

    Tested on all tabs, first normally where they do exist, and second in the bank where they don't. It works both ways

    E: looks like someone already beat me to it just updated my SRL, this was fixed last night
    Last edited by Bionicle; 02-02-2010 at 04:52 PM.
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  19. #19
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SetGraphics and GameTab are still bugged up (in latest SRL)... it returns Tabs are true when the bank is open, even though they are not. Which causes the script to fail. ExistsItem and MouseItem ect... need something like if (not (BankScreen)) then GameTab(tab_Inv); or just removed gamtab from those functions all together.

    Edit: A fixed TabExists will solve the banking problem.
    Last edited by Wanted; 02-03-2010 at 03:28 AM.

  20. #20
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm finding it really hard to figure out what the status of this problem is.
    Are we positive we know what is causing it or are we just speculating?
    Has anyone fixed it for sure?
    Has anyone tested the fix?
    Has anyone made any changes to SRL to include the fix?
    Should I download these new changes (if they exist), or should I wait for more fixes?

    If we had some sort of a large blinking indicator on the front page that would let everyone know when there has been an update, that would be very helpful. Otherwise, what is the option, just keep doing SVN Update every hour to see if anything has changed? Or paw through 10 different threads trying to find out what is going on?
    I'm not trying to be cynical or a problem-causer, and I certainly would love to contribute to being a part of the solution, but from where I'm sitting all I know is something is broken and I don't know who is really working on the fix, or where to go to find out information, updates, or an ETA on the repair. So if we as a community could find some sort of consensus solution to these issues I'm sure the silent majority would thank you.

    JIM

  21. #21
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    I'm finding it really hard to figure out what the status of this problem is.
    Are we positive we know what is causing it or are we just speculating?
    Has anyone fixed it for sure?
    Has anyone tested the fix?
    Has anyone made any changes to SRL to include the fix?
    Should I download these new changes (if they exist), or should I wait for more fixes?

    If we had some sort of a large blinking indicator on the front page that would let everyone know when there has been an update, that would be very helpful. Otherwise, what is the option, just keep doing SVN Update every hour to see if anything has changed? Or paw through 10 different threads trying to find out what is going on?
    I'm not trying to be cynical or a problem-causer, and I certainly would love to contribute to being a part of the solution, but from where I'm sitting all I know is something is broken and I don't know who is really working on the fix, or where to go to find out information, updates, or an ETA on the repair. So if we as a community could find some sort of consensus solution to these issues I'm sure the silent majority would thank you.

    JIM
    Just update to the latest SRL Open Dev rev and it's all fixed.

  22. #22
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Maybe I was unclear. I know that is what needs to be done, but how am I to know when I need to do it? Do I do it once a month, once a week, once a day, once an hour? It would be nice if there was a better way to inform the "rank and file" when an update was ready for downloading. JMHO.

    JIM

  23. #23
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    Maybe I was unclear. I know that is what needs to be done, but how am I to know when I need to do it? Do I do it once a month, once a week, once a day, once an hour? It would be nice if there was a better way to inform the "rank and file" when an update was ready for downloading. JMHO.

    JIM
    The developer's revision of SRL can be updated a few minutes apart every few minutes for a few hours, depending on how much people add/change/mess up while doing it. So why not just do it when there's an error you have, or even every time you auto (right before it).. It's not like it takes time. And if you have any error, always update SRL before posting.

  24. #24
    Join Date
    Feb 2006
    Location
    Pennsylvania
    Posts
    1,524
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    Maybe I was unclear. I know that is what needs to be done, but how am I to know when I need to do it? Do I do it once a month, once a week, once a day, once an hour? It would be nice if there was a better way to inform the "rank and file" when an update was ready for downloading. JMHO.

    JIM
    It's an open development project which means revisions can be committed at anytime. Rule of thumb: Do an SVN cheackout before each time you need SRL (i.e. each time you run SCAR). Takes 5 seconds....

  25. #25
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @JIM, do you know how to update your SRL? because the way your talking it seems like, for you, it takes a while, like your reinstalling SRL all over.
    Just right click the SRL folder in the includes folder and press SVN update. Sometimes SRL is updated more then once a day, so what I do is every day when i get on my computer I update it, and every time I get off I update it.

    E: TabExists is broken:
    SCAR Code:
    Line 115: [Error] (3762:1): Identifier expected in script C:\Program Files\SCAR 3.23\includes\SRL\SRL\Core\GameTab.scar
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

Page 1 of 2 12 LastLast

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
  •