SRL-6 (Beta) Official Release
Introduction
It is my pleasure to
finally announce the release of the long awaited SRL-6; as you may know, we suffered a major setback after the release of RS3. When we first started structuring and planning SRL-6, this was something we needed to keep in mind — Jagex can (and will) update the game in different ways, and SRL needed to be written in a way that can keep up. With the very dynamic interface structure of SRL-6 we were able to (fairly) quickly update it for RS3. Thank you all for being so patient.
For the first time ever, SRL no longer requires a fixed screen size and safe mode. SRL will now work on any screen size, and in OpenGL graphics mode — it does, however, require a specific interface layout. Until Simba can properly read colors from an OGL client (which is being worked on), SRL will run with SMART only. SMART, however, can be set to open at any dimensions you wish.
A lot has changed, so please take the time to read through my
How to Install/Setup Simba guide. You need at least Simba 1.0. The required extensions, plugins, and fonts should be in the updaters (if not now, very soon).
To Scripters
For you scripters, SRL-6 is written 100% in Lape. You need to keep in mind that not all functions/include files have been moved to SRL-6. We have released enough that you can easily make a working script, but you may need to convert some functions from SRL-5. If you do convert a function(s), please see
A How-to on SRL Development. Lastly, there is a very good chance the function has been renamed and/or combined with another function. If you can't find the function you're looking for, see the
SRL-6 Documentation or post in the
SRL Development Help section before you start doing a lot of work.
To Users
As a script user, you shouldn't notice much of a difference. Actually, apart from the mouse movements and new client size, you shouldn't notice any difference at all. SRL has adopted @
Flight;'s mouse movement routines, which are much more human-like and customizable than the previous methods.
If you plan on using a new script (which I can only assume you will be), there are likely to be a few bugs — as with any new program — so bare with the developers and try to be patient with us. The best you can do to speed up bug fixes is to report the bug at the
SRL Bugs and Suggestions page.
Credits
First things first, a huge thanks goes out to everyone involved in the development of SRL-6 (I apologize if I forget someone). Also, a congratulations to both @
Olly; and @
euphemism; for being promoted to SRL Developers.
For their countless hours and hard work over the last several months:
For their work on Simba and/or Lape to get ready for SRL-6:
For their initial work and discussion of SRL-6 in it's early stages:
And last but not least, @
Brandon; for all his cooperation and development of the OpenGL plugin.
References
These are some helpful links that will give you more information about SRL-6 and Lape:
Scripting with SRL-6
SRL-6 is a complete rewrite. We, of course, recycled code from SRL-5, but it has all been updated (rewritten if needed) and converted to Lape. Keep in mind that A LOT has changed — functions have been added, functions have been removed, and both function and variable names have changed in most cases. It isn't even close to the same include.
You will be able to convert SRL-5 scripts; however, not all SRL-5 functions have been transferred over yet. What we are releasing now is a workable base. We have completed all major requirements - login, gametabs, backback, etc. - but SRL-6 is far from finished. If you want to contribute to SRL, please read
A Basic Guideline to SRL-6 Development.
We
highly recommend you visit the
SRL-6 Documentation page if you plan on writing a script. Also, if you need any help don't hesitate to post in the
Scripting Help forum, join the SRL IRC channel (irc.rizon.net #srl, or click the chat button at the top of the page).
Also, now that we have a player manager (SRL > Player Manager), your DeclarePlayers procedure will look a little different:
Simba Code:
procedure declarePlayers();
begin
players.setup(['Login name', 'or nickname'], 'ThePlayerFileName');
currentPlayer := 0;
with players[0] do
begin
integers[0] := 50;
integers[1] := 25;
booleans[0] := true;
end;
end;
Changes
We have compiled a very detailed list of all the changes that have been made in SRL-6. Brace yourself, there are a lot (and this is only part of the entire include
). SRL has a completely new structure and can best be viewed on Github. There is a good chance something has been forgotten, so don't be alarmed if something isn't exactly like is says below. You can find the detailed list of changes
here.
The list is too long for a release post, so I'm just going to outline the major changes that you'll need to know if you plan on writing a script using the new SRL.
The TRSInterface system and Lape's type functions:
Each file in lib/interfaces/ has it's own type that inherits the TRSInterface type's functions and attributes. This means to interact with the different RS interfaces, you need to do it via the interface's variable (see the "Global Variables" section below).
For example, if you wanted to open the backpack tab, you would call:
Loading SMART at any size:
Simply set the SMART dimension variables:
Simba Code:
smartClientWidth := 1024;
smartClientHeight := 768;
Changes to SRL stats:
Very small change: the variables and functions used in scripts have had a small name change ("_" removed). The new names are statsUsername, statsPassword, statsScriptID, statsCommit(), and statsIncVariable().
Drawing on SMART:
Drawing on SMART is easier than ever, just call a TMufasaBitmap function on the variable, "smartImage". A list of usable functions can be found in
drawing.simba, or in Simba's
tmufasabitmap.pas. You also need to set the variable smartEnableDrawing to true.
Simba Code:
smartEnableDrawing := true;
smartImage.drawBox(minimap.getBounds(), false, clRed);
Global Variables
SRL has many global variables throughout the include, most of which you will be using many times in your scripts. We recommend you get familiar with some of them. They are all, of course, listed in the documentation at the top of their respective files, but here is a convenient list for you.
Variables that should be set before calling setupSRL():
- disableSRLDebug — Disables SRL debugging. Default set to false.
- disableSRLLog — Disables SRL logging. Default set to false.
- disableIPScreenshots — Disables screenshots taken of the users IP address. Default set to false.
- logPath — The path at which SRL log files are saved. Default set to Simba/Includes/SRL-6/logs/.
- smartForceNewClient — Opens a new SMART client each time a script is run. Default set to false.
- smartEnableDrawing — Enables drawing to the variable "smartImage". Default is set to false.
- smartClientWidth — The width of the client SMART loads. Set to 960 pixels by default.
- smartClientHeight — The height of the client SMART loads. Set to 640 pixels by default.
- smartGetJavaPath - Will attempt to find your java path. NOTE: if not using you will must have JRE on your systems path (before JDK if you have it).
- smartShowConsole - Will show the java console for smart.
Variables that can be set/used at any time:
- Colors - There are several color variables in globals.simba you can use for SMART debugging.
- mouseSpeed — The speed at which the mouse moved. Default set to 20.
- SRL_Events — Procedures that can be called throughout SRL, such as on an RS update, or after a player has been logged in.
- smartImage — The variable used to draw on SMART.
- mainScreen — Used to call any mainscreen functions and/or procedures.
- lobby — Used to call any mainscreen functions and/or procedures.
- lobbyWorlds — Used to call any lobbyWorlds functions and/or procedures.
- actionbar — Used to call any actionbar functions and/or procedures.
- minimap — Used to call any minimap functions and/or procedures.
- chatbox — Used to call any chatbox functions and/or procedures.
- conversationBox — Used to call any conversationBox functions and/or procedures.
- bankScreen — Used to call any bankScreen functions and/or procedures.
- pinScreen — Used to call any pinScreen functions and/or procedures.
- options — Used to call any options functions and/or procedures.
- tabBackpack — Used to call any tabBackpack functions and/or procedures.
- tabMelee — Used to call any tabMelee functions and/or procedures.
- tabRanged — Used to call any tabRanged functions and/or procedures.
- tabMagic — Used to call any tabMagic functions and/or procedures.
- tabDefence — Used to call any tabDefence functions and/or procedures.
- tabPrayer — Used to call any tabPrayer functions and/or procedures.
Conclusion
We are very excited to finally have SRL-6 released to the public. Please keep in mind that there will likely be several bugs at first. Please help us out by reporting any bugs you may find. For now, all bugs should be reported in the
SRL Bugs and Suggestions projects page. If you're feeling really ambitious, you can fork the repository and fix the bug yourself, then send a pull request.
If you have any questions about scripting using SRL-6, please post in the
Scripting Help section; if you have any questions about SRL-6 development, please post in the
SRL Development Help forum; if you have any general questions about SRL-6, please post here.
Thanks, and enjoy!
The SRL Development Team