When you enter a SIM you click Search on the HUD and it asks the nearby vendors containing the Shopping HUD Info script about their contents. The vendors reply by email to save on the sim lag and they send picture and descriptions of the items they sell.
Then the HUD owner can browse through the items without moving and then can find a vendor by pressing Locate. This will move the avatar to the vendor.
It is very experimental and there might be issues in large sims with many vendors. On the other hand you don't need to use it on every vendor in your sim you can only drop it on a few well chosen places.
About lag, it shouldn't add much lag to the sim since it uses the email system to communicate.
So it comes into 3 parts, the first is the notecard you add to the vendor here is a sample one, it shall be called "Shopping Hud".
The first line is the description of the item.
The second line is the name or the UUID of the image to display on the HUD (FULL PERMS). If you provide the name the image must be in the vendor.
The third line is the price of the item it can be a price range too like 10-500. You can put as many as you want but I would advice against putting too many of these because of the lag issues.
Another nice outfit
nice
50
Another useful item
2ef4b857-955b-c0af-cd22-fde694a8f8c7
100-300
You need this script to put into the vendors. It relies on the HUD being named "Shopping HUD" or it won't listen to it.
string NotecardName = "Shopping Hud" ;
integer Line ;
key QueryID ;
integer SHChannel = 69 ;
key ObjectID ;
integer Handle ; // Listener Handle
string EMailDest ; // object destination
string Message ; // name and price of item
key ImageKey ; // image to display
// Ezhar Fairlight function
integer IsKey(string str) { // returns TRUE if string is a key
return ( (llStringLength(str) == 36) &&
(llGetSubString(str, 8,


(llGetSubString(str, 13, 13) == "-"

(llGetSubString(str, 18, 1


(llGetSubString(str, 23, 23) == "-"

}
default
{
state_entry()
{
Handle = llListen(SHChannel, "Shopping HUD", NULL_KEY, ""

}
listen(integer channel, string name, key id, string message)
{
if (message == "SHQ:"

{
llListenControl(Handle, FALSE) ;
EMailDest = (string)id + "@lsl.secondlife.com" ;
Line = 0 ;
QueryID = llGetNotecardLine(NotecardName, Line) ;
}
}
dataserver(key query_id, string data) {
integer l ;
key k ;
if (query_id == QueryID) {
if ((data != EOF)) { // not at the end of the notecard
l = Line % 3 ;
if (l == 0)
{
Message = data ;
}
else if (l == 1)
{
if (IsKey(data))
{
ImageKey = (key)data ;
}
else // it was not a key but a texture name
{
ImageKey = llGetInventoryKey(data) ;
}
}
else if (l == 2)
{
Message += ", " + data + "L$" ;
llEmail(EMailDest, ImageKey, Message) ;
}
++Line; // increase line count
QueryID = llGetNotecardLine(NotecardName, Line) ; // request next line
}
else
{
llListenControl(Handle, TRUE) ;
}
}
}
}
to be continued with the shopping hud script....