Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sending IMs to a specific user?

Xerxes Qinan
Registered User
Join date: 12 Feb 2007
Posts: 10
02-27-2007 17:53
I'm trying to use llInstantMessage, but I don't have the key of the specific user I want to send it to. Is there a way to look up avatar UUIDs? Or do I have to place an object owned by the specific avatar in the sim and use a complex system of GetOwnerKey to acheive this?
Kermitt Quirk
Registered User
Join date: 4 Sep 2004
Posts: 267
02-27-2007 18:14
There are external services like the one at w-hat (http://w-hat.com/name2key) which you can call with llHTTPRequest, but I wouldn't recommend them if you want to guarantee delivery of the message because they only contain a subset of the avatars in SL. In most cases you'd be best to collect the key yourself using a sensor or a touch event (or whatever makes sense in your situation).
Xerxes Qinan
Registered User
Join date: 12 Feb 2007
Posts: 10
02-27-2007 18:28
Yeah, um...noob question...how do I get the key with a sensor?

EDIT: Never mind, I think Name2Key works. I just don't know how to call it with llHTTPRequest...
Masakazu Kojima
ケロ
Join date: 23 Apr 2004
Posts: 232
02-27-2007 18:54
http://rpgstats.com/wiki/index.php?title=LlHTTPRequest name2key example near the bottom
http://www.moopf.com/blog/?p=16 example using moopf's database

Getting key with a sensor:
CODE
string NAME = "Masakazu Kojima"; // whose key you want
default {
state_entry() { llSensor(NAME, NULL_KEY, AGENT, 96, PI); }
no_sensor() { llOwnerSay( NAME + " not found nearby." ); }
sensor(integer num) {
llOwnerSay( NAME + "'s key is " + (string)llDetectedKey(0) );
}
}