Advertisement
Gayngel

Gender selection script

Jun 10th, 2018
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer lchan;
  2. integer lhandle;
  3. key Toucher;
  4.  
  5.  
  6. default
  7. {
  8.  
  9.     state_entry()
  10.     {
  11.  
  12.         lchan = -777;
  13.  
  14.  
  15.     }  
  16.  
  17.     touch_end(integer num)
  18.     {
  19.  
  20. Toucher = llDetectedKey(0);
  21. llListenRemove(lhandle);
  22. lhandle = llListen(lchan,"",Toucher,"");
  23.  
  24. llSetTimerEvent(0.0);
  25. llSetTimerEvent(60.0);
  26.  
  27.  
  28. llDialog(Toucher,"\nPlease select your gender:",["Male","Female","Trans","Other"],lchan);
  29.  
  30.  
  31.  
  32.     }
  33.  
  34.      listen(integer chan, string name, key id, string msg)
  35.     {
  36.  
  37.        
  38.     if(chan == lchan)
  39.     {
  40.  
  41.           if(msg == "Male")
  42.     llInstantMessage(Toucher,"You identified yourself as \"" +msg+"\"");
  43.  
  44.     else if(msg == "Female")
  45.     llInstantMessage(Toucher,"You identified yourself as \"" +msg+"\"");
  46.  
  47.     else if(msg == "Trans")
  48.     llInstantMessage(Toucher,"You identified yourself as \"" +msg+"\"");
  49.  
  50.     else if(msg == "Other")
  51.     llInstantMessage(Toucher,"You identified yourself as \"" +msg+"\"");
  52.  
  53.     }
  54.  
  55.  
  56.   }
  57.  
  58.     timer()
  59.     {
  60.  
  61. llListenRemove(lhandle);
  62. llSay(0,"Dialg timed out.");
  63.  
  64.     }
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement