SHARE
TWEET

Untitled

a guest Aug 31st, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string Type;
  2. string Color;
  3. string Error;
  4. integer listenHandle;
  5. integer step;
  6.  
  7. remove_listen_handle()
  8. {
  9.     llListenRemove(listenHandle);
  10. }
  11.  
  12. default
  13. {
  14.     state_entry()
  15.     {
  16.         listenHandle = llListen(14995, "", llGetOwner(), "");
  17.         step = 1;
  18.     }
  19.  
  20.     touch_start(integer total_number)
  21.     {
  22.         step = 2;
  23.         llOwnerSay("@getinv:Wardrobe/Layer2/Bottom/=14995");
  24.     }
  25.     listen(integer channel, string name, key id, string message)
  26.     {
  27.         if(step = 2)
  28.         {
  29.             list RawTypes = llCSV2List(message);
  30.             list RandomTypes = llListRandomize(RawTypes, 1);
  31.             string Type = llList2String(RandomTypes, 0);
  32.             string Type2 = llList2String(RandomTypes, 1);
  33.             Error = "";
  34.             if(Type == Error)
  35.             {
  36.                 Type = Type2;
  37.             }
  38.             step = 3;
  39.             llOwnerSay("@getinv:Wardrobe/Layer2/Bottom/"+Type+"=14995");
  40.         }
  41.         else if(step = 3)
  42.         {
  43.             list RawColors = llCSV2List(message);
  44.             list RandomColors = llListRandomize(RawColors, 1);
  45.             string Color = llList2String(RandomColors, 0);
  46.             string Color2 = llList2String(RandomColors, 1);
  47.             Error = "";
  48.             if(Color == Error)
  49.             {
  50.                 Color = Color2;
  51.             }
  52.             step = 4;
  53.             llSay(0, "I chose type: "+Type+" and color: "+Color+".");
  54.         }
  55.         else if (step += 4);
  56.         {
  57.            llSay(14995, "Script finished. Removing handle now.");
  58.            remove_listen_handle();
  59.            llResetScript();
  60.         }
  61.     }
  62.  
  63.     on_rez(integer start_param)
  64.     {
  65.         llResetScript();
  66.     }
  67.  
  68.     changed(integer change)
  69.     {
  70.         if (change & CHANGED_OWNER)
  71.         {
  72.             llResetScript();
  73.         }
  74.     }
  75. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top