Advertisement
Guest User

Untitled

a guest
Jan 8th, 2019
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. key ToucherID;
  2. integer channelDialog;
  3. default
  4. {
  5.     state_entry()
  6.     {
  7.     channelDialog = -1 - (integer)("0x" + llGetSubString( (string)llGetKey(), -7, -1) );
  8.     llListen(channelDialog, "", ToucherID, "");
  9.     }
  10.  listen(integer channel, string name, key id, string message)
  11.     {
  12.         if (message)
  13.         {
  14.         llSay(0,message+" was selected. You will be given this notecard shortly.");
  15.         }
  16.     }
  17.     touch_start(integer num_detected)
  18.     {
  19.         list    InventoryList;
  20.         integer count = llGetInventoryNumber(INVENTORY_NOTECARD);// Count of all items in prim's contents
  21.         string  ItemName;
  22.         while (count--)
  23.         {
  24.             ItemName = llGetInventoryName(INVENTORY_NOTECARD, count);
  25.             if (ItemName != llGetScriptName() )  
  26.             InventoryList += ItemName;// add all notecards to a list
  27.         }
  28.         ToucherID = llDetectedKey(0);
  29.         llDialog(ToucherID, "What book would you like?", InventoryList, channelDialog);
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement