Update or Create a Script in Inventory or Task Inventory

20 May 2017

  • Release 9.164 - added.
updatescript (Commands)
TypeCorrade progressive command
Commandupdatescript
DescriptionThe updatescript command is used to update or create a new script inside either Corrade's inventory or inside a primitive's (task) inventory.
Permissionsinventory, interact
Parametersgroup, password, type, entity
Last ChangesRelease 9.164 - added.

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

Command Required Parameters Required Corrade Permissions Example
updatescript group, password, type inventory, interact, system
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // updates a script in a
            // primitive's inventory
            "command", "updatescript",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            // the name or UUID of the
            // script in the primitive's
            // inventory.
            "target", "New Script",
            // the name of the primitive
            // that contains the script...
            "item", "My Update Object",
            // ...in a 5m range
            "range", 5,
            // Update script source using a text entity.
            "entity", "text",
            // Base64 encoded script data
            "data", wasURLEscape(
"default {
   state_entry() {
       llOwnerSay(\"Hello world!\");
   }
}
")
        ]
    )
);
Parameter Possible Value Second Parameter Possible Value Optional Parameter Possible Value Description
type task item The name or UUID of the primitive containing the script to update. range The range in meters where the primitive can be found. Update or create a script inside a primitive's inventory.
run True (default) if the script should be set to running.
mono True (default) if the script should be compiled using the mono compiler.
reset True (default) if the script should be reset after being updated.
target The name of the script.
agent item The inventory item name or UUID of the script to create or update. mono True (default) if the script should be compiled using the mono compiler.
target The name of the script.
entity text data The source code of the script. Creates or updates a script using the value passed to the optional parameter data as the script source code.
file path The path to a file on the local storage that Corrade is running off. Creates or updates a script by reading the file passed to the optional path parameter and setting the script source code 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 script from binary asset data.
create True or False description A string. The command attempts to update an existing script and if create is set to True (default is False), then the script will first be created if it does not exist and then updated.

Notes

  • The command will return the asset UUID and the inventory UUID of the created or updated script if successful as well as any outstanding compiler errors.

secondlife/scripted_agents/corrade/api/progressive/commands/updatescript.txt ยท Last modified: 2017/05/28 21:01 by Wizardry and Steamworks

Access website using Tor


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