SHOW:
|
|
- or go back to the newest paste.
| 1 | command /iniciarevento [<text>] [<text>] [<text>]: | |
| 2 | permission: ge.admin | |
| 3 | permission message: &cVocê precisa do cargo Administrador ou superior para executar esse comando! | |
| 4 | executable by: console, player | |
| 5 | trigger: | |
| 6 | if arg 1 is set: | |
| 7 | if arg 1 is "quizmat" or "quizmatematico": | |
| 8 | if arg 2 is set: | |
| 9 | if arg 3 is set: | |
| 10 | set {quizmat.iniciado} to true
| |
| 11 | set {quiz.param} to a random integer between 1 and 500
| |
| 12 | set {quizmat.1} to arg-2
| |
| 13 | set {quizmat.2} to arg-3
| |
| 14 | set {quizmat.resposta} to {quizmat.1} + ({quiz.param} * {quizmat.2})
| |
| 15 | broadcast " " | |
| 16 | broadcast "&6&lEVENTO INICIADO: &6Quiz Matemático" | |
| 17 | broadcast "&6&lOBJETIVO: &6Responder a conta (no chat local)!" | |
| 18 | broadcast "&6&lCONTA: &6%arg 2% + %{quiz.param}% x %arg 3%"
| |
| 19 | broadcast "&6&lPRÊMIO: &65.000 coins!" | |
| 20 | broadcast "&6&lOBS: &6A resposta é apenas um número!" | |
| 21 | broadcast " " | |
| 22 | loop all players: | |
| 23 | if loop-player has permission "resposta.eventos": | |
| 24 | send "&a&lQUIZ MAT: &aA resposta é %{quizmat.resposta}%&a!"
| |
| 25 | stop loop | |
| 26 | stop | |
| 27 | else: | |
| 28 | send "&cUse /iniciarevento quizmat <número> <outro número>" | |
| 29 | else: | |
| 30 | send "&cUse /iniciarevento quizmat <número> <outro número>" | |
| 31 | else: | |
| 32 | stop | |
| 33 | else: | |
| 34 | send "&cUse /iniciarevento <nome>" | |
| 35 | ||
| 36 | on chat: | |
| 37 | if {quizmat.iniciado} is true:
| |
| 38 | if message is "%{quizmat.resposta}%":
| |
| 39 | delete {quizmat.iniciado}
| |
| 40 | clear {quizmat.resposta}
| |
| 41 | add 5000 to player's account | |
| 42 | wait 0.5 seconds | |
| 43 | broadcast " " | |
| 44 | broadcast "&6&lEVENTO FINALIZADO: &6Quiz Matemático" | |
| 45 | broadcast "&6&lVENCEDOR: &6%player%" | |
| 46 | broadcast " " | |
| 47 | stop |