Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {==============================================================================]
- | M A S S I V E • S C A R • S C R I P T I N G • L I B R A R Y |
- |==============================================================================|
- | ___ ___ ___ ___ |
- | /\__\ /\ \ /\ \ /\__\ |
- | / | | / \ \ / \ \ / / / |
- | / | | | / /\ \ \ / /\ \ \ / / / |
- | / /| |__|__ _\ \ \ \ \ _\ \ \ \ \ / / / |
- | / / | \__\ /\ \ \ \ \__\ /\ \ \ \ \__\ / /__/ |
- | \/__/--/ / / \ \ \ \ \/__/ \ \ \ \ \/__/ \ \ \ |
- | / / / \ \ \ \__\ \ \ \ \__\ \ \ \ |
- | / / / \ \/ / / \ \/ / / \ \ \ |
- | / / / \ / / \ / / \ \__\ |
- | \/__/ \/__/ \/__/ \/__/ |
- | |
- |==============================================================================|
- | ::::::::::::::::: V E R S I O N 0.84 B E T A :::::::::::::::: |
- [==============================================================================}
- {$IFNDEF SCAR335_UP}
- {$ERROR [MSSL] Please update your copy of SCAR to version 3.35[+]}
- {$ENDIF}
- {==============================================================================|
- MSSL Core Level-1 Includes
- Data and Mathematics Routines.
- [==============================================================================}
- {$I Library\Core\Level-1\Miscellaneous.scar}
- {$I Library\Core\Level-1\Math.scar}
- {$I Library\Core\Level-1\Measuring.scar}
- {$I Library\Core\Level-1\Integer.scar}
- {$I Library\Core\Level-1\Extended.scar}
- {$I Library\Core\Level-1\Char.scar}
- {$I Library\Core\Level-1\String.scar}
- {$I Library\Core\Level-1\Boolean.scar}
- {$I Library\Core\Level-1\Variant.scar}
- {$I Library\Core\Level-1\Box.scar}
- {$I Library\Core\Level-1\Point.scar}
- {==============================================================================|
- MSSL Core Level-2 Includes
- Input, Output, File, Client, Time and Date routines.
- [==============================================================================}
- {$I Library\Core\Level-2\Date.scar}
- {$I Library\Core\Level-2\Time.scar}
- {$I Library\Core\Level-2\Path.scar}
- {$I Library\Core\Level-2\Directory.scar}
- {$I Library\Core\Level-2\File.scar}
- {$I Library\Core\Level-2\Bitmap.scar}
- {$I Library\Core\Level-2\DTM.scar}
- {$I Library\Core\Level-2\Color.scar}
- {$I Library\Core\Level-2\OCR.scar}
- {$I Library\Core\Level-2\Mouse.scar}
- {$I Library\Core\Level-2\Keyboard.scar}
- {$I Library\Core\Level-2\Client.scar}
- {==============================================================================|
- MSSL Core Level-3 Includes
- Data Processing and Tools & Utilities.
- [==============================================================================}
- {$I Library\Core\Level-3\Grid.scar}
- {$I Library\Core\Level-3\Sorting.scar}
- {$I Library\Core\Level-3\Range.scar}
- {$I Library\Core\Level-3\Command.scar}
- {$I Library\Core\Level-3\Memory.scar}
- {$I Library\Core\Level-3\Conversion.scar}
- {==============================================================================|
- const MSSL_LIBRARY_ID = Integer;
- Contributors: Janilabo
- Description: Constant for MSSL ID.
- Created: September 30th, 2012.
- [==============================================================================}
- const
- MSSL_LIBRARY_ID = 84;
- {==============================================================================|
- const MSSL_LIBRARY_MAIN_VERSION = Integer;
- Contributors: Janilabo
- Description: Constant for MSSL Main Version.
- Created: September 30th, 2012.
- [==============================================================================}
- const
- MSSL_LIBRARY_MAIN_VERSION = 0;
- {==============================================================================|
- const MSSL_LIBRARY_MINOR_VERSION = Integer;
- Contributors: Janilabo
- Description: Constant for MSSL Minor Version.
- Created: September 30th, 2012.
- [==============================================================================}
- const
- MSSL_LIBRARY_MINOR_VERSION = 84;
- {==============================================================================|
- const MSSL_LIBRARY_STATE = string;
- Contributors: Janilabo
- Description: Constant for MSSL State ('Alpha', 'Beta').
- Created: September 30th, 2012.
- [==============================================================================}
- const
- MSSL_LIBRARY_STATE = 'Beta';
- //{$DEFINE MSSL_Compile}
- {$IFDEF MSSL_Compile}
- {$DEFINE RSCE}
- {$DEFINE RSC}
- {$DEFINE SW}
- {$ENDIF}
- {==============================================================================|
- MSSL Gaming Include - RuneScape Classic
- |==============================================================================}
- {$IFDEF RSC}
- {$I Library\Gaming\RuneScape_Classic\RuneScape_Classic.scar}
- {$ENDIF}
- {==============================================================================|
- MSSL Gaming Include - RSCEmulation
- [==============================================================================}
- {$IFDEF RSCE}
- {$I Library\Gaming\RSCEmulation\RSCEmulation.scar}
- {$ENDIF}
- {==============================================================================|
- MSSL Gaming Include - Shadow Worlds
- [==============================================================================}
- {$IFDEF SW}
- {$I Library\Gaming\Shadow_Worlds\Shadow_Worlds.scar}
- {$ENDIF}
- {==============================================================================|
- var MSSL_StartCaption: string;
- Contributors: Janilabo
- Description: Holds SCAR's original title (before MSSL takes over).
- Original title will be restored with unsetupment of MSSL.
- Created: September 30th, 2012.
- [==============================================================================}
- var
- MSSL_StartCaption: string;
- {==============================================================================|
- function MSSL_ShortBuiltString: string;
- Contributors: Janilabo
- Description: Returns MSSL Built/Version string, short edition.
- Example: 1.1b (MSSL_LIBRARY_MAIN_VERSION, MSSL_LIBRARY_MINOR_VERSION, MSSL_LIBRARY_STATE)
- Created: September 30th, 2012.
- [==============================================================================}
- function MSSL_ShortBuiltString: string;
- begin
- Result := (IntToStr(MSSL_LIBRARY_MAIN_VERSION) + '.' + IntToStr(MSSL_LIBRARY_MINOR_VERSION));
- case Lowercase(MSSL_LIBRARY_STATE) of
- 'alpha': Result := (Result + 'a');
- 'beta': Result := (Result + 'b');
- end;
- end;
- {==============================================================================|
- function MSSL_LongBuiltString: string;
- Contributors: Janilabo
- Description: Returns MSSL Built/Version string, long edition.
- Example: v1.1 Beta (MSSL_LIBRARY_MAIN_VERSION, MSSL_LIBRARY_MINOR_VERSION, MSSL_LIBRARY_STATE)
- Created: September 30th, 2012.
- [==============================================================================}
- function MSSL_LongBuiltString: string;
- begin
- Result := ('v' + IntToStr(MSSL_LIBRARY_MAIN_VERSION) + '.' + IntToStr(MSSL_LIBRARY_MINOR_VERSION));
- if (MSSL_LIBRARY_STATE <> '') then
- Result := (Result + ' ' + MSSL_LIBRARY_STATE);
- end;
- {==============================================================================|
- procedure MSSL_Setup;
- Contributors: Janilabo
- Description: Command for setting up MSSL.
- Created: September 30th, 2012.
- [==============================================================================}
- procedure MSSL_Setup;
- var
- t: Integer;
- begin
- t := GetSystemTime;
- ClearDebug;
- MSSL_StartCaption := GetSelf.Caption;
- Disguise(MSSL_StartCaption + ' (Script powered by Massive SCAR Scripting Library ' + MSSL_ShortBuiltString + ')');
- MSSL_SmallLetters := 'abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýšœžþÿ';
- MSSL_CapitalLetters := 'ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝŠŒŽÞŸ';
- {$IFDEF RSC}
- RSC_Setup;
- {$ENDIF}
- {$IFDEF RSCE}
- RSCE_Setup;
- {$ENDIF}
- {$IFDEF SW}
- SW_Setup;
- {$ENDIF}
- WriteLn('*** [' + MSSL_TheTime + '] Massive SCAR Scripting Library ' + MSSL_LongBuiltString + ' STARTED - process took ' + IntToStr(GetSystemTime - t) + ' msec! ***');
- end;
- {==============================================================================|
- procedure MSSL_Unsetup;
- Contributors: Janilabo
- Description: Command for freeing everything that is loaded into memory by MSSL.
- Created: September 30th, 2012.
- [==============================================================================}
- procedure MSSL_Unsetup;
- var
- t: Integer;
- begin
- t := GetSystemTime;
- {$IFDEF RSC}
- RSC_Unsetup;
- {$ENDIF}
- {$IFDEF RSCE}
- RSCE_Unsetup;
- {$ENDIF}
- {$IFDEF SW}
- SW_Unsetup;
- {$ENDIF}
- MSSL_FreeMMObjects(MSSL_MM);
- Disguise(MSSL_StartCaption);
- MSSL_SmallLetters := '';
- MSSL_CapitalLetters := '';
- WriteLn('*** [' + MSSL_TheTime + '] Massive SCAR Scripting Library ' + MSSL_LongBuiltString + ' STOPPED - process took ' + IntToStr(GetSystemTime - t) + ' msec! ***');
- end;
- {==============================================================================|
- procedure MSSL_Terminate(reason: string);
- Contributors: Janilabo
- Description: Terminates the script and prints the reason to debug box.
- Created: September 30th, 2012.
- [==============================================================================}
- procedure MSSL_Terminate(reason: string);
- begin
- WriteLn('MSSL Terminate: ' + reason);
- TerminateScript;
- end;
- {$IFDEF MSSL_Compile}
- begin
- ClearDebug;
- MSSL_Setup;
- if MSSL_Unsetup then
- WriteLn(#13#10 + 'No problems occurred - MSSL works!')
- else
- WriteLn(#13#10 + 'ERROR: Could not compile MSSL!');
- end.
- {$ENDIF}
Advertisement
Add Comment
Please, Sign In to add comment