1. ## AeroLib Include

Version: 2.1
Revision: 1
Last updated: January 27, 2018

GitHub project page

Introduction

The AeroLibrary is designed to aid scripters in writing Simba scripts for Oldschool RS. Based off the SRL-OSR include, I began this simply as a collection of all my modifications implemented throughout, and over time it formed into something completely different. This particular include uses many ideas which could not be included in SRL-OSR as well as numerous revived bits of code.

What to expect

The most obvious is none of the current SRL-OSR scripts will work and it will take some time to update your scripts to run off AeroLib, but I fully intend to write tutorials covering each and every area. There's a lot to explain so please bear with me! Also keep in mind this is only the initial release of AeroLib, it is simply a base only. The advanced updates are yet to come but will be actively worked on.

Features

Major

Minor

Core
• Realistic mouse-movements throughout the entire include
• Gametabs reworked with the newest in-game interface
• World-switcher (in-game)
• MiniMap routines reworked (some basic map-walking included)
• Animation-handling through pixel-shift
• Basic anti-bans
• Basic banking routines + handling in both standard & tabbed bank modes
• Standard breaking (by Echo_)
• Chat-handling & NPC talking
• Basic interface handling
• Menu-handling (also built from scratch, handled correctly)
• Text & OCR (mostly taken from past SRL includes)
• Timing functions for optimizing script speeds

Requirements

• Newest Simba (I recommend Simba 1.2-rc6 32-bit version)
• Plugins: SMART 8.5+, RSText, Layer
• All newest font files for OSRS (generally included with '07' in their names)
• WorldListChars07 font set for version 2.1+

 Administrator's Warning: AeroLib is currently not maintained and could be outdated/broken

How to install

Step 1:
First off download & install the newest Simba, this must be done before anything. Once installed go ahead and switch the interpreter to Lape.

Step 2:

Step 3:

Step 4:
If using AeroLib 2.1+ (hopefully everyone by this point), download WorldListChars07 and (the new) StatChars07 font set from above, place the zipped files in Simba's Fonts directory and for each set choose "Extract to WorldListChars07/" / "Extract to StatChars07/" respectively. You'll probably be asked if you'd like to overwrite the previous files in "StatChars07", select Yes to replace your old with the updated fonts.

Step 5:
Run the test script, if you've followed the steps correctly this will compile and run without errors.
Simba Code:
program RUNME;{$DEFINE SMART}{$DEFINE WALKER}{$i AeroLib/AeroLib.Simba}begin initAL();end. Tutorials F.A.Q. [Q]: I get an 'Access Violation' error when using this with the OSR-Reflection include [A]: This is caused by the 'ProSocks' plugin being loaded twice. A quick solution is to remove the plugin-loading code from the Reflection include by deleting these 3 lines from Includes > Reflection > lib > misc > Misc.Simba: Simba Code: {$IFNDEF Aerolib}  {$loadlib prosocks}{$ENDIF}

[Q]: AeroLib cannot find Java to spawn SMART
[A]: This is most likely caused by Java being installed in the wrong spot on 64-bit operating systems, or the wrong version of Java. This can be solved by installing 32-bit Java JRE (newest) to your 32-bit Programs directory (C:/Program Files (x86)/Java/). Also don't forget to set your Path with your Java's 'bin' directory. For example, you have JRE 1.8.0_65 installed, you'd set your path to:
Code:
C:\Program Files (x86)\Java\jre1.8.0_65\bin
...along with whatever else you have there. And don't forget to always run Simba as administrator!

End note

I'd like to start off with apologizing for the long delay of releasing this, believe it or not it's been in (slow) development since last year. Now as I stated before this is just the base of which I'll be building off of but for now that's all I'm aiming for. More advanced content and major updates will follow in the future that should truly make AeroLib unique. This project is welcome to new ideas and suggestions so if you'd like to see something added or adjusted don't be afraid to inform me. The project will always be free for everyone, I just ask you recognize all the effort which has gone into making this, not just from what I've personally added but from all the SRL developers, as much of this library is based off the original work of the SRL Developers. With all of that out of the way I'd like to assure you that basic tutorials are on the way of writing scripts with AL, although many scripters I imagine will just need to skim through the include a couple times to get the feel of everything; it's really simple and organized for this reason.

