G General

[.Shuggles.] FREE Script Library FULL PERM Version 0.65

[.Shuggles.] FREE Script Library FULL PERM
Details
Features
Contents
Reviews

The Script Library contains some useful functions I often need in my scripts. I'm pretty
sure they can be helpful to other scripters as well. Just copy the necessary functions to
your scripts to use them.

It contains a small testframe to test some typical usecases and special cases of the
included functions. Just rez a prim, drop the scripts in and touch it. Check the output
manually. Be sure to verify your usecases as well.

Provided functions:

- compare strings lexically
- replace all occurences of one string in another (in 2 different implementations)
- get substring that is enclosed by a start and an end string, e.g. to parse simple XML data
- parse a string into a list without the 8 items limit
- print long strings, split into max. 1024 bytes long parts at line breaks
- get string length in bytes
- convert characters to their 7 bit and 8 bit ASCII code and vice versa
- convert integers and floats to their hexadecimal notation
- round floats and vectors with a specified precision, returned as string
- get whether a given string is an integer, a float, Base64-encoded, a vector or a rotation
- norm and scale rotations, constrain to a plane, interpolate rotations
- get the position at the given distance in front of your avatar
- check the VM the script is running on (Mono or LSO)
- get a list of an object's inventory items of a given type
- get prim number and face from specified prim name and face
- get number of prims of an object (without seated avatars) and number of seated avatars
- get link number of seated avatar
- create random listener channels or channels based on given UUID(s)
- get legacy name of an agent with a given ID, but without " Resident"
- get display name of an agent with a given ID, or legacy name if only ??? can be read
- get first name of an agent with a given ID (using display name if possible, otherwise legacy name)
- get combined display and legacy name of an agent with a given ID
- get about name URL of an agent with a given ID (suitable for display in the viewer)
- get agent link URL of an agent with a given ID (suitable for display in the viewer)
- check ownership of an object even if it's group-owned
- print function with different modes, predefined and user-defined replacement patterns
- show a dialog with buttons ordered correctly and a menu with fancy heading and timeout
- get milliseconds since day began
- get Unix timestamp in days and minutes, without overflowing in 2038
- get date and time (hours and minutes) from Unix timestamp
- get whether a given year is a leap year
- get numeric day of week, month or year for a given date or timestamp, starting with 1
- get number of days in a given month of a given year
- convert color and alpha to/from integer representation of the ARGB value
- compress and decompress UUIDs/keys to save memory

The Script Library is full perm and given for free. It's licensed under the BSD license
with the addition that it must not be resold or otherwise given away standalone in parts
or as whole. All functions can be used freely in your scripts as long as these license
conditions are met. It also contains some script examples from the Second Life Wiki. The
copyright on those remains with the appropriate authors and the license may differ. The
authorship is marked in the script as comment to the affected functions.

Store policies and info about custom scripting at my MP store and the inworld terminals.

See item in Second Life
  • Handling display names
  • Date functions
  • String functions
  • Rounding functions
  • Full perm, BSD license