PDA

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



riwu
08-02-2012, 02:32 PM
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 ;)

Brandon
08-02-2012, 03:14 PM
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.

BigFate
08-03-2012, 01:44 PM
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!

Footy
08-03-2012, 02:10 PM
There is a way to manually remove the offset in globals.simba, but Brandon's method is better

riwu
08-03-2012, 02:22 PM
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.


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.

Footy
08-11-2012, 11:49 PM
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! :)

riwu
08-12-2012, 01:37 AM
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.

Footy
08-12-2012, 01:49 AM
Ooh, good point... You win this round!

dzpliu
03-06-2013, 12:33 PM
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...