Projects

  • Gudule’s Teleport Board 2

    Get the latest version: https://git.magiiic.com/opensimulator/Gudz-Teleport-Board-2

    Features:

    • Single or Multi-columns teleport buttons
    • Destinations statuses are checked at start and every hour to avoid TP to inactive regions
    • Local destinations can be written as HG links and are automatically converted to local links for teleport, so the same board works inside and outside your grid
    • Destination source can be set from a notecard or from a web server
    • Immediate TP or map (change USE_MAP in config)
    • Different colors for current region (green) or offline regions (red), customizable
    • Optional background texture
    • Can be formatted with titles (text without url), spacer (|) and column jump (-)
    • Configuration in a separate notecard to allow easy upgrades
    • Long click by the owner to force a full reload

    Setup

    The destination list can be set by 3 ways

    • from an external website: put the URL in prim description (only the first 2048 bytes will be loaded)
    • from a specific notecard: put "card://CardName" in the description
    • fallback if none of the two first method: read the first notecard found.

    In previous versions, the destination list used 5 values. We accept this old format for backward compatibility but we recommend the simplified format:

    • Displayed Name|your.grid:port
    • or Displayed Name|your.grid:port:Region Name
    • or Displayed Name|your.grid:port:Region Name|x,y,z

    Comments and formatting:

    • Empty lines are ignored
    • Lines beginning wish "#" are ignored
    • Lines commented with "//" are sent as message to the owner during initializaton
    • Lines containing only a string (and no url) are drawn as simple text (section titles)
    • Lines containing only a separator ("|") are drawn as an empty line (spacer)

    Although commenting lines is useful to disable them temporarily (#) or display help messages (//), it slows down the initialization, so it is better to avoid it as much as possible.

    Required OSSL Functions:

    • osGetGridGatekeeperURI
    • osGetNotecard
    • osTeleportAgent
    • osSetDynamicTextureDataBlendFace and related (osDrawFilledRectangle, osDrawRectangle, osDrawText, osGetDrawStringSize, osMovePen, osSetFontName, osSetFontSize, osSetPenColor, osSetPenSize)
  • Gudz Free Land Rental Script

    This script is designed for managing free land rentals in OpenSimulator, ensuring tenants maintain a regular presence to prevent users from making land unavailable without actually using it.

    In the future, this script will be adjusted to also handle paid rentals.

    Features

    • Free Land Rentals: Allows users to rent land for free, requiring them to click regularly on the rental panel to keep the parcel.
    • Full Ownership: The land is technically sold to the user, giving them full ownership and control over their parcel without needing group tricks.
    • Automatic Reclaim: Expired or abandoned land is sold back to the vendor owner.

    Requirements

    The script requires these functions to be enabled for Estate Owners in OpenSimulator configuration:

    • osDrawText
    • osGetDrawStringSize
    • osGetGridGatekeeperURI
    • osGetGridLoginURI
    • osGetNotecard
    • osInviteToGroup
    • osKey2Name
    • osMovePen
    • osSetDynamicTextureDataBlendFace
    • osSetFontName
    • osSetFontSize
    • osSetParcelDetails
    • osSetPenColor

    Usage

    For Tenants

    1. Initial Rental: Click on the sign, read the rental conditions, and confirm the rental.
    2. Renewal: Before the end of each term, click on the sign to renew the rental.

    For Region Owners

    1. Estate Settings: Make sure to disable land join, split, and resell in your Estate settings.
    2. Placement: Place the terminal outside the rented land, around 1 meter from the parcel border and adjust until the positioning beacon is inside the parcel and appears green.
    3. Confirmation: A confirmation message appears. Check the rental conditions (see configuration below) and start renting.

    Configuration

    Do not modify the script directly, any change would be overriden on next update. Use the notecard or a web URL config file instead.

    Using a Notecard

    Create a notecard named .config including these settings:

    
    configURL = https://yourgrid.org/rental/example.txt
    // If set, the config will be read from the URL and the rest of the notecard will be ignored.

    // Base config (required)

    duration = 30 // number of days, can be decimal for shorter periods maxDuration = 365 // number of days, can be decimal for shorter periods renewable = TRUE maxDuration = 3650 expireReminder = 7 expireGrace = 7

    // Optional

    fontname = fontSize = lineHeight = margin = textColor = textBackgroundColor = position = cropToFit = textureWidth = textureHeight = textureSides =

    Using Object Description (deprecated)

    Put these values, in this order, in the main prim description, separated by commas. Duration, max duration, expire reminder, and expire grace are in number of days.

    DURATION,MAX_DURATION,,RENEWABLE,EXPIRE_REMINDER,EXPIRE_GRACE

    The empty third field used to be set to MAX_PRIMS, but it is now calculated from the parcel data. It can be left empty to save space (keeping two commas for backwards compatibility).

    To Do

    1. Fix current functionalities:
      • √ Fix rental not restored after updates (fixed in 1.6.5)
      • √ Fix messages not sent to HG avatars when offline (added notification queue)
      • √ Fix position not saved in rent data, causing new check triggered on reset
      • Keep notification queue after script reset
      • Clear rent data (object desc) if owner changed
      • Clear rental status if parcel changed
      • Shorter rental data format (only save in object desc the live rental data, not settings that are now handled by config file)
      • Also notify owner to clean terrain when abandoned (currently only on rental expiration)
    1. Add new functionalities:
      • √ New feature: restore rental, based on prims found in the parcel (1.6.6)
      • Use different prims for sign and renter name, hide and show accordingly, to avoid resizing single prim and allow more creative designs
      • allow setting times in years, months, days, hours
      • Option to limit to local grid avatars
      • Option for maximum number of parcels per user, or maximum area
      • Check that the owner has estate rights before activating
      • Centralized management
        • List available terrains
        • Centralized rental via in-world board
        • Centralized rental via web page
      • Advanced features (requires grid-side API)
        • Option to update terrain for sale status
        • Option to set objects auto return after rental end
    1. Add payment system:
      • With local currency
      • On website (via w4os or WooCommerce)

    License

    This script is provided under the GNU Affero General Public License version 3. See the LICENSE file for more details.

  • OpenSimulator Helpers

    Helpers required to enable common functionalties like search, currency, events in OpenSimulator grids.

    They were initially based on a collection of different projects (see Credits below), but were entirely rewritten to use an unified code and set of parameters, as well as for integration in larger projects like w4os OpenSim WordPress Interface.

    Formerly known as Flexible Helper Scripts.

  • ActiveNPCs NPC Controller

    This is a full-featured controller for creating interactive NPCs , scripting them (through notecards) and creating waypoints of your region so that the NPCs can walk around your region. The controller is extremely lightweight (a single script manages all the NPCs) and the NPCs are interactive (i.e. you can give them commands through the local chat).

    You can get the latest package from the OpenSimWorld region:

    http://opensimworld.com/hop/74730-OpenSimWorld

    Hypergrid: hg.osgrid.org:80:OpenSimWorld

    Visit https://github.com/opensimworld/active-npcs/edit/master/README.md for an up-to-date version of this documentation.

    Quickstart

    The controller requires OSSL functions to work. You need to have permission to use the osNpc*() functions and, additionally: , osGetNotecard(), osGetNotecardLines(), osMessageAttachments(), osSetSpeed(). The controller uses the channel 68 to communicate.

    To start using the controller:

    • Rez the OSW NPC Controller object somewhere in your region. Make sure your avatar is within distance of 20m or less from the controller
    • Wear the OSW NPC Listener object (it should attach automatically to your Right Pec!)
    • Edit the __npc_names notecard, and place first name and last names of each of your NPCs in a line by itself. Example:
      Bob TheRobot
      Alice TheNPC
    • Touch the controller -> ReConfig
    • Touch the controller, SaveNPC -> Bob (You should see a message "Saved appearance xxx-xxx -> APP_bob"
    • Touch the controller -> LoadNPC -> Bob

    Your npc should now be responding to commands , e.g. "Bob come"

    Controller object Contents

    • The controller script (..Controller). This is the single script that runs everything.
    • An example extension script (..Extension). This can be used to add commands to the system (explained below).
    • The Listener object. All our NPCs must wear this invisible object on their Right Pec. This object listens for commands from the local chat and forwards them to the controller script for processing.
    • The __npc_names notecard. This notecard contains the names of the NPCs, one in each line . After making changes to this notecard, select "Reconfig" from the controller menu.
    • The __initcommands notecard. This is a notecard with the commands that are executed when you click "InitCmds" on the controller menu.
    • The waypoints notecard. This contains a list of points in your region. The NPCs can walk from one point to the other, if they are connected (via the links notecard) . You do not need to edit this by hand. There is an HUD for editing the map
    • The __links notecard. This contains a list of pairs of connected points. I.e. if you want to link point 1 to point 2, there will be a line "1,2" in the notecard. You do not need to edit this by hand. There is an HUD for editing the map
    • The __config notecard. This contains configuration ootions.
    • Command notecards. You can put any list of commands for NPCs a notecard named [command-name].scr. You can then order your NPCs to execute the notecards from the local chat. E.g. if you create a notecard "dance.scr", you can say "Bob dance" to execute it.
    • Waypoint notecards. Notecards named _1.scr , _2.scr etc are executed automatically when the NPCs reach the waypoint number 1, number 2 etc.
    • The appearance notecards are stored as APP_[firstname] for each NPC. You can also have multiple appearances per NPC (see below).
    • The Waypoint HUD is used to edit the map and create/update the waypoints and links notecards

    Overview of commands

    The NPCs respond to commands that you give to them through the local chat.

    Assuming your NPC is named "Bob", you can say the following in the local chat:

      Bob come
      Bob leave
      Bob stop
      Bob follow me
      Bob fly with me
      Bob say hi
      ...
      etc.

    You can put these commands in notecards in order to create complex scenarios.

    For more complex behavior, the following control commands are supported in notecards: if, if-not, jump

    Example of a scenario notecard:

      if name-is Bob Alice
       say hi
       say I am either Bob or Alice
       jump outofhere
      end-if
      say i am not bob or alice
      @outofhere
      if-not name-is Bob
        say I am definitely not Bob
      end-if
      say ... and i 'm now leaving
      leave

    You can add these commands to a notecard named "test.scr" inside the controller object, and then ask the Bob to execute them by saying "Bob test" in the local chat.

    List of NPC commands

    When giving commands through the local chat, commands must be preceded by the first name of the NPC. Here we assume our NPC is called "Bob"

    
      Bob come           : "Come here ". Bob will  move close to you

    Bob moveto 23 : Walk towards waypoint #23

    Bob movetov <23,24,25> : walk towards point with coordinates <23,24,25> (Note, no spaces between vector coordinates)

    Bob runtov <23,24,25> : run towards point with coordinates <23,24,25>

    Bob flytov <23,24,25> : fly towards point <23,24,25> in region

    Bob movetovr <23,24,25> <33,34,25> : walk to a random point between the points <23,24,25> <33,34,25>

    Bob runtovr <23,24,25> <33,34,25> : same as above, but run

    
    * * Note: never leave spaces in coordinate vectors, i.e. <23,24,25> NOT <23, 24, 25> **
    
    Bob say hi                            : Says "hi" on public channel

    Bob saych 90 blablah : say "blablah" on channel 90

    Bob shout Blah bleh

    Bob teleport <23,30,40> : Teleports to a point. REMEMBER: no spaces inside the vector brackets

    Bob lookat me : attempts to look at you

    Bob lookat <x,y,z> : look towards point x,y,z

    Bob anim dance : play animation "dance" . the animation must be in the inventory of the controller object

    Bob sound 1c8a3af2-6e5a-4807-a7a3-a42e5744217c 1.0 : The NPC will trigger the sound with the given UUID at the volume specified by the second parameter (1.0 is max volume)

    Bob light : turn on/off a light the NPCs have on them

    Bob give Apple : Give the object "Apple" from the controller’s inventory to the user. For security, only Objects can be given.

    Bob follow me

    Bob follow Alice : follow the avatar whose first name is ‘Alice’

    Bob fly with me

    Bob fly with alice : fly with another user

    Bob stop : Stops his animation and his movement, and stops following you

    Waypoint and Pathfinding commands

    You need to have set up the map of your region for these commands. That is described elsewhere. The NPC can automatically try to find how to walk from waypoint A to B. Because this is computationally intensive, only paths with less than 15 connections between them are supported.

    
    Bob leave               : Start walking randomly between connected waypoints

    Bob teleport Bar : Teleports bob to the waypoint named "Bar"

    Bob lookat Bar : look towards the waypoint named "Bar"

    Bob moveto 1 : Walk to waypoint #1

    Bob nearest : Tell me which is the nearest waypoint

    Bob setpath 0:1:3:5:1:0 : Walk through the given waypoints, i.e. walk to waypoint 0 , then to 1, then to 3, then to 5 etc.

    Bob goto 13 : Will walk between connected waypoints to waypoint #13

    Bob go to Bar : Will walk between connected waypoints to the waypoint named "Bar" : BEWARE! "goto" and "go to" (with space) are different commands Bob go to : without a destination, Bob will print the names of waypoints he knows

    Command Notecards

    Multiple commands can be appended to a notecard, and then the NPC can execute them.

    
    Bob run-notecard my_script.scr     : Execute the contents of the notecard my_script.scr (the notecard must be in the controller inventory

    Bob my_script : Simpler syntax. Same as run-notecard: Starts executing the notecard "my_script.scr"

    Bob batch say hi ; wait 10; say bye : Executes multiple commands one after the other. Commands are separated by ";" The commands will be executed as if they were in a notecard

    Bob stop-script : Stop executing the notecard script

    Multiple appearances

    You can have multiple appearance notecards for an NPC by renaming them. The default notecard for NPC Bob is stored in the APP_bob notecard. You can rename the notecard to, e.g. APP_bob_swimming, and then ask bob to load that notecard:

    
    Bob dress  swimming     : load the appearance from notecard "APP_bob_swimming"

    Bob dress : load the NPC’s default appearance from notecard "APP_bob"

    Sitting on objects

    The NPCs can sit on objects with the "use" command.

    Bob use chair         

    Bob will attempt to find a SCRIPTED object (e.g. a poseball) named "chair" (You can change the Object Name from the properties box when editing it) near him and try to sit on it if its transparency (alpha) is less than 100%. Since by convention poseballs change their transparency to 100% when users sit on them, this ensures that Bob will not sit on an already-occupied poseball. If you just say "Bob use", the NPC will sit on the nearest scripted object.

    Bob stand             : Bob will stand up if he is sitting

    Variables

    Variables can be used with IF commands in notecards for more complex behavior.Variables are global and shared between notecards and NPCs.

    
    Bob setvar foo 13                : set variable foo to be "13". Only string variables are supported. Variables can be used with IF blocks

    Bob setvar foo : set variable foo to the empty string. (The empty string is the default value if a variable does not exist)

    Bob say $foo : Bob says "13"

    if var-is foo 13 say foo is thirteen end-if if var-is foo say foo is empty string or not set end-if

    waitvar foo 13 : wait (and do nothing) until the variable foo becomes 13

    The following commands increase and decrease a variable by 1. They are useful in cases where you want 2 or more avatars to be present to proceed:

    
    increase totalAvatarsHere  : Increase the variable "totalAvatarsHere" by 1

    decrease totalAvatarsHere : Decrease the variable "totalAvatarsHere" by 1

    zero totalAvatarsHere : Set variable totalAvatarsHere to 0 (same as setvar totalAvatarsHere 0)

    Example usage in a notecard:

    increase totalAvatarsHere waitvar totalAvatasHere 2 say Now there are 2 of us anim dance wait 10 stop … say Time to depart decrease totalAvatarsHere

    IF commands

    There is support for multiple levels of IF blocks. Blocks must end with "end-if". There is no "else" command, but you can achieve the same effect with "jump" commands

    
    if name-is bob alice            : if the npc's name is Bob or alice
          say I am either Bob or Alice
          if-not name-is Bob
            say I must be Alice
          end-if
    end-if                          : always end IF blocks with end-if.  You  can nest if blocks

    if-not name-is Bob : Example of negative if say I am not Bob end-if

    if-prob 0.3 : IF block will be executed with probabilty 0.3 (the if block will be executed 30% of the time) say This will be heard 30% of the times end-if

    if var-is party 1 : Will execute the IF block if the variable party is "1" say We are having a party already! end-if

    if var-is party : Will execute the IF block if the variable party is empty or not set say No party yet, let’s start one! setvar party 1 end-if

    Jump command. You can use the syntax @label to create labels in your notecards. The syntax is:

    
    @myLabel       : a label
      say This will loop forever
    jump myLabel   :  like "jump" in LSL or "goto" in other languages. the label should be on a line by itself prefixed with '@'

    WAIT commands

    
    wait 200           : wait (don't do anything) for 200 seconds

    wait 200 300 : wait between 200 and 300 second before executing the next command

    waitvar foo 13 : wait until the variable foo gets the value 13

    waitvar foo : wait until the variable foo is empty.

    Other commands

    Bob msgatt  attachment_command 12 13 14 15  

    Uses osMessageAttachments to send the message "attachment_command" to attachments at attach points 12 13 14 15. This can be useful for scripting NPC attachments. Read the OSSL docs of osMessageAttachments() for more.

    Custom command notecards

    You can extend the list of commands with notecards. To create a command notecard, enter the commands for the NPC to execute in a notecard, and save it into the controller’s inventory with the name [command-name].scr

    E.g. a dance command notecard would be named "dance.scr" and contain the following

    say I love to dance!
    anim RockDance
    wait 600 800
    say oops, I am  tired...
    stop

    You can then say "Bob dance" to have bob execute the notecard

    Interactive menus

    With interactive menus, your NPCs can ask your visitors to make a choice from a menu in the local chat. The following notecard asks the user if they want apple or an orange and gives an object to them:

    say Welcome to the shop!
    @prompt
      prompt Do you want an [apple] or an [orange]?
      say I didn't catch that. Starting over.
      jump prompt
    @apple
      say Here is an apple
      give Apple
      jump end
    @orange
      say Here is your orange
      give Orange
      jump end
    @end
    say Goodbye

    Here is how it works:

    • The options of the menu are specified in the prompt string itself, in square brackets:
      prompt Do you want an [apple] or an [orange]?
    • Bob will say "Do you want an [apple] or an [orange]?" to the local chat, and it will expect to read the words "apple" or "orange" in the local chat from your visitor.
    • If he hears "apple", he will jump to the label "@apple" in the notecard.
    • If he hears "orange", he will jump to label "@orange" in the notecard.
    • If he hears something else, he will not jump, but continue normally to the next notecard line after the "prompt" line. (In our case, he asks again).
    • The menu options can only be single words (e.g. "orange", or "apple"). They are case-insensitive, and the menu will work even if the word is said in a phrase (I.e. "I want an apple" will still jump to @apple)

    Waypoints and Pathfinding

    You can use the controller to create waypoints and links between them in your region. Bob can then walk between the connected points when you say ‘Bob leave’

    Each waypoint has a number (starting from 0) and optionally a name. Waypoints can be connected to other waypoints, thus creating a map (graph) between them. Bob can then wander between the waypoints (Say "Bob leave" to start walking), and you can also ask him to find his way from point A to point B (say Bob go to [destination]).

    The waypoint data are stored in the waypoints notecard, one in each line, and the links data is stored in the links notecard. You do not need to edit these notecards by hand however, as you can use the included Waypoint Editor HUD.

    To create a map, first wear the WaypointEditor HUD. If you already have created a map before, click RezPegs from the HUD menu. This will rez a peg in each waypoint you have already created. If you are starting with an empty map, you do not need to do this.

    To add a waypoint, move your avatar to the desired position, and select "AddPeg" from the HUD menu. A peg should appear in front of you. To create a second waypoint, move to another position, and repeat.

    To link the two waypoints X and Y, click on the first one (X), then click on the second one (Y). The pop up dialog should say "Current peg: Y, previous: X". To link them, select "LinkPegs" from the popup dialog. To unlink two waypoints, again, click on the first one, then click on the second one and select "UnlinkPegs" from the popup. Be careful to disregard all other dialogs that have popped up.

    You can give a name to waypoints. Click the peg, select "SetName", and enter the name (E.g. "Bar"). You can use this name to give commands to your NPCs later (e.g. "Bob go to bar").

    You can move the waypoints around to correct their positions. Important: After you move pegs to new positions click "ScanPegs" from the editor HUD. If you don’t do this your changes will be lost.

    After you have created/edited your waypoints, click the WaypointEditor HUD and select "SaveCards". This will update/create the waypoints and the links notecards inside the controller to match your new map. To test that all went well, clear the pegs and rez them again.

    Note! Removing waypoints is not supported, as it would break the numbering and would mess up the notecard naming scheme. Although deleting is not supported, you can unlink a waypoint from all other waypoints, in which case the NPCs will never go there when wandering. If you want to start over with an empty map, edit the waypoints and links notecards, remove all their contents, and then select "Reconflg" from the controller.

    Configuration

    Configurable options for the controller are added in the __config notecard:

    AutoLoadOnReset=0

    Change AutoLoadOnReset=0 to AutoLoadOnReset=1 to make the controller rez the NPCs automatically on region restart or script reset. Please note that autoloading NPCs may not always work well with some opensim versions.

    Permissions

    Permissions allow you to limit access to NPCs , and to specific commands to certain users or to all users. An access control list is specified in the __permissions notecard which is inside the controller object.

    Each line in the __permissions notecard has the format

    <npc-name> <command-name> = <RULE> <avatar name>

    Where RULE is ALLOW, DENY, ALLOWID, DENYID or ALLOWSAMEGROUP (read below for usage).

    The following line blocks (denies) avatar "Bad Hombre" from issuing the "bob come" command:

    bob come = DENY Bad Hombre

    You can substitute the name of the NPC or the name of the command or the name of the avatar with the wildcard character ‘*’. for example, this blocks any avatar from using the command:

    bob come = DENY *

    you can block any avatar from issuing the "come" command to any NPC:

    * come = DENY *

    you can block any avatar from issuing any command to Bob:

    Bob * = DENY *

    you can block a specific avatar from using any command on any npc:

    * * = DENY Bad Hombre

    you can also use the DENYID command to block an avatar by UUID

    * * = DENYID d37a3f5b-562a-4bfd-b780-68c0b9b940b1

    and you can block any avatar from using any command with any NPC!

    * * = DENY *

    The rules specified in the notecard are executed from top to bottom, therefore you can add exceptions for specific users with the ALLOW and ALLOWID commands at the end of the list:

    * come = ALLOW Good User
    * come = ALLOWID d37a3f5b-562a-4bfd-b780-68c0b9b940b1

    You can also use the keyword ALLOWSAMEGROUP, which allows any avatar that is in the same group as the controller object.

    * come = ALLOWSAMEGROUP

    You can use the wildcard ‘*’ with the ALLOW commands as well

    Bob come = ALLOW *
    * come = ALLOW * 
    Bob * = ALLOW *

    An example __permissions notecard is given below which blocks any avatar from controlling the NPC "Alice" and disallows the "exec" command, but allows exceptions to certain users. It also blocks "evil user" from any command:

    Alice * = DENY *
    * exec = DENY *
    Alice * = ALLOW Good User
    Alice * = ALLOWSAMEGROUP
    * exec = ALLOW Good User
    * exec = Allow Another Gooduser
    * * = DENY Evil User
    • Note that the ALLOW, DENY, ALLOWID etc. rules need to be in CAPITALS. Also, There must always be a space before and after the ‘=’ character.
    • The owner of the controller is always able to use all commands with all NPCs regardless of access list.
    • If you make changes to the __permissions notecard, please click on the controller ->ReConfig to reload the permissions list.

    Initialization commands

    The notecard initcommands contains initial commands to give to the NPCs. If AutoLoadOnReset is enabled, the notecard contents are executed automatically after loading. You can also manually execute the notecard by clicking "InitCmds" from the controller menu. You can use the initcommands to add any command that sets your NPCs in motion. Typically you would tell them to "leave" so that they start walking between waypoints. An example of __initcommands is :

    Bob say I am rezzed!
    Bob teleport <64,64,22>
    Alice  teleport <128,64,22>
    Bob leave
    Alice leave  : Start walking!

    Extension scripts

    You can extend the functionality of the controller with extension scripts. Extensions are LSL scripts that you create and add inside the controller object. If a command given to an NPCs is not understood by the NPC controller, the NPC controller will send a link_message to the extension scripts to process it. The extensions can also use link_message to send back commands to the NPC controller (the "number" parameter must be greater than 0) . The OSW NPC Controller object already contains an extension that implements the "help" command (look at the "..Extension" script). The script in it shows how extensions parse the data sent from the controller (sent through link_message) and how they can respond back.

    The number parameter of the link_message is -1 if it comes from the controller script. The key parameter of the link_message is the UUID of the NPC. The string parameter of the link_message (or through channel 68) is of the format:

    ! [uuid]  Bob Bob help

    Where:

    • [uuid] is the UUID of the user who gave the command
    • Bob is the name of the NPC. The name is repeated once again.
    • What follows is the rest of the command that the NPC heard (e.g. "help")

    You can easily split the string with llParseString2List. Look into the ..Extension script for an example.

    Sending commands from other objects

    You can send commands directly to the NPC controller from any object. The NPC controller listens on channel 68. You have to remember to send the command using llRegionSay region-wide, so that the controller can hear it. The syntax is the same as the one used in link_message:

    llRegionSay(68, "! 0000-0000-0000-0000  Bob Bob say hello");

    The UUID can be zero, and the name of the NPC must be repeated twice, as shown above

    • ONLY scripts owned by the owner of the controller can send commands this way *

    Setting controller variables from other objects

    Another way to interact with the controller is by setting variables from other objects by sending SETVAR [variable name] [value] from other objects to channel 68. This is the syntax:

    llRegionSay(68,  "SETVAR foo 1");

    (SETVAR must be in capitals. This example will set the variable "foo" to "1").

    The variables can be used normally in notecards. In this example notecard, the NPC will waits for the variable "foo" to become ‘1’ before starting to dance:

    @start
    say Waiting for variable foo to become 1...
    waitvar foo 1
    say Variable foo is now 1! Let's dance!
    anim dance1
    wait 10
    stop
    setvar foo 0        : Reset var foo to 0 before waiting again
    jump start

    Technical Notes

    The controller runs a single timer, that updates the states of all the NPCs every 5 seconds. This allows it to be extremely lightweight, as it does not block any script processing, but it may also cause delays when executing commands.

    The controller checks the number of visitors in your region every 2 minutes. If there are no visitors in the region for 2 minutes, it will stop executing commands to avoid creating unnecessary load to the region.

    Bugs

    The controller was tested with version 0.8.2.1 . There may be multiple issues with other versions. Please add an issue, or get in touch with Satyr Aeon @ hypergrid.org:8002

    Thanks

    Thanks goes to Spax Orion for testing out lots of features and giving feedback

  • 2DO HYPEvents server

    THIS PROJECT IS DEPRECATED. Please use 2do Aggregator instead, the new implementation.

    The PHP port is way more efficient than this version (processing speed multiplied at least by 10, modular, scalable and less prone to crash), and it integrates smoothly with other related project like Flexible Helper Scripts or w4os Web interface for OpenSimulator

    Therefore, the python version will most probably not be maintained anymore. The repo is maintained only for historical purpose, and in the unlikely case a good reason appear to go back to python.

    Fetch hypergrid calendars from different sources and generate the pages for the web interface and for the boards synchronisation.

    To use the events board on your grid, the easiest way is to ask us to include your calendar in 2do.directory.

    Very quick start

    In most cases you don’t need this!

    • as a parcel owner, you only need the the in-world board, which is intended to be used on any grid. It is available here:
    • as grid or region owner, you can use 2do.directory (https://2do.directory) service to enable events search on your grid with a simple straight-forward configuration

    Installation of this server is only relevant if you want to provide a custom-curated list calendar.

    Quick start

    Installation

    • clone this repository and put it in a convenient place like /opt/2do-server (not inside the website root folder)
    • make sure to install dependencies (see below)
    • copy html/banner*png to your web folder (or create your own)
    • from 2doevents folder, run ./bin/setup-python2-virtual-env to create the appropriate python virtual environment (it will not affect your system installation)
    • create fetcher.cfg base config to use only iCal (ics) calendar sources:
      icalbulk IcalBulk

    additional lines are for custom fetchers and must have correspondig python scripts in fetcher/ folder.

    • create a comma separated list in ical.cfg, format:
      gridshortname,yourgrid.org:8002,https://example.org/mycalendar.ics

    The calendar must include the teleport destination as event location, in the form yourgrid.org:8002:You Region You can use example.fetcher.cfg and example.ical.cfg as references.

    On a regular basis (heard about cron?)

    • from 2doevents folder, run ./bin/update-pages.sh /var/www/html/events/ (or an existing folder in your web document root)

    Note for Google Calendar users

    Move your mouse above the calendar you want to share, a three dots icon appears, select "Settings and Sharing" and scroll the page down to find Public iCal format adress. This is the value you need to copy as calendar ics url.

    Running

    • launch http://your.server/events/ to check the result
    • use crontab to run the above command ./bin/update-pages.sh /var/www/html/events/ regularly (e.g. hourly)

    Dependencies

    This project requires Python2, not Python3. Update for python3 is not planned in a near future, as I plan to rewrite it from scratch as part of the w4os project.

    The easy (and saver way)

    Setup a virtual environment for python2 by running the provided installation script:

    ./bin/setup-python2-virtual-env

    This will install python2 if needed, as well as packages required by this project, in a protected environment so it won’t interfer with your system setup.

    The hard way

    Please not the scripts are not compatible with urllib3 version 1.24 or above, nor with pystache 0.6 or above, so we force installing the last compatible version.

    sudo apt update
    sudo apt install python-icalendar python-lxml python-pystache python-requests yui-compressor make

    or

    pip install icalendar lxml pystache==0.5.4 requests urllib3==1.23

    Roadmap

    • ical export
    • embed page for websites
    • better web interface enhancements
    • integration with in-world search
    • installation script, including crontab script generation
    • WordPress mudule (integration with OpenSim WordPress plugin)
    • Drupal module

    Related projects

    • 2do.directory is a public hypergrid search engine based on 2do HYPEvents and allowing to implement in-world search in any grid, without installing this stuff.
    • w4os Web interface for OpenSimulator is a collection of tools and helpers, including 2do services, for grid management in a WordPress website. It uses 2do.directory by default.
    • Flexible Helper Scripts a collation of helpers, including in-world search engine, currency, events, offline messaging, uses 2do.directory by default for events.
    • OutWorldz OpensimEvents uses 2do directory. Our own fork is also useable as a web service and fixes relative path issues.

    Licence

    (c) 2018-2019 Olivier van Helden dev@2do.pm Based on HYPEvents project by Koen Martens tomfrost@linkwater.org https://gitlab.com/sonologic/hypevents

    Licence: GPLv3

  • 2do-search

    2DO Hypergrid Events search

    Version 0.0.17

    In-world Search engine for 2DO Hypegrid Events.

    Based on Outworldz OpensimEvents

    Dependencies

    • perl
    • perl JSON
      sudo cpan JSON
      sudo cpan HTML::Strip
      sudo cpan Date::Manip
      sudo cpan CGI
      sudo cpan DBD::mysql
    • Make sure your server handles perl cgi. For apache:
      sudo apt install libapache2-mod-perl2
      sudo a2enmod perl
    • Make sure your server accepts .htaccess rules, otherwise copy .htaccess content in your website configuration

    Installation

    • Clone this project in a folder named "search" inside your web directory. It should be reachable at http://example.com/search
    • If needed, create ossearch database and database user (follow instructions in README-sql-tables.txt)
    • Create a copy of lib/MySQL.txt.example as lib/MySQL.txt and update it with the right database credentials
  • 2do-hypevents

    Meta-project including all projects related to 2do HYPEvents

  • 2DO board

    In-word teleporter board for 2DO events server.

    Installation from sources

    • Put the content of the "2DO board.lsl" in a script file and name it "2DO board"
    • Put the content of the "2DO Read me" in a notecard named "2DO Read me"
    • Put the content of one of the themes files in a notecard named "Configuration"
    • Let the magic happen

    Licence and copyright

    (c) 2018-2022 Gudule Lapointe gudule@speculoos.world. Based on the work of Tom Frost tomfrost@linkwater.org.

    Licence: GPLv3

  • 2DO Aggregator

    Version 0.1.6 Stable 0.1.6 Requires PHP 7.3 License AGPLv3

    The PHP port of python 2do-server.

    Before download or install : the easiest way to use this is to get the teleport board in-world (hop://speculoos.world:8002:Lab) and ask us to include your calendar in 2do.directory.

    Aggregator is a tool to fetch events from various sources and export them on several format, for use by 2do Board and other applications related with 2do Events project.

    Import formats:

    • [x] iCal (ics, iCalendar)
    • Custom web parsers:
      • [x] opensimworld
      • [x] thirdrock
      • gridtalk (to do)
      • OpenSim Fest (to do)

    Export formats:

    • [x] HYPEvent (legacy 2do/HYPEvent format)
      • [x] events.lsl2 (for current versions of 2do-board)
      • [x] events.lsl (old format, now includes only a deprecation notice)
    • [x] JSON (events.json) compatible with events parsers (provided by w4os or Flexible Helper Scripts)
    • [x] iCal (events.ics) iCalendar format, compatible with web, mobile and desktop calendars
    • [x] Light html web calendar page for standalone use

    This is a side PHP application intended to provide the same functionality as 2do-server, the original events fetcher of 2do project and the original HYPEvents code, but in a more modular and maintainable way, and with better integration with other tools of 2do Events, w4os and Flexiple Helper Scripts projects.

    • 2do-board: the in-world board to display the calendar

    For grid owners :

    • W4OS: a WordPress plugin to manage OpenSimulator grids and provide external helpers, including 2do Events
    • Flexible Helper Scripts: a standalione collection of scripts providing the same helpers, without the web interface

    Getting started (recommended)

    Don’t install this app. Seriously. In most cases you don’t need to install it, you can use ours.

    • as a parcel owner, you only need the the in-world board, which is intended to be used on any grid. It is available here:
    • as grid or region owner, you can use 2do.directory (https://2do.directory) service to enable events search on your grid with a simple straight-forward configuration

    Jump directly to "Calendar conventions" below for the events format.

    Installation

    Installation of this server is only relevant if you want to provide a custom-curated list calendar. If you really need to manage your own calendars collection, follow these instructions.

    Clone this repository and put it in a convenient place like /opt/2do-aggregator (not inside the website root folder).

    Install libraries.

      cd /opt/2do-aggregator
      composer install --no-dev

    Why outside the website directory? This is a script intended to be run from terminal or via a cron job, there is no point allowing random users or bots to run it from outside and risk overloading the server.

    Copy config/ical.gfg.example and add your calendar sources.

      cp config/sources.csv.example config/sources.csv

    Calendar conventions

    Events must have

    • A title
    • A start and end date/time
    • A location composed of the region HG url (e.g. yourgrid.org:8002:My_Region)

    They might also include

    • A description (optional but recommended)
    • A category (optional), following standards recognized by the viewers:
      • discussion
      • sports
      • live music
      • commercial
      • nightlife/entertainment
      • games/contests
      • pageants
      • education
      • arts and culture
      • charity/support groups
      • miscellaneous
      • These aliases are also recognized as variants of standard categories:
      • art (art and culture)
      • lecture (art and culture)
      • litterature (art and culture)
      • fair (nightlife/entertainment)
      • music (life music)
      • roleplay (games/contests)
      • social (charity/support groups)

    How to export Google Calendar as .ics

    To get the url of your calendar in iCal format, move your mouse above the calendar you want to share, a three dots icon appears, select "Settings and Sharing" and scroll the page down to find Public iCal format adress. This is the value you need to copy as calendar ics url.

    Running

    Run the script manually

      /opt/2do-aggregator/aggregator.php /var/www/html/events/

    Create a cronjob to run automatically (below example would run it every 4 hours)

      0 */4 * * * /opt/2do-aggregator/aggregator.php /var/www/html/events/

    Assuming /var/www/html is your website root directory, and http://www.yourgrid.org/, this would create:

    • http://www.yourgrid.org/events/ a basic web calendar page
    • http://www.yourgrid.org/events/events.lsl2 the source url for 2do Board
    • http://www.yourgrid.org/events/events.json the source url for events parsers

    Related projects

    Events parsers for in-world search:

    • w4os Web interface for OpenSimulator WordPress plugin for OpenSim grid management, providing also a collection of tools and helpers, including 2do services, It uses 2do.directory (see below) as default events source.
    • Flexible Helper Scripts standalone collection of helpers included in w4os, without web management interface, including in-world search engine, currency, events, offline messaging. It uses 2do.directory as default events source.

    Public calendars to use without installing this app: