Setting up OnRez vendors to hand out notecards
I checked out your shop today for the first time. A problem I identify is that apart from the vendor texture no other information on the objects on sale are given (unless you take the time to visit the web storefronts). Not being an impulse buyer that I am, I pleased myself wht window shopping. Thanks for the 3 freebies I got - two from lucky chairs and one for me simply being there :-) Note cards are one thing that I’ve noticed about the on-rez vendors. Just about every vendor system that I have worked with offers note cards when someone touches the preview panel. OnRez apparently does not. Instead, it gives you a URL for more details on their website. I posted a feature suggestion today for the folks to look over at OnRez. In the mean time, I found a way to do it one my own. Each time someone clicks the preview panel, I shoot off an email to a server that I created in-world with the avatars key, and the name of the product all in the subject. The server pulls out the product name and checks to see if a notecard exists by that name, or a few suffixes that I usually append on the end (Hat Info, Hat (boxed) Info, Hat (boxed)_nc, Hat (voucher)_nc). If the notecard is found, it sends it off to the avatar who touched the preview panel. Otherwise it sends them a message that the information could not be found, and it sends me a message as well so I can create a new one. This is an extreamly simple solution. I just drop a script into each of my vendors. string lastProduct; string notecardServer = “ac397da7-82f8-fc28-ea25-02aec84accf0@lsl.secondlife.com”; default { touch_start(integer total_number) { integer i; for(i = 0; i if(llGetLinkName(llDetectedLinkNumber(i)) == “Preview”) llEmail(notecardServer, (string)llDetectedKey(i) + lastProduct, “”); } link_message(integer sender, integer num, string msg, key id) { if(num != 1140) return; integer i = llSubStringIndex(msg, ” - “); if(i == -1) return; msg = llGetSubString(msg, i + 3, -1); i = llSubStringIndex(msg, “\n”); if(i == -1) return; msg = llGetSubString(msg, 0, i - 1); lastProduct = msg; } } And my notecard server looks like the following: init() { llOwnerSay(”My address is: ” + (string)llGetKey() + “@lsl.secondlife.com”); llSetTimerEvent(5.0); } string noteCardName(string product) { if(llGetInventoryType(product) == INVENTORY_NOTECARD) return product; if(llGetInventoryType(product + ” Info”) == INVENTORY_NOTECARD) return product + ” Info”; if(llGetInventoryType(product + “_nc”) == INVENTORY_NOTECARD) return product + “_nc”; if(llGetInventoryType(product + ” (boxed)_nc”) == INVENTORY_NOTECARD) return product + ” (boxed)_nc”; if(llGetInventoryType(product + ” (voucher)_nc”) == INVENTORY_NOTECARD) return product + ” (voucher)_nc”; return “”; } default { state_entry() { init(); } on_rez(integer start_param) { init(); } touch_start(integer total_number) { init(); } timer() { llGetNextEmail(”", “”); } email(string time, string address, string subj, string message, integer num_left) { key avatarId = (key)llGetSubString(subj, 0, 35); string product = llGetSubString(subj, 36, -1); string noteCard = noteCardName(product); if(noteCard != “”) { llGiveInventory(avatarId, noteCard); return; } llInstantMessage(llGetOwner(), “Notecard not found for ” + product); llInstantMessage(avatarId, “A notecard was not found for this item.”); } } Woodbridge (83, 81) - Jan 27, 2008 (309 days ago) by Dedric Mauriac Tags for this Snapshot0 01 1 1140 2008 22 3 35 36 5 ac397da782f8fc28ea2502aec84accf0lsl address apparently append avatar avatarid avatars awake blockquote blockquotei blog blogspot boxed br buyer cards chairs checked checks clicks comment comments create created day dedricmauriac default details drop early email end exists extreamly feature folks found freebies hand hat heard hrefhttp identify impulse info information init integer interesting inventorynotecard inworld item items key kind lastproduct leave linkmessage list lldetectedkey lldetectedlinknumber llemail llgetinventorytype llgetkey llgetlinkname llgetnextemail llgetowner llgetsubstring llgiveinventory llinstantmessage llownersay llsettimerevent llsubstringindex lsl lucky make message msg n nc note notecard notecardname notecards notecardserver noticed num numleft objects offers onrez p panel people peter pleased posted preview problem product project pulls question return sale script secondlife sender sends server setting shoot shop shopping simple simply solution startparam stateentry stick stindberg storefronts string subj subject suffixes suggestion system texture thing things time timer today totalnumber touched touches touchstart url vendor vendors visit voucher web website wherearethepeople wht window woodbridge wordpress worked xmp Leave a CommentYou're not logged in. If you want to post a comment, please log in. |
Snapshots NearbyHere are some other snapshots from this area:
Send in your snapshotsTo send in your own snapshots, simply send them as postcards to pics@slbuzz.com directly from within Second Life. You don't even need to be an SLBuzz member! So give it a shot! If you want to, we can even crosspost them to your flickr account automagically—simply link your SLBuzz account with flickr, and send snapshots to flickr@slbuzz.com. |