Update or Create a Notecard in Inventory or Task Inventory

24 May 2020

  • C10 - added the ability to place embedded items at specified positions.

31 July 2019

  • C10 - added the selection optional parameter.

20 May 2017

  • Release 9.164 - added.
updatenotecard (Commands)
TypeCorrade progressive command
Commandupdatenotecard
DescriptionThe updatenotecard command is used to update or create a new notecard inside either Corrade's inventory or inside a primitive's (task) inventory.
Permissionsinventory, interact
Parametersgroup, password, type, entity
Last ChangesC10 - added the ability to place embedded items at specified positions.

The updatenotecard command is used to update or create a new notecard inside either Corrade's inventory or inside a primitive's (task) inventory.

Command Required Parameters Required Corrade Permissions Example
updatenotecard group, password, type, entity inventory, interact, system
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Update or create a notecard named
            // "bla bla" in the a primitive that
            // is referenced by an UUID.
            "command", "updatenotecard",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "task",
            // The UUID or name of the primitive.
            "item", "490b67ba-4cce-c243-be56-51f711f26d3e",
            // The range in meters from Corrade
            // where the primitive can be found.
            "range", 5,
            // The name of the notecard.
            "target", "bla bla",
            // Set the notecard body text.
            "entity", "text",
            "data", "My Cool Notecard!",
            // If the notecard "bla bla" does not exist
            // within the primitive, then create it.
            "create", "True",
            "callback", wasURLEscape(URL)
        ]
    )
);
Parameter Possible Value Second Parameter Possible Value Optional Parameter Possible Value Description
type task item The name or UUID of the primitive containing the notecard to update. range The range in meters where the primitive can be found. Update or create a notecard inside a primitive's inventory.
target The name of the notecard.
agent item The inventory item name or UUID of the notecard to create or update. Update or create a notecard in Corrade's inventory.
target The name of the notecard.
entity text data The text contained in the notecard. Creates or updates a notecard using the value passed to the optional parameter data as the notecard text.
file path The path to a file on the local storage that Corrade is running off. Creates or updates a notecard by reading the file passed to the optional path parameter and setting the notecard text to the contents of the file.
asset data Base64-encoded asset data such as the one returned by the download command. Creates or updates a notecard from binary asset data.
create True or False description A string. The command attempts to update an existing notecard and if create is set to True (default is False), then the notecard will first be created if it does not exist and then updated.
permissions A permission string. If create was set to True, then create the notecard with the provided permissions.
Optional Parameter Possible Value Description
selection attached, rezzed or all (default: all) Either attached, rezzed or all for selecting only primitives or objects attached to avatars, primitives or objects rezzed in-world or all primitives or objects respectively.
attachments A CSV string. A list of tokens by UUIDs or inventory paths to be used as embedded attachments for the notecard.

Examples

Here are some examples on how to use the updatenotecard command.

Create a Notecard in Corrade's Inventory

The following is an instant message (command) sent to Corrade that tells the bot to create or update a notecard if it already exists:

  • placed at /My Inventory/Notecards/somenotecard
  • containing the text My Cool Notecard!
 llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Update a notecard in Corrade's inventory.
            "command", "updatenotecard",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            "type", "agent",
            // The inventory path to a notecard.
            "item", wasURLEscape("/My Inventory/Notecards/somenotecard"),
            // The name of the notecard.
            "target", "somenotecard",
            // Set the notecard body text.
            "entity", "text",
            "data", wasURLEscape("My Cool Notecard!"),
            // If the notecard "somenotecard" does not exist
            // then create it.
            "create", "True",
            "callback", wasURLEscape(URL)
        ]
    )
);

Notes


secondlife/scripted_agents/corrade/api/commands/updatenotecard.txt ยท Last modified: 2022/11/24 07:45 by 127.0.0.1

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.