It's not exactly rocket science but hoepfully it's useful. I thought i should stick up the core part of my notecard reading script. Although this can give misleading results if other avatars are near the object it is an alternate way to get the avatars name once a notecard is posted. Quite often i read in configuration settings from a notecard. Furthermore using the llSensor(“”, NULL_KEY, AGENT_BY_LEGACY_NAME, 10.0, PI) it scans an area of 10 meters radius. The main task of this function is to detect the nearby avatars. This information consists of two elements, which are the name of the object being posted and the name of the avatar that made the post.Īs shown in the code snippet above, the sensor() function was used to detect the name of who made the post. This triggers the llEmail() method, which sends an e-mail to the owner with the respective information. This script uses the changed() function which detects the changes made to the inventory once someone drops a notecard. LlEmail(emailAddress, emailHeader, “An object named ‘” + name + “‘ was posted to you by ” + avatarName ) Integer index = llListFindList(notes,(list)name) String name = llGetInventoryName(note,i) Integer invNum = llGetInventoryNumber(note) LlSensor(“”, NULL_KEY, AGENT_BY_LEGACY_NAME, 10.0, PI) The below code snippet shows how this function works.Ĭode 1 – Accepting Objects and Sending an E-mail. This informs him about the object being mailed. Additionally, when someone performs a post an e-mail is automatically sent to the owner, Figure 1 below. By dropping notecards to this object, avatars will automatically post them to the mailbox inventory. Note: This function delays the script for 0.1 seconds.Įxample: // Read out a complete notecard from the object's inventory.The main function of the mailbox object is to accept notecards from others. Requests from notecards that contain embedded inventory items will always result in EOF, regardless of the line being requested. Note that lines longer than 255 characters will be truncated without any indication that this has been done. If name is not a valid notecard, or if the notecard is empty, the object will print to the Script Errors/Warning window, “Couldn’t find notecard NAME” where “NAME” is the name of the invalid notecard. you should keep in mind that any time you edit and save such a notecard, it will get a new key. Name can be either a string containing the name of a notecard in the object’s inventory, or a key pointing to a notecard (that can be anywhere and doesn’t have to reside in the object). The key returned by llGetNotecardLine is a unique identifier which will be supplied to the dataserver event as the queryid parameter. On one group, write data that represents orders (one order per card). LSL scripts, information written on notecards, and so on. Divide a stack of blank note cards (index cards) into three groups. You can get the number of lines in a notecard with llGetNumberOfNotecardLines. A script is basically a small computer program written in LSL (Linden Scripting Language). If the requested line is past the end of the notecard, the dataserver event will return the constant EOF (“End Of File”) string. This function fetches line number of notecard name and returns the data through the dataserver event. Key llGetNotecardLine( string name, integer line)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |