Hi all,
Thought I would drop my resizable OSRS include here for those that are wanting something to use outside of fixed mode.
A lot of the code came from Aerolib and SRL/OSR (because why reinvent the wheel), so hats off to Flight, Olly and Slacky for that.
The include is pretty straight forward. In order to initiate it, declare it at the top of the script with:
It doesn't require any initiation functions in order to run.
Since it works in resizable, it doesn't have static locations declared like AL and SRL/OSR does. A lot of the locations are calculated using the client dimensions.
A few example functions:
Simba Code:
function GetMSDimensions: TBox; // Outputs a tbox for the bounds of the client
function GetMMBox:TBox; // Outputs a tbox for the bounds of the minimap
function GetChatBox: TBox; // Outputs a tbox for the bounds of the chatbox
function GetMenuBox(MPanel:string): TBox; // Outputs the tbox for the inventory tab
function GetInventoryDimensions: Tbox; // Outputs the tbox for the inventory
function GetOrbAmount(OrbType: string): integer;// Outputs the amount of hp we have left
function GetBankScreenBox(var BankBox:TBox; TabbedBanking:boolean):boolean; // Gets the BankScreenBox if it is visible and stores it into the tbox var. Checks if using tabs or not.
When the box locations are searched for the first time, it will store the locations into a global var, allowing for faster finding in future calls.
An example of how these can be used:
Simba Code:
program new;
{$i Danlib/Danlib.Simba}
var
Col:TColEx;
TPA:TPointArray;
begin
Col.create(0, 0);
if Col.findAllIn(GetMSDimensions, TPA) then
DebugTPA(TPA, '');
end.
Include also supports discord notifications.
Open chat.simba in Danlib\Chat and add your hook URL to line 2.
You can make your own function, or use the functions in Discord.simba in Danlib\Utility
Simba Code:
program new;
{$i Danlib/Danlib.Simba}
var
XpGained:integer;
begin
ScriptName := 'TestExample';
SendDiscordWebhook(FormatDiscordMsg(XpGained, 'Terminated for whatever reason'));
end.
Would output:
Code:
[13:25:43]
__
Script Name: TestExample
Player Name:
Start Time: 01:25:43 PM
Stop Time: 01:25:43 PM
Duration: 0 Seconds
XP Gained: 0
Terminate Reason: Terminated for whatever reason
__
If there is enough interest in this, I will write a few tutorials and add more explanations around each function.
Let me know if you have any questions.
Github link: https://github.com/ImTheNewGuy/Danlib