Following AeroLib 2.0+, the auto-updater is disabled; I will only manually update the include. So occasionally return to this thread to check if AeroLib has received an update.

Cheerz,
~Flight
Last edited by Justin; 04-07-2019 at 03:22 AM. Reason: Added warning about being outdated

2. -Reserved post, just in case.

3. Get latest simba.
Open a socket.
Query github file for version number.
Unzip the file using: https://github.com/MerlijnWajer/Simb...301432cab5R144

Bam! updater complete.

4. Gratz on release flight!

5. Originally Posted by Brandon
Get latest simba.
Open a socket.
Query github file for version number.
Unzip the file using: https://github.com/MerlijnWajer/Simb...301432cab5R144

Bam! updater complete.
I don't think it is hosted on github or google code though. There isn't a version control system in place at all when I look at it.

But this looks awesome! Good job! Just wondering, what made you pick pascalscript over lape?

6. SRL Junior Member
Join Date
Feb 2012
Location
UK
Posts
910
Mentioned
10 Post(s)
Quoted
191 Post(s)
Congrats on the release! Seems like a long time coming, but great to see it's here now. Excellent work, will look at it more later.

7. Gratz on release, I was wonder when this would finally come out

8. Originally Posted by masterBB
I don't think it is hosted on github or google code though. There isn't a version control system in place at all when I look at it.

But this looks awesome! Good job! Just wondering, what made you pick pascalscript over lape?
Just a version-checker via Pastebin. The include does run in Lape and requires Simba's interpreter set to Lape, but obviously not everything is in that format; is that what you're referring to? Believe me, my intentions are to encourage people to use Lape over PS.

