Results 1 to 16 of 16

Thread: [#44] Recent changes to the Include

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

    Default [#44] Recent changes to the Include

    In response to the March 3rd, 2010 game updates to RS, a few changes to the include have been made noticeable since then.

    GameTab.scar


    Lobby tabs have been added

    SCAR Code:
    function LobbyScreen: Boolean;
    function GetLobbyTab: Integer;
    function LobbyTab(Tab: Integer): Boolean;
    LeaveLobby; //is actually in login

    const
      L_PlayerInfo = 1;
      L_WorldSelect = 2;
      L_FriendsList = 3;
      L_ClanChat = 4;
      L_Options = 5;

    GetMMLevels will not return your constitution level, but rather the number on the minimap.

    However, function HPPercent: Integer; will return your actual percentage.

    Login.scar


    This is a big one.

    Logout will function like the last one, it will take you all the way completely logged out to before the lobby, if you would like to just exit to the lobby you can use ExitToLobby instead.

    I have just recently added LoginPlayerToLob, which will function normally as LoginPlayer but only take you up to the lobby screen. LoginPlayer will still function the same as normal and use LoginPlayerToLob within it. I have also reorganized the login procedure and double checked and tweaked all the fail safes/error checks ect as well as added some new failsafes and features you can read about below.... you will be very satisfied with the current quality of login player.

    WorldSwitcher.scar


    Now officially works with the new update, a new and easy way to switch worlds is by using the new Players[...].WorldInfo in the player record.

    How this works is very simple.

    If you wish to use LoginPlayer like you have in the past without any other details than simply omit all of this below as it will not affect you in anyway

    However, if you wish to switch worlds for players and such I will briefly explain how to use this new system.

    WorldInfo is a TVariantArray and depending on what you put in it, it will select a server to play on.

    There's two ways to use it,

    There first way is to login to a specific world, to do this you will need to set the array length to two, have the first one the members boolean and the 2nd one the world integer.

    SCAR Code:
    Players[0].WorldInfo := [False {True for Members}, 38];

    The other way to do this is to have it login to a random world, to do this you will need to set the array length to three, have the first one members boolean, the 2nd doesn't matter at all so just 0 or -1, and the 3rd one needs to be the PvP boolean (false for no PvP worlds)

    SCAR Code:
    Players[0].WorldInfo := [False, -1, False];

    Then when you call LoginPlayer, it will automatically do all this with the integrated world switcher

    If you wish to make a more custom way, then simply don't ever declare any player's WorldInfo's and use

    SCAR Code:
    LoginPlayerToLob;
    //Custom Stuff
    LoginPlayer;

    If there are any detailed questions to how the system works, there is always the source to look at, as Players[].Member and AllowPVP have not been removed they may still affect how your script runs based on the hierarchy of overrides in the include, if you intend to use PvP worlds I recommend you set AllowPVP := True after SetUpSRL.

    World switcher.scar works slightly different now.

    Just keep in mind the ChangeWorld only takes you to the lobby instead of logging you all the way out, and that SelectWorld will only click the world and not click "Click here to play afterwards"

    Sorry if anything you just read was hard to understand, it's 2 AM and I've been raging/tired because of a few really stupid problems I had doing all this.

    Any feedback would be appreciated, and anyone who can is welcome to edit this thread.

    Cheers

    -IceFire908
    Last edited by Wanted; 03-11-2010 at 01:39 AM.

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

    Default

    Amazing, great work, love it! Great dedication, sleep well sexy.

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Good work!!
    Good to see SRL was on its feet before 72 hours!
    Thanks to anyone who helped

    EDIT: Sleep very well.

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

    Default

    So you got the TVariantArray figured out? Or are you doing something else? Array of Boolean or something? If..then? I can't check because I'm not on a computer, but good work nonetheless. ^^

    And Naum, I'm not trying to sound rude or sarcastic or anything, but do you personally think that we could get to the point of being fully functional from RuneScape updates in 24 hours? (As long as they aren't huge things like RuneTek5 and whatnot.) I'm just wondering because I think that'd be a good way to keep people involved.

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

    Default

    Maybe, if everyone worked together and hard. We were functional withing 24 hours kind of (Login function was working) which is all we really needed to auto.

    Just really depends on the size of the update and the number/speed of people working on it.

    Anything's Possible!

  6. #6
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    When I updated to the latest version, smart now logs in, hangs for about one minute, then says "One minute has passed...". Then it will continue on as normal.

    It wasn't pausing like that for the latest version before this one.


  7. #7
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Why would you allow strings in gametab...?

    Moving this.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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

    Default

    Quote Originally Posted by tarajunky View Post
    When I updated to the latest version, smart now logs in, hangs for about one minute, then says "One minute has passed...". Then it will continue on as normal.

    It wasn't pausing like that for the latest version before this one.
    Simple fix probably, if someone will do it. It worked as far as I tested last night, although it was 2 am.

    Quote Originally Posted by Rasta Magician View Post
    Why would you allow strings in gametab...?

    Moving this.

    ~RM
    Well you called Gametab in Timing.scar, which caused SRL not to compile, and the only way for that work work was to forward about 5 functions, and the consts couldn't be moved so I did an array then called 'inv' which does an InStrArrEx and adds the lowest tab number const so it's consistent with the latest tab numbers. Luke, use the source

  9. #9
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    Simple fix probably, if someone will do it. It worked as far as I tested last night, although it was 2 am.



    Well you called Gametab in Timing.scar, which caused SRL not to compile, and the only way for that work work was to forward about 5 functions, and the consts couldn't be moved so I did an array then called 'inv' which does an InStrArrEx and adds the lowest tab number const so it's consistent with the latest tab numbers. Luke, use the source
    wtf...?

    Just include Timing.scar after Gametab, since none of the others use Timing.scar? And wth didn't compile? I've been running it for ages....

    question remains, why strings? The whole of SRL is moving away from strings! Worst case scenario just stick the consts in globals.scar!

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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

    Default

    Quote Originally Posted by Rasta Magician View Post
    wtf...?

    Just include Timing.scar after Gametab, since none of the others use Timing.scar? And wth didn't compile? I've been running it for ages....

    question remains, why strings? The whole of SRL is moving away from strings! Worst case scenario just stick the consts in globals.scar!

    ~RM

    I just answered why I used strings

    SCAR Code:
    if (InStrArrEx(LowerCase(TheTab), AllTabs, Tab)) then
                       IncEx(Tab, tab_Combat)
                     else
                       Tab := -1;

    I can't put Gametab before timing, I would have to forward like 15 functions into gametab if I did that, you made a committ calling Gametab in timing and this was the only sensible way of fixing it.

    http://bugs.villavu.com/view.php?id=123

    Edit: Well if someone wants to move the tab consts to globals, then do it. The only instance of a string in gametab is the one in Timing.scar
    Last edited by Wanted; 03-10-2010 at 04:52 PM.

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

    Default

    Quote Originally Posted by Rasta Magician View Post
    wtf...?

    Just include Timing.scar after Gametab, since none of the others use Timing.scar? And wth didn't compile? I've been running it for ages....

    question remains, why strings? The whole of SRL is moving away from strings! Worst case scenario just stick the consts in globals.scar!

    ~RM
    Then you have a messed up version of SRL. Everyone including myself couldn't compile SRL after that added GameTab to timing.scar. So the forward was needed as IceFire stated you would need to forward 15 functions if you placed Timing.scar before GameTab.
    (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.

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

    Default

    Quote Originally Posted by tarajunky View Post
    When I updated to the latest version, smart now logs in, hangs for about one minute, then says "One minute has passed...". Then it will continue on as normal.

    It wasn't pausing like that for the latest version before this one.
    I tried as hard as I could to replicate your error. Just a few questions

    1) Tested in SCAR or simba?
    2) Tested from the most logged out as possible, before you click members/free?
    3) Test w/ SMART? without SMART?

    I've tested in SCAR w/ and without SMART and it worked O_o

    I change the TimeFromMark to if ((GetSystemTime - T) > 60000) then .. doubt that changes anything though

    Can anyone else confirm?

    Yea so, I reverted Gametab to only take consts and moved the gameconsts to globals.scar x] already edited it out of the first post

  13. #13
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    This is my ChickenKiller with SCAR, the most logged out possible, after setting it to fixed and low detail manually.

    It's with SMART, on an unsigned client and a non-members world.

    It only seems to happen the first time it logs in. It logs in, sits there for 1 minute, spits out the "one minute has passed..." text, and the continues on as if nothing was out of the ordinary.

    I don't get the "one minute has passed..." text after it logs out and does NextPlayer to log back in.

    It's a minor issue, but hopefully that will help track it down.


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

    Default

    Quote Originally Posted by tarajunky View Post
    This is my ChickenKiller with SCAR, the most logged out possible, after setting it to fixed and low detail manually.

    It's with SMART, on an unsigned client and a non-members world.

    It only seems to happen the first time it logs in. It logs in, sits there for 1 minute, spits out the "one minute has passed..." text, and the continues on as if nothing was out of the ordinary.

    I don't get the "one minute has passed..." text after it logs out and does NextPlayer to log back in.

    It's a minor issue, but hopefully that will help track it down.
    Hmm, low detail? You mean safe mode?

    Tried rev 417 yet?


    The few other people I asked to test reported no problems yet.... hmmm odd.

  15. #15
    Join Date
    Jan 2010
    Location
    Finland
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nevermind, tried redownloading everything and it compiles fine.

    just tried the new world selecting with LoginPlayer and worldinfo declared, it clicks on the favorite world then goes to the scroll bar and says it couldn't find the world and clicks the Click here to play button.
    Last edited by silor; 03-11-2010 at 10:07 AM.

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

    Default

    Quote Originally Posted by silor View Post
    Nevermind, tried redownloading everything and it compiles fine.

    just tried the new world selecting with LoginPlayer and worldinfo declared, it clicks on the favorite world then goes to the scroll bar and says it couldn't find the world and clicks the Click here to play button.
    Delete all your favorite worlds

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
  •