laivytkill

Untitled

Aug 8th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.05 KB | None | 0 0
  1. options:
  2. # Nome do servidor
  3. Server: &f[&bQuiz&f]&f
  4.  
  5. # Prêmio final
  6. Premio: 25000
  7.  
  8. # Chamadas que irá fazer para o evento.
  9. Chamadas: 5
  10.  
  11. # Delay entre as chamadas (SEGUNDOS)
  12. DelayChamadas: 1
  13.  
  14. # Mensagens do evento (DEIXE "NULL" CASO QUEIRA DESABILITAR)
  15. linha1: "null"
  16. linha2: ""
  17. linha3: "&f[&bQuiz&f] &fEvento &bQuiz &fcomeçando."
  18. linha4: "&f[&bQuiz&f] &fUse &b/quiz participar &fpara participar."
  19. linha5: "&f[&bQuiz&f] &fChamadas restantes: &b%({chamadas} - loop-number)%/%{chamadas}%&f."
  20. linha6: ""
  21.  
  22. Começou: "&f[&bQuiz&f] &fO evento &bQuiz &fcomeçou com &b%{_e}% &fjogadores."
  23.  
  24. # Bloquear comandos ao entrar no evento
  25. BlockCmds: true
  26.  
  27. # Comandos permitidos (CASO A OPÇÃO ACIMA SEJA TRUE)
  28. AllowedCmds: "g", "global", "money"
  29.  
  30. # Perguntas
  31.  
  32. # Tempo que os players vão ter para escolher a resposta.
  33. DelayEntreRespostas: 5
  34.  
  35. Pergunta1: Cristóvão Colombo descobriu a américa.
  36. Pergunta1Resposta: true # true para SIM, false para NÃO;
  37.  
  38. Pergunta2: 550 dividido por 5 é 115.
  39. Pergunta2Resposta: false # true para SIM, false para NÃO;
  40.  
  41. Pergunta3: A primeira lei de Newton afirma que a força resultante que atua sobre um corpo é igual ao produto de sua massa.
  42. Pergunta3Resposta: false # true para SIM, false para NÃO;
  43.  
  44. Pergunta4: Pergunta 4
  45. Pergunta4Resposta: true # true para SIM, false para NÃO;
  46.  
  47. Pergunta5: Pergunta 5
  48. Pergunta5Resposta: true # true para SIM, false para NÃO;
  49.  
  50. Pergunta6: Pergunta 6
  51. Pergunta6Resposta: true # true para SIM, false para NÃO;
  52.  
  53. Pergunta7: Pergunta 7
  54. Pergunta7Resposta: true # true para SIM, false para NÃO;
  55.  
  56. Pergunta8: Pergunta 8
  57. Pergunta8Resposta: true # true para SIM, false para NÃO;
  58.  
  59. Pergunta9: Pergunta 9
  60. Pergunta9Resposta: true # true para SIM, false para NÃO;
  61.  
  62. Pergunta10: Pergunta 10
  63. Pergunta10Resposta: true # true para SIM, false para NÃO;
  64.  
  65. variables:
  66. {quiz} = false
  67. {quiz::start} = false
  68. on command:
  69. if sender is not console:
  70. if "%{quiz::players::q::*}%" contains "%player%":
  71. if {@BlockCmds} is true:
  72. if command is not {@AllowedCmds} or "quiz":
  73. if player is op:
  74. stop
  75. else:
  76. cancel event
  77. send "&cVocê não pode digitar esse comando no evento."
  78. function Perdeu():
  79. loop {quiz::players::q::*}:
  80. add 1 to {_x}
  81. set {_e} to "%loop-value%" parsed as player
  82. set {_y} to {quiz::%loop-value%}
  83. teleport {_e} to {quiz::entrada}
  84. set {_t1} to {@Pergunta1Resposta}
  85. set {_t2} to {@Pergunta2Resposta}
  86. set {_t3} to {@Pergunta3Resposta}
  87. set {_t4} to {@Pergunta4Resposta}
  88. set {_t5} to {@Pergunta5Resposta}
  89. set {_t6} to {@Pergunta6Resposta}
  90. set {_t7} to {@Pergunta7Resposta}
  91. set {_t8} to {@Pergunta8Resposta}
  92. set {_t9} to {@Pergunta9Resposta}
  93. set {_t10} to {@Pergunta10Resposta}
  94. broadcast "%loop-value% Q: %{quiz::players::q::*}%"
  95. broadcast "%loop-value% Y: %{_y}%"
  96. broadcast "%loop-value% T: %{_t%{quiz::pergunta}%}%"
  97. if "%{_y}%" is not "%{_t%{quiz::pergunta}%}%":
  98. remove "%{_e}%" from {quiz::players::q::*}
  99. delete {quiz::%{_e}%}
  100. teleport {_e} to {quiz::saida}
  101. #loop 100 times:
  102. # send "" to {_e}
  103. send "{@Server} Você perdeu o evento &bQuiz&f." to {_e}
  104. set {_x} to 0
  105. loop {quiz::players::q::*}:
  106. add 1 to {_x}
  107. if {_x} is less than or equal to 1:
  108. if {_x} is 1:
  109. Vencedor()
  110. else if {_x} is less than or equal to 0:
  111. broadcast "{@Server} O Evento &bQuiz&f foi encerrado, não houveram vencedores."
  112. set {quiz} to false
  113. set {quiz::start} to false
  114. clear {quiz::players::q::*}
  115. function Vencedor():
  116. loop {quiz::players::q::*}:
  117. set {_x} to "%loop-value%" parsed as player
  118. add {@Premio} to {_x}'s account
  119. set {quiz} to false
  120. set {quiz::start} to false
  121. loop {quiz::players::q::*}:
  122. set {_x} to "%loop-value-2%" parsed as player
  123. teleport {_x} to {quiz::saida}
  124. #loop 100 times:
  125. # send "" to {_x}
  126. send "&cVocê foi enviado ao spawn." to {_x}
  127. broadcast "{@Server} &b%{_x}% &fvenceu o evento quiz."
  128. broadcast "%{quiz::players::q::*}%"
  129. clear {quiz::players::q::*}
  130. stop
  131. function Vencedor2():
  132. set {_x} to 0
  133. loop {quiz::players::q::*}:
  134. add 1 to {_x}
  135. loop {quiz::players::q::*}:
  136. set {_x} to "%loop-value%" parsed as player
  137. add {@Premio} to {_x}'s account
  138. set {quiz} to false
  139. set {quiz::start} to false
  140. loop {quiz::players::q::*}:
  141. set {_x} to "%loop-value-2%" parsed as player
  142. teleport {_x} to {quiz::saida}
  143. #loop 100 times:
  144. # send "" to {_x}
  145. broadcast "{@Server} &b%{_x}% &fvenceu o evento quiz."
  146. broadcast "{@Server} houveram &b%{_x}% &fvencedores"
  147. send "&cVocê foi enviado ao spawn." to {_x}
  148. clear {quiz::players::q::*}
  149. stop
  150. clear {quiz::players::q::*}
  151. on quit:
  152. if "%{quiz::players::q::*}%" contains "%player%":
  153. remove "%player%" from {quiz::players::q::*}
  154. teleport player to {quiz::saida}
  155. every 1 minutes:
  156. loop all players:
  157. if {quiz::%loop-player%} is set:
  158. if {quiz} is true:
  159. delete {quiz::%loop-player%}
  160. on region enter:
  161. if "%{quiz::players::q::*}%" contains "%player%":
  162. set {_x} to "%region%"
  163. replace all "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" and " " with "" in {_x}
  164. if {_x} is "1":
  165. send "&eVocê marcou a opção &aVERDADEIRO&c."
  166. set {quiz::%player%} to true
  167. else if {_x} is "2":
  168. send "&eVocê marcou a opção &cFALSO&c."
  169. set {quiz::%player%} to false
  170. broadcast "%{quiz::%player%}%"
  171. on region leave:
  172. if "%{quiz::players::q::*}%" contains "%player%":
  173. set {_x} to "%region%"
  174. replace all "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" and " " with "" in {_x}
  175. if {_x} is "1":
  176. send "&eVocê desmarcou a opção &aVERDADEIRO&c."
  177. delete {quiz::%player%}
  178. else if {_x} is "2":
  179. send "&eVocê desmarcou a opção &cFALSO&c."
  180. delete {quiz::%player%}
  181. else:
  182. delete {quiz::%player%}
  183. command /quiz [<text>]:
  184. trigger:
  185. if arg 1 is set:
  186. if arg 1 is "participar", "setsaida" or "setentrada":
  187. if sender is console:
  188. send "&cSomente jogadores podem usar esse comando."
  189. stop trigger
  190. if arg 1 is "participar":
  191. if {quiz} is true:
  192. if {quiz::start} is false:
  193. if "%{quiz::players::q::*}%" contains "%player%":
  194. send "&cVocê já está no evento quiz!"
  195. stop
  196. else:
  197. teleport player to {quiz::entrada}
  198. send "&aVocê entrou no evento quiz, boa sorte."
  199. add "%player%" to {quiz::players::q::*}
  200. delete {quiz::%player%}
  201. else:
  202. send "&cO evento quiz já começou."
  203. else:
  204. send "&cO evento quiz não começou."
  205. else if arg 1 is "comecar" or "começar":
  206. if player is op:
  207. if {quiz::entrada} is set:
  208. if {quiz::saida} is set:
  209. if {quiz} is false:
  210. set {chamadas} to {@Chamadas}
  211. set {delay} to {@DelayChamadas}
  212. set {quiz} to true
  213. set {quiz::start} to false
  214. clear {quiz::players::q::*}
  215. loop {@Chamadas} times:
  216. if {@linha1} is not "null":
  217. broadcast {@linha1}
  218. if {@linha2} is not "null":
  219. broadcast {@linha2}
  220. if {@linha3} is not "null":
  221. broadcast {@linha3}
  222. if {@linha4} is not "null":
  223. broadcast {@linha4}
  224. if {@linha5} is not "null":
  225. broadcast {@linha5}
  226. if {@linha6} is not "null":
  227. broadcast {@linha6}
  228. wait {@DelayChamadas} seconds
  229. wait {@DelayChamadas} seconds
  230. set {_e} to 0
  231. loop {quiz::players::q::*}:
  232. add 1 to {_e}
  233. if {_e} is less than or equal to 1:
  234. broadcast "&cO evento quiz foi cancelado por não possuir jogadores o suficiente."
  235. set {quiz} to false
  236. set {quiz::start} to false
  237. loop {quiz::players::q::*}:
  238. set {_x} to "%loop-value%" parsed as players
  239. teleport {_x} to {quiz::saida}
  240. send "&cVocê foi enviado ao spawn."
  241. clear {quiz::players::q::*}
  242. else:
  243. broadcast ""
  244. broadcast {@Começou}
  245. broadcast ""
  246. set {quiz::start} to true
  247. loop {quiz::players::q::*}:
  248. set {_x} to "%loop-value%" parsed as player
  249. teleport {_x} to {quiz::entrada}
  250. send "&aO evento começou." to {_x}
  251. send ""
  252. send "{@Server} Pergunta 1: {@Pergunta1}"
  253. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  254. send ""
  255. set {quiz::pergunta} to 1
  256. set {_e} to 0
  257. loop {quiz::players::q::*}:
  258. add 1 to {_e}
  259. if {_e} is more than or equal to 2:
  260. wait {@DelayEntreRespostas} seconds
  261. Perdeu()
  262. loop {quiz::players::q::*}:
  263. delete {quiz::%loop-value-2%}
  264. send ""
  265. send "{@Server} Pergunta 2: {@Pergunta2}"
  266. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  267. send ""
  268. set {quiz::pergunta} to 2
  269. set {_e} to 0
  270. loop {quiz::players::q::*}:
  271. add 1 to {_e}
  272. if {_e} is more than or equal to 2:
  273. wait {@DelayEntreRespostas} seconds
  274. Perdeu()
  275. loop {quiz::players::q::*}:
  276. delete {quiz::%loop-value-2%}
  277. send ""
  278. send "{@Server} Pergunta 3: {@Pergunta3}"
  279. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  280. send ""
  281. set {quiz::pergunta} to 3
  282. set {_e} to 0
  283. loop {quiz::players::q::*}:
  284. add 1 to {_e}
  285. if {_e} is more than or equal to 2:
  286. wait {@DelayEntreRespostas} seconds
  287. Perdeu()
  288. loop {quiz::players::q::*}:
  289. delete {quiz::%loop-value-2%}
  290. send ""
  291. send "{@Server} Pergunta 4: {@Pergunta4}"
  292. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  293. send ""
  294. set {quiz::pergunta} to 4
  295. set {_e} to 0
  296. loop {quiz::players::q::*}:
  297. add 1 to {_e}
  298. if {_e} is more than or equal to 2:
  299. wait {@DelayEntreRespostas} seconds
  300. Perdeu()
  301. loop {quiz::players::q::*}:
  302. delete {quiz::%loop-value-2%}
  303. send ""
  304. send "{@Server} Pergunta 5: {@Pergunta5}"
  305. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  306. send ""
  307. set {quiz::pergunta} to 5
  308. set {_e} to 0
  309. loop {quiz::players::q::*}:
  310. add 1 to {_e}
  311. if {_e} is more than or equal to 2:
  312. wait {@DelayEntreRespostas} seconds
  313. Perdeu()
  314. loop {quiz::players::q::*}:
  315. delete {quiz::%loop-value-2%}
  316. send ""
  317. send "{@Server} Pergunta 6: {@Pergunta6}"
  318. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  319. send ""
  320. set {quiz::pergunta} to 6
  321. set {_e} to 0
  322. loop {quiz::players::q::*}:
  323. add 1 to {_e}
  324. if {_e} is more than or equal to 2:
  325. wait {@DelayEntreRespostas} seconds
  326. Perdeu()
  327. loop {quiz::players::q::*}:
  328. delete {quiz::%loop-value-2%}
  329. send ""
  330. send "{@Server} Pergunta 7: {@Pergunta7}"
  331. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  332. send ""
  333. set {quiz::pergunta} to 7
  334. set {_e} to 0
  335. loop {quiz::players::q::*}:
  336. add 1 to {_e}
  337. if {_e} is more than or equal to 2:
  338. wait {@DelayEntreRespostas} seconds
  339. Perdeu()
  340. loop {quiz::players::q::*}:
  341. delete {quiz::%loop-value-2%}
  342. send ""
  343. send "{@Server} Pergunta 8: {@Pergunta8}"
  344. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  345. send ""
  346. set {quiz::pergunta} to 8
  347. set {_e} to 0
  348. loop {quiz::players::q::*}:
  349. add 1 to {_e}
  350. if {_e} is more than or equal to 2:
  351. wait {@DelayEntreRespostas} seconds
  352. Perdeu()
  353. loop {quiz::players::q::*}:
  354. delete {quiz::%loop-value-2%}
  355. send ""
  356. send "{@Server} Pergunta 9: {@Pergunta9}"
  357. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  358. send ""
  359. set {quiz::pergunta} to 9
  360. set {_e} to 0
  361. loop {quiz::players::q::*}:
  362. add 1 to {_e}
  363. if {_e} is more than or equal to 2:
  364. wait {@DelayEntreRespostas} seconds
  365. Perdeu()
  366. loop {quiz::players::q::*}:
  367. delete {quiz::%loop-value-2%}
  368. send ""
  369. send "{@Server} Pergunta 10: {@Pergunta10}"
  370. send "{@Server} Você acha que ela é &aVERDADEIRA &fou &cFALSA&f?"
  371. send ""
  372. set {quiz::pergunta} to 10
  373. set {_e} to 0
  374. loop {quiz::players::q::*}:
  375. add 1 to {_e}
  376. wait {@DelayEntreRespostas} seconds
  377. Perdeu()
  378. loop {quiz::players::q::*}:
  379. delete {quiz::%loop-value-2%}
  380. if {_e} is more than or equal to 2:
  381. Vencedor2()
  382. else:
  383. Vencedor()
  384. else:
  385. Vencedor()
  386. else:
  387. Vencedor()
  388. else:
  389. Vencedor()
  390. else:
  391. Vencedor()
  392. else:
  393. Vencedor()
  394. else:
  395. Vencedor()
  396. else:
  397. Vencedor()
  398. else:
  399. Vencedor()
  400. else:
  401. Vencedor()
  402. else:
  403. send "&cO evento quiz já começou. use /quiz cancelar para cancelar."
  404. else:
  405. send "&cVocê não definiu o ponto de saida, use /quiz setsaida para definir."
  406. else:
  407. send "&cVocê não definiu o ponto de nascimento, use /quiz setentrada para definir."
  408. else:
  409. send "&cSem permissão."
  410. else if arg 1 is "cancelar" or "parar":
  411. if player is op:
  412. if {quiz} is true:
  413. if {quiz::saida} is set:
  414. set {quiz} to false
  415. set {quiz::start} to false
  416. loop {quiz::players::q::*}:
  417. set {_x} to "%loop-value%" parsed as players
  418. teleport {_x} to {quiz::saida}
  419. send "&cVocê foi enviado ao spawn." to {_x}
  420. clear {quiz::players::q::*}
  421. broadcast "&cO evento quiz foi encerrado por um administrador."
  422. else:
  423. send "&cVocê não definiu o ponto de saida, use /quiz setsaida para definir."
  424. else:
  425. send "&cO quiz não está rolando."
  426. else:
  427. send "&cSem permissão."
  428. else if arg 1 is "setentrada":
  429. if player is op:
  430. if block under player is not air:
  431. send "&aPonto de entrada do evento Quiz definido com sucesso."
  432. set {quiz::entrada} to player's location
  433. else:
  434. send "&cO bloco abaixo de você é AR, você não pode definir um spawnpoint voando."
  435. else:
  436. send "&cSem permissão."
  437. else if arg 1 is "setsaida":
  438. if player is op:
  439. if block under player is not air:
  440. send "&aPonto de saida do evento Quiz definido com sucesso."
  441. set {quiz::saida} to player's location
  442. else:
  443. send "&cO bloco abaixo de você é AR, você não pode definir um spawnpoint voando."
  444. else:
  445. send "&cSem permissão."
  446. else:
  447. if player is op:
  448. send "&cUse /quiz (participar, comecar, cancelar, setentrada, setsaida)"
  449. else:
  450. send "&cUse /quiz (participar)"
  451. else:
  452. if player is op:
  453. send "&cUse /quiz (participar, comecar, cancelar, setentrada, setsaida)"
  454. else:
  455. send "&cUse /quiz (participar)"
Advertisement
Add Comment
Please, Sign In to add comment