Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Anuncios: 3
- TempoEntre: 3
- variables:
- {TzEvento.Bolao.iniciado} = false
- command /Bolao [<text>]:
- trigger:
- if arg 1 is "iniciar":
- if player has permission "Bolao.admin":
- set {TzEvento.Bolao.iniciado} to true
- loop {@Anuncios} times:
- if {TzEvento.Bolao.iniciado} is true:
- replace "<none>" with "0" in {Valor.acumulado}
- replace "<none>" with "NENHUM" in {Ultimo.Apostador}
- broadcast " "
- broadcast "&3&l[BOLAO] &bPara participar digite&f: /bolao apostar"
- broadcast "&3&l[BOLAO] &bCusto da aposta&f: &61000&f(1k)"
- broadcast "&3&l[BOLAO] &bStatus&f: /bolao status"
- broadcast " "
- wait {@TempoEntre} seconds
- if {TzEvento.Bolao.iniciado} is true:
- if {bolado} is true:
- set {TzEvento.Bolao.iniciado} to false
- broadcast " "
- broadcast "&3&l[BOLAO] &bSorteando jogador aleatório.."
- broadcast " "
- wait 5 seconds
- set {Ganhador} to a random element out of {apostadores::*}
- wait 1 seconds
- make console execute command "/fe grant %{Ganhador}% %{Valor.acumulado}%"
- send "&3&l[BOLAO] &bVocê venceu!" to {Ganhador}
- send "&3&l[BOLAO] &bValor acumulado: &6%{Valor.acumulado}%&b." to {Ganhador}
- wait 2 seconds
- broadcast " "
- broadcast "&3&l[BOLAO] &6%{Ganhador}% &bGanhou: &6%{Valor.acumulado}%&b coins"
- broadcast " "
- clear {Valor.acumulado}
- clear {Ganhador}
- clear {Apostou::*}
- clear {Ultimo.Apostador}
- clear {Apostadores::*}
- add 0 to {Valor.acumulado}
- set {Ultimo.Apostador} to "Ninguem"
- else:
- broadcast " "
- broadcast "&4&l[BOLAO] &cO evento foi cancelado por não haver apostas!"
- broadcast "&4&l[BOLAO] &cO evento acontecerá novamente em outro horário."
- broadcast " "
- wait 1 seconds
- set {TzEvento.Bolao.iniciado} to false
- clear {Valor.acumulado}
- clear {Ganhador}
- clear {Apostou::*}
- clear {Ultimo.Apostador}
- wait 1 seconds
- clear {Apostadores::*}
- else:
- send "&3&l[BOLAO] &bVocê não tem &4permissão&b para utilizar este comando."
- if arg 1 is "apostar":
- if {TzEvento.Bolao.iniciado} is true:
- if {Bolao.Trancado} is false:
- if player's money is less than 1000:
- message "&3&l[BOLAO] &cVocê precisa de &f1000&c(1k) coins para apostar." to player
- stop
- else:
- if {Apostou::%player%} is true:
- send "&3&l[BOLAO] &4Você já apostou, aguarde o resultado.."
- stop
- else:
- make console execute command "/fe deduct %player% 1000"
- add 1000 to {Valor.acumulado}
- set {Ultimo.Apostador} to player
- set {Apostou::%player%} to true
- add player's name to {Apostadores::*}
- set {bolado} to true
- send "&3&l[BOLAO] &bVocê acaba de apostar no bolão.."
- else:
- send "&3&l[BOLAO] &cO evento bolão está trancado."
- else:
- send "&3&l[BOLAO] &4O evento não está aberto."
- if arg 1 is "Trancar":
- if {TzEvento.Bolao.iniciado} is true:
- broadcast " "
- broadcast "&3&l[BOLAO] &cO admin %Player% trancou o evento!"
- broadcast "&3&l[BOLAO] &cNinguem mais pode apostar."
- broadcast " "
- set {Bolao.Trancado} to true
- else:
- send "&3&l[BOLAO] &4O evento não está aberto."
- if arg 1 is "status":
- if {TzEvento.Bolao.iniciado} is true:
- send "&3&l[BOLAO] &bStatus&f:&r"
- send " &3» &bValor acumulado&3: &b%{Valor.acumulado}%"
- send " &3» &bUltimo apostador&3: &b%{Ultimo.Apostador}%"
- else:
- send "&3&l[BOLAO] &4O evento não está aberto."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement