Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Read Notecard DataServer Example
- //by Hank Ramos
- string notecardName;
- integer lineCounter;
- key dataRequestID;
- list List;
- default
- {
- state_entry()
- {
- llSay(0, "Ready. Click to start.");
- }
- touch_start(integer num_detected)
- {
- state readNotecard;
- }
- }
- state readNotecard
- {
- state_entry()
- {
- notecardName=llGetInventoryName(INVENTORY_NOTECARD,0);
- lineCounter = 0;
- dataRequestID = llGetNotecardLine(notecardName, lineCounter);
- }
- dataserver(key queryid, string data)
- {
- if (dataRequestID)
- {
- if (data != EOF)
- {
- llOwnerSay(data);
- List+=data;
- lineCounter += 1;
- llSleep(6);
- dataRequestID = llGetNotecardLine(notecardName, lineCounter);
- }
- else if (data == EOF)
- {
- llOwnerSay("End of the list, touch again");
- llResetScript();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment