// Send an IM using the text in helpmsg to the objects owner on touch. // Will also send an acknowledgement IM using the text in ackmsg to the touching av. // // Optionally, if a notecard exists in the prim, it will also // send that to the owner, as an extra, more 'in your face' prompt. // // Kimm Paulino // Written for Synonyme Toll, Aug 2011 string helpmsg = "Someone needs help!"; string ackmsg = "I've IM'd Syn, the store owner. If she doesn't materialise in a puff of smoke in the next few minutes, " + "well, I guess she is offline or afk, but I'm sure she will get back to you as soon as she can. Do feel free to " + "continue browsing and thank you for stopping by the home of Synz Creations - http://synzcreations.wordpress.com/"; default { touch_start (integer num_detected) { key owner = llGetOwner(); key sender = llDetectedKey(0); string name = llKey2Name (sender); list timestamp = llParseString2List(llGetTimestamp(),["T","."],[""]); string time = llList2String(timestamp, 0) + " " + llList2String(timestamp, 1); llInstantMessage (sender, ackmsg); llInstantMessage (owner, time + " " + helpmsg + " [" + name + "]"); // as an extra prompt, if a notecard is stored in the prim, send that // to the owner too ... string nc = llGetInventoryName(INVENTORY_NOTECARD, 0); if (nc != "") llGiveInventory(owner, nc); } }