9. Yey, was about time :P I am going to make a slight change (adding a {$IfNDef AeroLib}) to SimbaExt, so it's compatible with AeroLib. Theres only like 3 functions that does not get along.. TBox.Width, TBox.Height and ToBox, and those I can if-def out. Your TBox.Width, and TBox.height is incorectly defined. Simba Code: Function TBox.Width: Integer;Begin Result := Abs(Self.X2 - Self.X1);End;Function TBox.Height: Integer;Begin Result := Abs(Self.Y2 - Self.Y1);End; Where it should be 1px larger, and Abs() is not needed, as X2, and Y2 should always be larger then or equal to X1,Y1. Simba Code: function TBox.Width(): Int32;begin Result := (Self.X2 - Self.X1 + 1);end;function TBox.Height(): Int32;begin Result := (Self.Y2- Self.Y1 + 1);end; I think you should Github AeroLib. Edit: found it: https://github.com/J-Flight/AeroLib 10. Originally Posted by Flight ... ~Flight Beautiful release, @Flight - fantastic work mate! Need to take a little closer look at AeroLib soon. -Jani 11. This is a really cool idea and has some excellent plans...but, doesn't it make more sense to just update osr-srl with this stuff? 12. I agree with mormanman but anyway.. here's a sample updater.. Install: http://nala.villavu.com/downloads/ma...i386-win32.exe to use it.. It downloads your github repo to Simba's includes as a zip file. It unzips it and deletes the zip file. Checks if newer versions exists or not. If it doesn't it'll download it otherwise it won't. If no version exists, it installs it fresh. Works for any and all repos. If an error occurs, it calls onUpdateComplete with Success set to false and Error string set to the error description. Otherwise it calls it with Success set to true and Error set to "Success". Simba Code: Procedure onUpdateComplete(Success: Boolean; Error: String);begin if (Not Success) then writeln('An error occurred: ' + Error) else writeln(Error);end;Procedure Update(GitURL: String; VersionFile: String; onComplete: Procedure(Success: Boolean; Error: String));const GitHead = 'https://github.com/'; RawGitHead = 'https://raw.githubusercontent.com/'; MasterHead = 'https://codeload.github.com/'; MasterFoot = '/zip/master';var hFile, hZip, I, J, P: Integer; ZipData: String; RepoName, VersionPath: String; Version, Error, GitVersion: String; Label DownloadLabel;Begin P := -1; For I := 1 To Length(GitURL) Do If (GitURL[I] = '/') Then P := I + 1; If (P <> -1) Then Begin RepoName := Copy(GitURL, P, Length(GitURL) - P + 1); VersionPath := IncludePath + RepoName + '\' + VersionFile; If (Not FileExists(VersionPath)) Then Goto DownloadLabel; hFile := OpenFile(VersionPath, True); If (hFile = -1) Then Begin onUpdateComplete(False, 'Cannot Open File: ' + VersionPath); Exit; End; SetLength(Version, 10); If (Not ReadFileString(hFile, Version, 5)) Then Begin CloseFile(hFile); onUpdateComplete(False, 'Cannot Read File: ' + VersionPath); Exit; End; If (Length(Version) < 1) Then Begin CloseFile(hFile); onUpdateComplete(False, 'File: ' + VersionPath + ' is empty.'); Exit; End; GitVersion := Copy(GitURL, Length(GitHead) + 1, Length(GitURL) - Length(GitHead) + 1); GitVersion := RawGitHead + GitVersion + '/master/' + VersionFile; VersionPath := GitVersion; GitVersion := Trim(GetPage(VersionPath)); If ((Length(GitVersion) < 1) or (GitVersion = 'Not Found')) Then Begin CloseFile(hFile); onUpdateComplete(False, 'File: ' + VersionPath + ' is empty or does not exist.'); Exit; End; If (GitVersion <> Version) Then Begin onUpdateComplete(True, 'Already up-to-date.'); Exit; End; DownloadLabel: ZipData := Copy(GitURL, Length(GitHead) + 1, Length(GitURL) - Length(GitHead) + 1); ZipData := GetPage(MasterHead + ZipData + MasterFoot); hZip := RewriteFile(IncludePath + RepoName + '.zip', False); If (hZip <> -1) Then Begin If (Not WriteFileString(hZip, ZipData)) Then Begin onUpdateComplete(False, 'Cannot write archive.'); Exit; End; If (hFile <> 0) Then CloseFile(hFile); CloseFile(hZip); UnzipFile(IncludePath + RepoName + '.zip', IncludePath); DeleteFile(IncludePath + RepoName + '.zip'); RenameFile(IncludePath + RepoName + '-master', IncludePath + RepoName); onUpdateComplete(True, 'Successfully updated.'); Exit; End Else Begin If (hFile <> 0) Then CloseFile(hFile); If (hZip <> 0) Then CloseFile(hZip); onUpdateComplete(False, 'Cannot open archive.'); Exit; End; If (hFile <> 0) Then CloseFile(hFile); End;End;begin Update('https://github.com/J-Flight/AeroLib', 'VERSION', @onUpdateComplete);end. Last edited by Brandon; 05-17-2014 at 09:57 PM. 13. Looks cool! I'll check it out sometime! 14. Okay, the problem is replacing this with the srl-osr include would break every single script.. including reflection scripts. IMO: Reflection include should be "standalone" - not require any other includes. SRL-OSR - should be re done in srl-6 style.. (object oriented) etc. That's if I had my own way and no scripts were released. Back to the point Flight good job, really nice as always.. you should have done it object oriented though! 15. Originally Posted by slacky Yey, was about time :P I am going to make a slight change (adding a {$IfNDef AeroLib}) to SimbaExt, so it's compatible with AeroLib. Theres only like 3 functions that does not get along.. TBox.Width, TBox.Height and ToBox, and those I can if-def out.

Your TBox.Width, and TBox.height is incorectly defined.
Simba Code:
Function TBox.Width: Integer;Begin  Result := Abs(Self.X2 - Self.X1);End;Function TBox.Height: Integer;Begin  Result := Abs(Self.Y2 - Self.Y1);End;

