Advertisement
Guest User

QUIZ - v1.2.F

a guest
Jan 10th, 2014
188
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. variables:
  2. {quiz.question.name} = ""
  3. {quit.question.answer} = ""
  4. {quit.question.start} = false
  5. options:
  6. tag: &b[&f&lQUIZ&b]
  7. version: v0.1.F
  8.  
  9. # REWARDS #
  10.  
  11. # Czy wlaczyc nagrody w itemach
  12. items.enabled: true
  13.  
  14. # Nazwa oraz ilosc przedmiotu
  15. items.list: 16 diamond and 16 iron ingot
  16.  
  17. # Czy wlaczyc nagrode w komendzie
  18. command.enabled: false
  19.  
  20. # Komenda ktory sie wykona po zgadnieciu
  21. command.cmd: "broadcast &d&lSkript by DragoPL aKa. eXu."
  22.  
  23. command /quiz [<text>] [<text>]:
  24. trigger:
  25. if arg 1 is "author":
  26. send "&8&o##############"
  27. send " &6Author: &cDragoPL / eXu."
  28. send " &6Version: &c{@version}"
  29. send "&8&o##############"
  30. stop
  31. if arg 1 is not set:
  32. send "&8&o##############"
  33. send " &f/quiz question <question> &b- Zadaje pytanie"
  34. send " &f/quiz answer <answer> &b- Daje odpowiedz na zadane pytanie"
  35. send " &f/quiz author &b- Informacje o Skrypcie"
  36. send "&8&o##############"
  37. stop
  38. if arg 1 is "question":
  39. if arg 2 is set:
  40. if player has permission "quiz.question" or "quiz.*":
  41. set {quiz.question.name} to arg 2
  42. send "{@tag} &fYou type question: &b%arg 2%"
  43. stop
  44. else:
  45. send "{@tag} &fYou don't have permission to acces that command!"
  46. stop
  47. else:
  48. send "{@tag} &fCorrect usage: &b/quiz answer <question>"
  49. stop
  50. if arg 1 is "answer":
  51. if arg 2 is set:
  52. if player has permission "quiz.answer" or "quiz.*":
  53. if {quiz.question.name} is set:
  54. set {quiz.question.start} to true
  55. set {quiz.question.answer} to arg 2
  56. send "{@tag} &fAnswer for Question: &b%{quiz.question.name}% &fis now: &b%arg 2%"
  57. broadcast "{@tag} &fTime to Quiz!"
  58. broadcast "{@tag} &fThe Question is:"
  59. wait 2 second
  60. broadcast ""
  61. broadcast "&b%{quiz.question.name}%"
  62. broadcast ""
  63. broadcast ""
  64. stop
  65. else:
  66. send "{@tag} &fFirst, you must type a Question!"
  67. stop
  68. else:
  69. send "{@tag} &fYou don't have permission to acces that command!"
  70. stop
  71. else:
  72. send "{@tag} &fCorrect usage: &b/quiz answer <answer>"
  73. stop
  74. on chat:
  75. if {quiz.question.start} is true:
  76. if message contains "%{quiz.question.answer}%":
  77. if {@items.enabled} is "false":
  78. broadcast "&fPlayer &b%player% guess the answer!"
  79. broadcast ""
  80. broadcast "&fThe Answer is: &b%{quiz.question.answer}%"
  81. set {quiz.question.start} to false
  82. clear {quiz.question.answer}
  83. clear {quiz.question.name}
  84. cancel event
  85. if {@items.enabled} is "true":
  86. give {@items.list} to the player
  87. broadcast "&fPlayer &b%player% guess the answer!"
  88. broadcast ""
  89. broadcast "&fThe Answer is: &b%{quiz.question.answer}%"
  90. set {quiz.question.start} to false
  91. clear {quiz.question.answer}
  92. clear {quiz.question.name}
  93. cancel event
  94. if {@items.enabled} isn't "true" or "false":
  95. broadcast "&fPlayer &b%player% guess the answer!"
  96. broadcast ""
  97. broadcast "&fThe Answer is: &b%{quiz.question.answer}%"
  98. set {quiz.question.start} to false
  99. clear {quiz.question.answer}
  100. clear {quiz.question.name}
  101. cancel event
  102. if {@command.enabled} is "false":
  103. broadcast "&fPlayer &b%player% guess the answer!"
  104. broadcast ""
  105. broadcast "&fThe Answer is: &b%{quiz.question.answer}%"
  106. set {quiz.question.start} to false
  107. clear {quiz.question.answer}
  108. clear {quiz.question.name}
  109. cancel event
  110. if {@command.enabled} is "true":
  111. make console execute command "{@command.cmd}"
  112. broadcast "&fPlayer &b%player% guess the answer!"
  113. broadcast ""
  114. broadcast "&fThe Answer is: &b%{quiz.question.answer}%"
  115. set {quiz.question.start} to false
  116. clear {quiz.question.answer}
  117. clear {quiz.question.name}
  118. cancel event
  119. if {@command.enabled} isn't "true" or "false":
  120. broadcast "&fPlayer &b%player% guess the answer!"
  121. broadcast ""
  122. broadcast "&fThe Answer is: &b%{quiz.question.answer}%"
  123. set {quiz.question.start} to false
  124. clear {quiz.question.answer}
  125. clear {quiz.question.name}
  126. cancel event
  127. else:
  128. stop
Advertisement
RAW Paste Data Copied
Advertisement