Results 1 to 9 of 9

Thread: Coordinate changes and fixing any scripts (including non-RS) for simba 991

  1. #1
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default Coordinate changes and fixing any scripts (including non-RS) for simba 991

    This is a guide explaining the recent coordinate changes due to the Nav bar introduced few weeks ago.

    [History]
    The Nav bar has caused an extra +50 y-coordinate offset to the RS client. The initial temporary fix by Brandon was to just add the offset to all functions, which broke any script that uses hard-coded coordinate. This was reverted in the latest change (simba 991) to just limit the ClientArea instead. The procedure is named as SRL_DisableNavBar and is called in SetupSRL.

    To fix most scripts, all you have to do is to:
    Replace
    Smart_Server := 72;
    Smart_Members := True;
    Smart_Signed := True;
    Smart_SuperDetail := False;
    With
    SRL_SixHourFix := True;
    Smart_FixSpeed := True;
    and if the script has
    {$I SRL/SRL/Misc/PaintSmart.Simba}
    at the top of the script, then replace it with
    {$I SRL/SRL/Misc/SmartGraphics.Simba}
    (credits to Brandon for the info)

    [For Scripters]
    The current fix using SRL_DisableNavBar has led to some inconsistencies in y-coordinate.

    The y-coordinate shown with the color picker or the bottom left of simba is actually 50 pixels more than what the script will end up clicking. eg. Mouse(0,50,0,0,true) will click on (0,100) shown by the coordinate in simba client instead. Hence whenever you manually pick a coordinate, you have to deduct 50 off the y-coordinate for it to click/search within the intended coordinate.

    GetMousePos, will however, return the correct coordinate (which is 50 less than what is shown on bottom right of simba) to click. So u can still safely call GetMousePos.

    Global constants (MSCY etc) also remain as they were and are the correct coordinates (for the script to click/search) after SetupSRL is called.

    You should take note though, the Nav bar does not exist in certain RS screens (eg. the selection screen in Dominion Tower) so you must adapt the coordinates accordingly.

    Non-RS usage:
    For non-RS/private sever scripts, as the 50 offset is not applicable, it may be inconvenient to constantly deducting 50 from the coordinates picked. Hence an easier way would be to not call SetupSRL and just call MouseSpeed := 15; instead.

    Useful links:
    http://villavu.com/forum/showthread.php?t=87258 (instructions on how to update ur simba/srl properly)
    http://villavu.com/forum/showthread.php?t=84334 (more info on the latest SRL)

    Feel free to post below if you are still having problem with simba 991

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    If you have knowlegde of SRL_DisableNavBar, SRL_ResetNavBar and SRL_EnableNav bar, you should add it to the OP as it'll help a lot.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    May 2012
    Location
    UK
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks a lot, this is a useful thread already and if you could add some info on what Brandon said it would be super useful. Just knowing that the color picker adds 50 to the y value has helped me!

  4. #4
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There is a way to manually remove the offset in globals.simba, but Brandon's method is better
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  5. #5
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    If you have knowlegde of SRL_DisableNavBar, SRL_ResetNavBar and SRL_EnableNav bar, you should add it to the OP as it'll help a lot.
    It's pretty mundane stuff so i thought i'd just briefly mention it and just letting them know the final impact of it. For those interested in the details, SRL_ResetNavBar basically calls SRL_EnableNavBar first to reset everything to normal, then SRL_DisableNavBar to set the client area to w/o the nav bar. Limiting the client area will affect all mouse functions, search area etc but as the simba coordinate shown on the btm right/color picker is a 'separate entity' from the functions it is not affected, giving rise to the inconsistencies.

    Quote Originally Posted by Footy View Post
    There is a way to manually remove the offset in globals.simba, but Brandon's method is better
    What do u mean? the constants in globals are now correctly functioning as they were after calling SetupSRL. I guess the primary reason they decide to ignore the 50 pixel rather than adding it to every functions was that it will break every script with hard-coded coordinates. Hopefully the dev will sort up a way to correct the discrepancies between the simba coordinate and the actual executed coordinate.

  6. #6
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For non RS usage, you can just change the offsets to 0 in the globals.simba, then you can use SetupSRL and all the fun stuff that comes with it! It does much more then just set the mouse speed!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  7. #7
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by Footy View Post
    For non RS usage, you can just change the offsets to 0 in the globals.simba, then you can use SetupSRL and all the fun stuff that comes with it! It does much more then just set the mouse speed!
    Then no 1 can use ur script except urself, unless u tell them or use file commands to auto change it, which is much more troublesome.

    Most setups in SetupSRL are official-RS related, like symbol accuracy, fonts etc so usually MouseSpeed is the only thing u need from SetupSRL for non-RS scripts. Another way would be to call 'SRL_EnableNavBar;' after SetupSRL.

  8. #8
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ooh, good point... You win this round!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  9. #9
    Join Date
    Jan 2013
    Posts
    294
    Mentioned
    1 Post(s)
    Quoted
    121 Post(s)

    Default

    omg im so glad i read this thread. i was so confused with using HumanMMouse and HumanMouseBox since their X,Y coordinates doesnt match the coordinate i wan it to be at. This thread alone made me understand how to use them now...

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
  •