Where it should be 1px larger, and Abs() is not needed, as X2, and Y2 should always be larger then or equal to X1,Y1.
Simba Code:
function TBox.Width(): Int32;begin  Result := (Self.X2 - Self.X1 + 1);end;function TBox.Height(): Int32;begin  Result := (Self.Y2- Self.Y1 + 1);end;

I think you should Github AeroLib.
Edit: found it: https://github.com/J-Flight/AeroLib
I'll make those changes right away. I'm not sure where I got those functions from however. Thank you for catching that!

Originally Posted by tls
This is a really cool idea and has some excellent plans...but, doesn't it make more sense to just update osr-srl with this stuff?
The differences between the two is far too many. And much of this include is using my a lot of my own style and preference, I surely didn't not want to force everyone else to have to use something that I personally claim as "the right way to do it". That's my reasoning for starting this.

Originally Posted by Brandon
I agree with mormanman but anyway.. here's a sample updater.. Install: http://nala.villavu.com/downloads/ma...i386-win32.exe to use it..

It downloads your github repo to Simba's includes as a zip file. It unzips it and deletes the zip file. Checks if newer versions exists or not. If it doesn't it'll download it otherwise it won't. If no version exists, it installs it fresh. Works for any and all repos. If an error occurs, it calls onUpdateComplete with Success set to false and Error string set to the error description. Otherwise it calls it with Success set to true and Error set to "Success".
Wonderful! Thanks to masterBB I've gotten around a snag on Github and I'll be able to keep that repo updated, so your updater method will work beautifully. I'm kinda booked for today but if I've time this evening I'll begin working on that, as well as Slacky's fixes. Thank you very much Brandon.

Originally Posted by Olly
Okay, the problem is replacing this with the srl-osr include would break every single script.. including reflection scripts.

IMO:

Reflection include should be "standalone" - not require any other includes.
SRL-OSR - should be re done in srl-6 style.. (object oriented) etc.

That's if I had my own way and no scripts were released.

Back to the point Flight good job, really nice as always.. you should have done it object oriented though!
Breaking scripts is hardly the issue to worry about, I just feel the include is too custom to be what people officially use in Simba for creating and running OSR scripts. I like the idea of it being optional, however my own scripts, from here on out, will require this no doubt. Reflection scripts should be an issue because I'm assuming that include can quickly be modified to compile & run in Lape as well, while excluding a complete overhaul. And I absolutely agree with you about the reflection include, how it should be standalone as well, just as AeroLib is.

And yes... I know it's not all in the standard Lape format, infact very little is, but I tried to use what little knowledge of Lape I have throughout the include. If you've some obvious modifications that compile and run just fine do pass them along Olly, and I'll test them myself and push them to Github.

Also thank you all very much for the positive feedback, it really means a lot to me. I was nervous of what everyone would think, haha...

16. SPS... I have not seen that combination of letters for quite some time. Oh the joys of spending hours trying to custom make a map, then ending up on the other side of runescape after calling a simple sps_walktopoint. Flag problem after flag problem later, you can finally semi-navigate the trenches of gielinor without having to failsafe with radial-walking just to move a few screens away to bank your fish. The minimap never ever matches the compass direction, so when sps finally does return a position other than (-1,-1) , it's never accurate, always a solid 4-5 tiles off (or a few thousand tiles because fuck you, i'm sps, the alkharid desert looks the same as the grand tree to me). But then the real fun shit happens. That custom map you just spent all night working on? Worthless. Jagex likes to mess with the brightness of the minimap. One second it's bright and the next second it's dark. So you have to change sps_tolerance to a ridiculously high number while also adjusting sps_accuracy just to compensate. Then you get in an endless bounty hunt for that holy grail of accuracy and tolerance combination, which never actually comes but depresses you for days upon days until you finally give up. nowadays it's just r_walktotilemm.
Last edited by Nebula; 05-18-2014 at 06:56 AM.

