Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- key ToucherID;
- integer channelDialog;
- default
- {
- state_entry()
- {
- channelDialog = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
- llListen(channelDialog, "", ToucherID, "");
- }
- listen(integer channel, string name, key id, string message)
- {
- if (message)
- {
- llSay(0,message+" was selected. You will be given this notecard shortly.");
- llGiveInventory(llDetectedKey(0), message);
- }
- }
- touch_start(integer num_detected)
- {
- list InventoryList;
- integer count = llGetInventoryNumber(INVENTORY_NOTECARD);// Count of all items in prim's contents
- string ItemName;
- while (count--)
- {
- ItemName = llGetInventoryName(INVENTORY_NOTECARD, count);
- if (ItemName != llGetScriptName() )
- InventoryList += ItemName;// add all notecards to a list
- }
- ToucherID = llDetectedKey(0);
- llDialog(ToucherID, "What book would you like?", InventoryList, channelDialog);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement