VL Furniture Devkit

From GridPlay
VenLife Furniture / Food DevKit
Marketplace https://marketplace.secondlife.com/p/VenLife-Dev-Kit/23791939

Furniture / Food DevKit

Our dev kit somes with one script that can be used in items like a couch

Does require a notecard in the same prim as the core DevKit script and named vl config

All included in the package.

Only item in the package that is not full perm is the core DevKit script itself. It is set to no mod for security reasons.

  • 99 - You send a message on this channel
  • 98 - Dev Kit script sends a message on this channel

Example of how to process incoming

// Message Link channels. Please see our wiki on how this works
integer LinkIn = 98; // You send a message to this script
integer LinkOut = 99; // This sends a message out to other scripts you make
// numbers are so this script doesnt get confused with its own messages
default {
	touch_end(integer num_detected) {
		llMessageLinked(LINK_THIS, LinkOut, "menu", llDetectedKey(0));
		//llMessageLinked(LINK_THIS, LinkOut, "use", llDetectedKey(0));
	link_message(integer sender_num, integer num, string str, key id) {
		if (num == LinkIn) {
			if (llJsonValueType(str, ["uri"]) != JSON_INVALID) {
                string uri = llJsonGetValue(str, ["uri"]);
                if (uri == "confirm") {
                	llSay(0, "Usage Confirmed");
                if (uri == "Stats") {

URI are confirm and Stats

Stats uri will return the stats from the HUD of the person with id in JSON format

To Send a message to the script is easy

string json = llList2Json(JSON_OBJECT, ["uri","menu"]);
key id = llDetectedKey(0);
llMessageLinked(LINK_THIS, 99, json, id);

Options are menu and getstats

menu will open a dialog menu to id with a option to use the item