17. Originally Posted by Nebula
SPS... I have not seen that combination of letters for quite some time. Oh the joys of spending hours trying to custom make a map, then ending up on the other side of runescape after calling a simple sps_walktopoint. Flag problem after flag problem later, you can finally semi-navigate the trenches of gielinor without having to failsafe with radial-walking just to move a few screens away to bank your fish. The minimap never ever matches the compass direction, so when sps finally does return a position other than (-1,-1) , it's never accurate, always a solid 4-5 tiles off (or a few thousand tiles because fuck you, i'm sps, the alkharid desert looks the same as the grand tree to me). But then the real fun shit happens. That custom map you just spent all night working on? Worthless. Jagex likes to mess with the brightness of the minimap. One second it's bright and the next second it's dark. So you have to change sps_tolerance to a ridiculously high number while also adjusting sps_accuracy just to compensate. Then you get in an endless bounty hunt for that holy grail of accuracy and tolerance combination, which never actually comes but depresses you for days upon days until you finally give up. nowadays it's just r_walktotilemm.
I must have done something right then because my SPS works very smooth with custom maps. I've a tool (which I'm still ironing out) for taking snapshots of the minimap and saving, at the moment, 9 perfectly sized map pieces to a bitmap to help make creating custom SPS maps easier. Also, Monkfishies has been using a light and dark version of a custom SPS map to handle all the walking throughout the Fishing Colony; you're welcome rag on SPS if you like but I've fished well over 400,000 Monkfish with it, and counting. I'd invite you to try out the version in AeroLib but I don't see that happening; that's fine.

18. Originally Posted by Flight
I must have done something right then because my SPS works very smooth with custom maps. I've a tool (which I'm still ironing out) for taking snapshots of the minimap and saving, at the moment, 9 perfectly sized map pieces to a bitmap to help make creating custom SPS maps easier. Also, Monkfishies has been using a light and dark version of a custom SPS map to handle all the walking throughout the Fishing Colony; you're welcome rag on SPS if you like but I've fished well over 400,000 Monkfish with it, and counting. I'd invite you to try out the version in AeroLib but I don't see that happening; that's fine.

19. You can see that video in 2 different ways..

20. Here's the only thing I don't really like

You have Interfaces[BANKSCREEN].isVisible(); Yet then you have like getBankMode(). Would have been nicer to have something like Interfaces[BANKSCREEN].getMode(); or even better, bankScreen.getMode() etc.

Regardless like you've said it's a very custom include to your liking, and that's fine

I might have a go at some random solvers once I get a new version of srl-6 + Simba pushed.. I know I said this before but I got bored pretty quickly!

21. Originally Posted by Olly
Here's the only thing I don't really like

You have Interfaces[BANKSCREEN].isVisible(); Yet then you have like getBankMode(). Would have been nicer to have something like Interfaces[BANKSCREEN].getMode(); or even better, bankScreen.getMode() etc.

Regardless like you've said it's a very custom include to your liking, and that's fine

I might have a go at some random solvers once I get a new version of srl-6 + Simba pushed.. I know I said this before but I got bored pretty quickly!
I'll keep that in mind, that's probably the best way to go. Yeah I'm always welcoming assistance with the random-solvers. If you even have some ideas drop me a line, perhaps I've already some input as well.

22. Gratz on release, Flight
Wow, what an impressive include! I'm gonna spend some time looking at it all, but I'd just like to say thanks for the effort first. I know your mouse functions were very focused on being human-like and I respect that. Looks like a great release! Good luck with the include, I'm sure a lot of people have been looking forward to this

23. Has anyone at all tested this include? Because there's someone who's having a plugin-related error with my Catherby Cooker script and I'd like to know if it's a flaw in the plugin or if it's a user error. I don't want to release any more scripts/updates until I've gotten this sorted out.

It's a shame, I've already updated the world list and implemented some experimental mods to SPS and I'd like to get it out there ASAP.

24. Oh, really cool that you released this after all. While I don't do OSR I've heard great things about this, congratulations on release!

25. I love this include, thank you so much for sharing this.