Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Discussion: Group Updatable Library Index

Padraig Stygian
The thin mick
Join date: 15 Aug 2004
Posts: 111
11-06-2005 01:08
I have noticed that there are several group-owned repositories of information throughout SL, and that most of them use one prim per notecard to dispense infomation, so that each group member can contribute. However, since one can stick notecards on other notecards, it seems silly not to have a single group-updatable index.

This is a dirty, dirty hackjob of just that sort of system. If anyone wants to write a cleaner one, please do.

CODE

string notecard;
key user;
default
{
state_entry()
{
notecard = llGetInventoryName(INVENTORY_NOTECARD, 0);
}
touch_start(integer total_number)
{
user = llDetectedKey(0);
if(llSameGroup(user))
{
llListen(9981,"",user,"");
llSetTimerEvent(30);
llDialog(user, "Welcome to the Treve Scribery filing system. This listen will expire in 30 seconds.",["Read", "Write"],9981);
}
else
{
llGiveInventory(user, notecard);
}
}
timer()
{
llListenRemove(0);
llAllowInventoryDrop(FALSE);
llDialog(user, "Time expired. Please touch the system again if you are not finished using it.",[],9981);
}
listen(integer channel, string name, key id, string message)
{
if (message == "Read")
{
llSetTimerEvent(0);
llGiveInventory(user, notecard);
}
else if (message == "Write")
{
llDialog(user, "Please drop the new index into the contents of this scroll rack.",[],9981);
llSetTimerEvent(60);
llAllowInventoryDrop(TRUE);
}
}
changed(integer change)
{
if (change & CHANGED_INVENTORY)
{
llRemoveInventory(notecard);
llAllowInventoryDrop(FALSE);
llResetScript();
}
}
}
_____________________
(You): Aww! My pants won't rez! Does this texture look okay on me?

Incidental Radio :: Because nothing is by design
Now featuring Torley-tastic technomusic!
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
original thread
11-09-2005 10:38
/15/ca/70127/1.html
_____________________
i've got nothing. ;)