daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Jan 8th, 2019 88 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.        llGiveInventory(llDetectedKey(0), message);
  16.         }
  17.     }
  18.     touch_start(integer num_detected)
  19.     {
  20.         list    InventoryList;
  21.         integer count = llGetInventoryNumber(INVENTORY_NOTECARD);// Count of all items in prim's contents
  22.         string  ItemName;
  23.         while (count--)
  24.         {
  25.             ItemName = llGetInventoryName(INVENTORY_NOTECARD, count);
  26.             if (ItemName != llGetScriptName() )  
  27.             InventoryList += ItemName;// add all notecards to a list
  28.         }
  29.         ToucherID = llDetectedKey(0);
  30.         llDialog(ToucherID, "What book would you like?", InventoryList, channelDialog);
  31.     }
  32. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top