Posted to tcl by dandyn at Wed Mar 15 17:11:13 GMT 2023view raw

  1. bind pub -|- !random proc:random
  2. proc proc:random {nick host handle channel arg} {
  3.  
  4.  
  5. set ::card_deck [list $::card_2a $::card_2b $::card_2c $::card_2d \
  6. $::card_3a $::card_3b $::card_3c $::card_3d \
  7. $::card_4a $::card_4b $::card_4c $::card_4d \
  8. $::card_5a $::card_5b $::card_5c $::card_5d \
  9. $::card_6a $::card_6b $::card_6c $::card_6d \
  10. $::card_7a $::card_7b $::card_7c $::card_7d \
  11. $::card_8a $::card_8b $::card_8c $::card_8d \
  12. $::card_9a $::card_9b $::card_9c $::card_9d \
  13. $::card_Ta $::card_Tb $::card_Tc $::card_Td \
  14. $::card_Ja $::card_Jb $::card_Jc $::card_Jd \
  15. $::card_Qa $::card_Qb $::card_Qc $::card_Qd \
  16. $::card_Ka $::card_Kb $::card_Kc $::card_Kd \
  17. $::card_Aa $::card_Ab $::card_Ac $::card_Ad \
  18. ]
  19.  
  20. set output [struct::list shuffle $::card_deck]
  21. putnow "PRIVMSG $channel : [lrange $output 0 4]"
  22. }
  23.  
  24. set ::card_2a "\\00391`2\003\"
  25. set ::card_2b "\\00352e2\003\"
  26. set ::card_2c "\\00352f2\003\"
  27. set ::card_2d "\\00391c2\003\"
  28.  
  29. set ::card_3a "\\00391`3\003\"
  30. set ::card_3b "\\00352e3\003\"
  31. set ::card_3c "\\00352f3\003\"
  32. set ::card_3d "\\00391c3\003\"
  33.  
  34. set ::card_4a "\\00391`4\003\"
  35. set ::card_4b "\\00352e4\003\"
  36. set ::card_4c "\\00352f4\003\"
  37. set ::card_4d "\\00391c4\003\"
  38.  
  39. set ::card_5a "\\00391`5\003\"
  40. set ::card_5b "\\00352e5\003\"
  41. set ::card_5c "\\00352f5\003\"
  42. set ::card_5d "\\00391c5\003\"
  43.  
  44. set ::card_6a "\\00391`6\003\"
  45. set ::card_6b "\\00352e6\003\"
  46. set ::card_6c "\\00352f6\003\"
  47. set ::card_6d "\\00391c6\003\"
  48.  
  49. set ::card_7a "\\00391`7\003\"
  50. set ::card_7b "\\00352e7\003\"
  51. set ::card_7c "\\00352f7\003\"
  52. set ::card_7d "\\00391c7\003\"
  53.  
  54. set ::card_8a "\\00391`8\003\"
  55. set ::card_8b "\\00352e8\003\"
  56. set ::card_8c "\\00352f8\003\"
  57. set ::card_8d "\\00391c8\003\"
  58.  
  59. set ::card_9a "\\00391`9\003\"
  60. set ::card_9b "\\00352e9\003\"
  61. set ::card_9c "\\00352f9\003\"
  62. set ::card_9d "\\00391c9\003\"
  63.  
  64. set ::card_Ta "\\00391`T\003\"
  65. set ::card_Tb "\\00352eT\003\"
  66. set ::card_Tc "\\00352fT\003\"
  67. set ::card_Td "\\00391cT\003\"
  68.  
  69. set ::card_Ja "\\00391`J\003\"
  70. set ::card_Jb "\\00352eJ\003\"
  71. set ::card_Jc "\\00352fJ\003\"
  72. set ::card_Jd "\\00391cJ\003\"
  73.  
  74. set ::card_Qa "\\00391`Q\003\"
  75. set ::card_Qb "\\00352eQ\003\"
  76. set ::card_Qc "\\00352fQ\003\"
  77. set ::card_Qd "\\00391cQ\003\"
  78.  
  79. set ::card_Ka "\\00391`K\003\"
  80. set ::card_Kb "\\00352eK\003\"
  81. set ::card_Kc "\\00352fK\003\"
  82. set ::card_Kd "\\00391cK\003\"
  83.  
  84. set ::card_Aa "\\00391`A\003\"
  85. set ::card_Ab "\\00352eA\003\"
  86. set ::card_Ac "\\00352fA\003\"
  87. set ::card_Ad "\\00391cA\003\"