Advertisement
IzanaYT

Sistema de Niveles Avanzado en BDFD

Aug 12th, 2023 (edited)
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 6.11 KB | None | 0 0
  1. Soporte:
  2. Discord:
  3.  
  4. Varibles Necesarias
  5. Nombre: xp
  6. Valor: 0
  7.  
  8. Nombre: subir
  9. Valor: 50
  10.  
  11. Nombre: nivel
  12. Valor: 0
  13.  
  14. Nombre: role1
  15. Valor:
  16.  
  17. Nombre: role2
  18. Valor:
  19.  
  20. Nombre: role3
  21. Valor:
  22.  
  23. Nombre: role4
  24. Valor:
  25.  
  26. Nombre: role5
  27. Valor:
  28.  
  29. Nombre: role6
  30. Valor:
  31.  
  32. Nombre: role7
  33. Valor:
  34.  
  35. Nombre: role8
  36. Valor:
  37.  
  38. Nombre: role9
  39. Valor:
  40.  
  41. Nombre: role10
  42. Valor:
  43.  
  44.  
  45.  
  46.  
  47.  
  48. Postada:Por cada seccion debe crear un nuevo comando.
  49.  
  50.  
  51. 1.- Nivelacion de XP y Niveles
  52. Posdata:
  53. - Debe crear este codigo desde la a - z y en mayusculas A - z, una vocal por cada comando.
  54. - Necesita Mode Unstable el codigo.
  55.  
  56. Prefix: a-z A-Z
  57. Codigo:
  58. $nomention
  59. $if[$getUserVar[xp;$authorID]>$getUserVar[subir;$authorID]]
  60.  
  61.  
  62. $setUserVar[nivel;$sum[$getUserVar[nivel;$authorID];1];$authorID]
  63.  
  64. $setUserVar[subir;$sum[$getUserVar[subir;$authorID];100];$authorID]
  65.  
  66. $setUserVar[xp;0;$authorID]
  67.  
  68. $channelSendMessage[$replaceText[$replaceText[%$checkCondition[$getServerVar[channel]==]%;%true%;$channelID;1];%false%;$getServerVar[channel];1];$replaceText[$replaceText[$checkCondition[$getServerVar[lvlmessage]==];true;<@$authorID> felicidades subiste de nivel **$sum[$getUserVar[nivel];1].** GG!;1];false;$replaceText[$replaceText[$replaceText[$getServerVar[lvlmessage];{mention};<@$authorID>;-1];{level};$sum[$getUserVar[nivel];1];-1];{username};$username;-1];1]]
  69.  
  70. $else
  71. $if[$getUserVar[xp]<$getUserVar[subir]]
  72. $setUserVar[xp;$sum[$getUserVar[xp;$authorID];$random[0;30]];$authorID]
  73. $endif
  74. $endif
  75.  
  76.  
  77.  
  78. $if[$roleExists[$getServerVar[role2]]==true]
  79. $if[$getUserVar[nivel]==2]
  80. $roleGrant[$authorID;+$getServerVar[role2]]
  81. $endif
  82. $endif
  83.  
  84.  
  85. $if[$roleExists[$getServerVar[role3]]==true]
  86. $if[$getUserVar[nivel]==3]
  87. $roleGrant[$authorID;+$getServerVar[role3]]
  88. $endif
  89. $endif
  90.  
  91.  
  92. $if[$roleExists[$getServerVar[role4]]==true]
  93. $if[$getUserVar[nivel]==4]
  94. $roleGrant[$authorID;+$getServerVar[role4]]
  95. $endif
  96. $endif
  97.  
  98.  
  99. $if[$roleExists[$getServerVar[role5]]==true]
  100. $if[$getUserVar[nivel]==5]
  101. $roleGrant[$authorID;+$getServerVar[role5]]
  102. $endif
  103. $endif
  104.  
  105.  
  106. $if[$roleExists[$getServerVar[role6]]==true]
  107. $if[$getUserVar[nivel]==6]
  108. $roleGrant[$authorID;+$getServerVar[role6]]
  109. $endif
  110. $endif
  111.  
  112.  
  113. $if[$roleExists[$getServerVar[role7]]==true]
  114. $if[$getUserVar[nivel]==7]
  115. $roleGrant[$authorID;+$getServerVar[role7]]
  116. $endif
  117. $endif
  118.  
  119.  
  120. $if[$roleExists[$getServerVar[role8]]==true]
  121. $if[$getUserVar[nivel]==8]
  122. $roleGrant[$authorID;+$getServerVar[role8]]
  123. $endif
  124. $endif
  125.  
  126.  
  127. $if[$roleExists[$getServerVar[role9]]==true]
  128. $if[$getUserVar[nivel]==9]
  129. $roleGrant[$authorID;+$getServerVar[role9]]
  130. $endif
  131. $endif
  132.  
  133.  
  134. $if[$roleExists[$getServerVar[role10]]==true]
  135. $if[$getUserVar[nivel]==10]
  136. $roleGrant[$authorID;+$getServerVar[role10]]
  137. $endif
  138. $endif
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. 2.- Establecer el canal donde ira el mensaje cuando el bot envie cuando alguien subio de nivel.
  150. Posdata:
  151. - Si no se establecio un canal el codigo devolvera el mensaje en cualquier canal cuando alguien suba de nivel.
  152.  
  153. Prefix: !levelchannel
  154.  
  155. Codigo:
  156. $nomention
  157. $if[$checkUserPerms[$authorID;admin]==false]
  158. $sendMessage[$getVar[x] Necesitas el permiso "admi" para hacer esto]
  159. $stop
  160. $endif
  161.  
  162.  
  163. $if[$isSlash==false]
  164. $if[$mentionedChannels[1]!=]
  165. $if[$channelExists[$mentionedChannels[1]]==true]
  166. $getVar[c] Se establecio la subida de niveles en <#$mentionedChannels[1]>
  167. $setServerVar[channel;$mentionedChannels[1];$guildID]
  168. $else
  169. $getVar[x] El canal `$mentionedChannels[1]` no existe en el servidor.
  170. $endif
  171. $else
  172. $getVar[x] Falta de argumentos, menciona un canal valido.
  173. ```Uso:
  174. levelchannel  <mencioncanal>```
  175.  
  176. $endif
  177. $else
  178. $if[$channelExists[$message[channel]]==true]
  179. $description[$getVar[c] Se establecio la subida de niveles en <#$message[channel]>]
  180. $setServerVar[channel;$message[channel];$guildID]
  181. $color[#4e7dd7]
  182. $else
  183. $description[$getVar[x] El canal no existe en el servidor lo siento.]
  184. $color[#c13849]
  185. $endif
  186. $endif
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. 3.- 2.- Establecer un mensaje personalizado en el mensaje cuando un usuario suba de nivel
  199. Posdata:
  200. Tags:
  201. {username} = $username
  202. {level} = $sum[$getUserVar[nivel];1]
  203. {author} = <@$authorID>
  204.  
  205. Prefix: 1levelmessage
  206.  
  207. Codigo:
  208. $nomention
  209. $try
  210. $onlyIf[$checkUserPerms[$authorID;admin]==true;]
  211. $catch
  212. $sendMessage[$getVar[x] Necesitas el permiso de "admi" para hacer esto]
  213. $stop
  214. $endtry
  215.  
  216.  
  217. $if[$isSlash==false]
  218. $if[$message!=]
  219. $sendMessage[$getVar[c] Se guardo exitosamente el mensaje de subida de niveles
  220. $replaceText[$replaceText[$checkContains[$message;{username};{mention};{level}];true;;-1];false;<:bad:1137873995576918088> Te sugerimos usar los tags.]]
  221. $setServerVar[lvlmessage;$message]
  222. $else
  223. $sendMessage[Pon un texto o una oracion usando los tags <:god:1137871924152770720> ]
  224. $endif
  225. $else
  226. $sendMessage[$getVar[c] Se guardo exitosamente el mensaje de subida de niveles
  227. $replaceText[$replaceText[$checkContains[$message[text];{username};{mention};{level}];true;;-1];false;<:bad:1137873995576918088> Te sugerimos usar los tags.]]
  228. $setServerVar[lvlmessage;$message[text]]
  229. $endif
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241. 4.- Agrega XP alos usuarios.
  242.  
  243. Prefix: !addxp
  244.  
  245. Codigo:
  246. $nomention
  247.  
  248. $if[$isSlash==true]
  249. $getVar[c] Completado le diste `$numberSeparator[$message[amount]]XP` a $username[$message[user]]
  250.  
  251. $setUserVar[xp;$sum[$message[amount];$getUserVar[xp;$message[user]]];$message[user]]
  252. $else
  253. $onlyIf[$checkUserPerms[$authorID;admin]==true;$getVar[x] Necesitas el permisos de "admi" para esto]
  254.  
  255. $onlyIf[$userExists[$mentioned[1]]==true;$getVar[x] El usuario no existe lo siento.]
  256.  
  257. $onlyIf[$noMentionMessage<$getUserVar[subir;$mentioned[1]];$getVar[x] No puedes agregar mas `XP` del limite $getUserVar[subir;$mentioned[1]].]
  258.  
  259. $onlyIf[$isNumber[$noMentionMessage]==true;$getVar[x] Solo numeros por favor.]
  260.  
  261. $onlyIf[$mentioned[1]!=;<:god:1137871924152770720> Menciona un usuario]
  262.  
  263. $onlyIf[$isBot[$mentioned[1]]==false;
  264. $getVar[x] No puedes dar dinero a bots.]
  265.  
  266. $onlyIf[$mentioned[1]!=$botID;<:sonr:1137837724066385992> Yo no puedo recibir dinero.]
  267.  
  268.  
  269.  
  270. $sendMessage[$getVar[c] Completado le diste `$numberSeparator[$noMentionMessage]XP` a $username[$mentioned[1]]]
  271.  
  272. $setUserVar[xp;$sum[$noMentionMessage;$getUserVar[xp;$mentioned[1]]];$mentioned[1]]
  273.  
  274. $endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement