Advertisement
Guest User

TzBolão - TzMarcio y.y

a guest
May 22nd, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. options:
  2. Anuncios: 3
  3. TempoEntre: 3
  4.  
  5. variables:
  6. {TzEvento.Bolao.iniciado} = false
  7.  
  8. command /Bolao [<text>]:
  9. trigger:
  10. if arg 1 is "iniciar":
  11. if player has permission "Bolao.admin":
  12. set {TzEvento.Bolao.iniciado} to true
  13. loop {@Anuncios} times:
  14. if {TzEvento.Bolao.iniciado} is true:
  15. replace "<none>" with "0" in {Valor.acumulado}
  16. replace "<none>" with "NENHUM" in {Ultimo.Apostador}
  17. broadcast " "
  18. broadcast "&3&l[BOLAO] &bPara participar digite&f: /bolao apostar"
  19. broadcast "&3&l[BOLAO] &bCusto da aposta&f: &61000&f(1k)"
  20. broadcast "&3&l[BOLAO] &bStatus&f: /bolao status"
  21. broadcast " "
  22. wait {@TempoEntre} seconds
  23. if {TzEvento.Bolao.iniciado} is true:
  24. if {bolado} is true:
  25. set {TzEvento.Bolao.iniciado} to false
  26. broadcast " "
  27. broadcast "&3&l[BOLAO] &bSorteando jogador aleatório.."
  28. broadcast " "
  29. wait 5 seconds
  30. set {Ganhador} to a random element out of {apostadores::*}
  31. wait 1 seconds
  32. make console execute command "/fe grant %{Ganhador}% %{Valor.acumulado}%"
  33. send "&3&l[BOLAO] &bVocê venceu!" to {Ganhador}
  34. send "&3&l[BOLAO] &bValor acumulado: &6%{Valor.acumulado}%&b." to {Ganhador}
  35. wait 2 seconds
  36. broadcast " "
  37. broadcast "&3&l[BOLAO] &6%{Ganhador}% &bGanhou: &6%{Valor.acumulado}%&b coins"
  38. broadcast " "
  39. clear {Valor.acumulado}
  40. clear {Ganhador}
  41. clear {Apostou::*}
  42. clear {Ultimo.Apostador}
  43. clear {Apostadores::*}
  44. add 0 to {Valor.acumulado}
  45. set {Ultimo.Apostador} to "Ninguem"
  46. else:
  47. broadcast " "
  48. broadcast "&4&l[BOLAO] &cO evento foi cancelado por não haver apostas!"
  49. broadcast "&4&l[BOLAO] &cO evento acontecerá novamente em outro horário."
  50. broadcast " "
  51. wait 1 seconds
  52. set {TzEvento.Bolao.iniciado} to false
  53. clear {Valor.acumulado}
  54. clear {Ganhador}
  55. clear {Apostou::*}
  56. clear {Ultimo.Apostador}
  57. wait 1 seconds
  58. clear {Apostadores::*}
  59. else:
  60. send "&3&l[BOLAO] &bVocê não tem &4permissão&b para utilizar este comando."
  61.  
  62. if arg 1 is "apostar":
  63. if {TzEvento.Bolao.iniciado} is true:
  64. if {Bolao.Trancado} is false:
  65. if player's money is less than 1000:
  66. message "&3&l[BOLAO] &cVocê precisa de &f1000&c(1k) coins para apostar." to player
  67. stop
  68. else:
  69. if {Apostou::%player%} is true:
  70. send "&3&l[BOLAO] &4Você já apostou, aguarde o resultado.."
  71. stop
  72. else:
  73. make console execute command "/fe deduct %player% 1000"
  74. add 1000 to {Valor.acumulado}
  75. set {Ultimo.Apostador} to player
  76. set {Apostou::%player%} to true
  77. add player's name to {Apostadores::*}
  78. set {bolado} to true
  79. send "&3&l[BOLAO] &bVocê acaba de apostar no bolão.."
  80. else:
  81. send "&3&l[BOLAO] &cO evento bolão está trancado."
  82. else:
  83. send "&3&l[BOLAO] &4O evento não está aberto."
  84. if arg 1 is "Trancar":
  85. if {TzEvento.Bolao.iniciado} is true:
  86. broadcast " "
  87. broadcast "&3&l[BOLAO] &cO admin %Player% trancou o evento!"
  88. broadcast "&3&l[BOLAO] &cNinguem mais pode apostar."
  89. broadcast " "
  90. set {Bolao.Trancado} to true
  91. else:
  92. send "&3&l[BOLAO] &4O evento não está aberto."
  93. if arg 1 is "status":
  94. if {TzEvento.Bolao.iniciado} is true:
  95. send "&3&l[BOLAO] &bStatus&f:&r"
  96. send " &3» &bValor acumulado&3: &b%{Valor.acumulado}%"
  97. send " &3» &bUltimo apostador&3: &b%{Ultimo.Apostador}%"
  98. else:
  99. send "&3&l[BOLAO] &4O evento não está aberto."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement