Tutorials_for_BDFD

guess number

Aug 30th, 2022
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. variable :
  2.  
  3. numbers = 0
  4.  
  5. item 1
  6.  
  7. Trigger : !number guessing
  8.  
  9.  
  10.  
  11. $note
  12. $setUserVar[numbers;$random[1;5]]
  13. $addButton[no;buttonguess1-$authorID;1;primary;no;]
  14. $addButton[no;buttonguess2-$authorID;2;primary;no;]
  15. $addButton[no;buttonguess3-$authorID;3;primary;no;]
  16. $addButton[no;buttonguess4-$authorID;4;primary;no;]
  17. $title[:1234: __ERATE THE NUMBER__]
  18. $description[Select the correct number below to win. You only have a guess]
  19. $thumbnail[$authorAvatar]
  20. $color[447f4]
  21. $suppressErrors
  22.  
  23.  
  24. Item 2:
  25.  
  26. Trigger : $onInteraction
  27.  
  28. $note
  29. $if[$customID==buttonguess1-$authorID]
  30. $if[$getUserVar[numbers]==1]
  31. $editButton[buttonguess1-$authorID;✅;success;yes;]
  32. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  33. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  34. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  35. $setUserVar[numbers;$random[1;5]]
  36. $title[:1234: __Correct Number__]
  37. $description[✅┃You chose the right number]
  38. $thumbnail[$authorAvatar]
  39. $color[447f4]
  40. $else
  41. $editButton[buttonguess1-$authorID;❌;danger;yes;]
  42. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  43. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  44. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  45. $title[:1234: __Wrong number__]
  46. $description[❌ ┃ You dialed the wrong number while `$getUserVar[numbers]`]
  47. $thumbnail[$authorAvatar]
  48. $color[447f4]
  49. $endif
  50. $endif
  51.  
  52.  
  53. $if[$customID==buttonguess2-$authorID]
  54. $if[$getUserVar[numbers]==2]
  55. $editButton[buttonguess2-$authorID;✅;success;yes;]
  56. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  57. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  58. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  59. $setUserVar[numbers;$random[1;5]]
  60. $title[:1234: __Right__]
  61. $description[✅┃You chose the right number]
  62. $thumbnail[$authorAvatar]
  63. $color[447f4]
  64. $else
  65. $editButton[buttonguess2-$authorID;❌;danger;yes;]
  66. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  67. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  68. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  69. $title[:1234: __Wrong number___]
  70. $description[❌┃You dialed the wrong number, the correct number was `$getUserVar[numbers]`]
  71. $thumbnail[$authorAvatar]
  72. $color[447f4]
  73. $endif
  74. $endif
  75.  
  76.  
  77. $if[$customID==buttonguess3-$authorID]
  78. $if[$getUserVar[numbers]==3]
  79. $editButton[buttonguess3-$authorID;✅;success;yes;]
  80. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  81. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  82. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  83. $setUserVar[numbers;$random[1;5]]
  84. $title[:1234: __Right__]
  85. $description[✅┃You chose the right number]
  86. $thumbnail[$authorAvatar]
  87. $color[447f4]
  88. $else
  89. $editButton[buttonguess3-$authorID;❌;danger;yes;]
  90. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  91. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  92. $editButton[buttonguess4-$authorID;4;secondary;yes;]
  93. $title[:1234: __Wrong number__]
  94. $description[You dialed the wrong number, the correct number was `$getUserVar[numbers]`]
  95. $thumbnail[$authorAvatar]
  96. $color[447f4]
  97. $endif
  98. $endif
  99.  
  100.  
  101. $if[$customID==buttonguess4-$authorID]
  102. $if[$getUserVar[numbers]==4]
  103. $editButton[buttonguess4-$authorID;✅;success;yes;]
  104. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  105. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  106. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  107. $setUserVar[numbers;$random[1;5]]
  108. $title[:1234: __Right__]
  109. $description[✅┃You chose the right number]
  110. $thumbnail[$authorAvatar]
  111. $color[447f4]
  112. $else
  113. $editButton[buttonguess4-$authorID;❌;danger;yes;]
  114. $editButton[buttonguess2-$authorID;2;secondary;yes;]
  115. $editButton[buttonguess3-$authorID;3;secondary;yes;]
  116. $editButton[buttonguess1-$authorID;1;secondary;yes;]
  117. $title[:1234: __Wrong number__]
  118. $description[❌┃You dialed the wrong number, the correct number was `$getUserVar[numbers]`]
  119. $thumbnail[$authorAvatar]
  120. $color[447f4]
  121. $endif
  122. $endif
  123. $suppressErrors
Advertisement
Add Comment
Please, Sign In to add comment