Make a llListen() usable integer from an UUID, using an application key (integer specific to that product).
The channel will follow the application key sign (if negative, the channel will be negative too).
integer APP_KEY = 455867;
integer key2chan(key id, integer app) {
integer mult = 1;
if (app < 0) mult = -1;
return mult * ((app ^ (integer)("0x" + (string)id)) & 0x7fffffff);
}
default {
state_entry() {
// use owner key to have any object knowing APP_KEY talking with us
integer negative_channel_for_listeners = key2chan(llGetOwner(), -APP_KEY);
// use object key to restrict to our object (ideal for RLV replies)
integer positive_channel_for_rlv = key2chan(llGetKey(), APP_KEY);
}
}string APPKEY="c77f2965-7061-41a2-b84a-77ad84bdbfdd"; // get this from any object
integer key2chan(key user) {
return 0x80000000 | ((integer)("0x"+llGetSubString(user, 0, 7)) ^ (integer)("0x"+llGetSubString(APPKEY, 0, 7)));
}
default {
state_entry() {
// use owner key to have any object knowing APP_KEY talking with us
integer negative_channel_for_listeners = key2chan(llGetOwner());
}
}string APPKEY="c77f2965-7061-41a2-b84a-77ad84bdbfdd"; // get this from any object
integer key2chan(key user) {
return 0x7fffffff & ((integer)("0x"+llGetSubString(user, 0, 7)) ^ (integer)("0x"+llGetSubString(APPKEY, 0, 7)));
}
default {
state_entry() {
// use owner key to have any object knowing APP_KEY talking with us
integer positive_channel_for_listeners = key2chan(llGetOwner());
}
}integer key2chan(key user) {
return 0x80000000 | ((integer)("0x"+llGetSubString(user, 0, 7)) ^ ((integer)llFrand(0x7FFFFF80) + 1));
}
default {
state_entry() {
// use owser key to have a unique menu channel
integer menu_channel = key2chan(llGetOwner());
}
}