Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.21 KB | None | 0 0
  1. on *:TEXT:*:*: {
  2. tokenize 32 $strip($1-)
  3. if ($1 == !boterkaaseneieren) || ($1 == !tictactoe) || ($1 == !bke) || ($1 == !ttt) && ($chan != #bulletstar.net) && ($2 != help) {
  4. msg $chan 7Boter, kaas en eieren gaat beginnen!4 Uitleg nodig? Typ !ttt help
  5. msg $chan 7Er is plaats voor 2 personen, typ 4!speel7 om mee te spelen!
  6. set %tttstatus on
  7. set %tttchannel $chan
  8. halt
  9. }
  10. if ($1 == !speel) {
  11. if (%tttstatus != on) { notice $nick Zet eerst het speel aan doormiddel van !ttt, !tictactoe, !bke of !boterkaaseneieren | halt }
  12. if (%tttnaam1 == $nick) && (!%tttnaam2) { notice $nick Wat dacht jij $nick -.-" | halt }
  13. if (%tttnaam1 == $nick) || (%tttnaam2 == $nick) && (%speelstatus == on) && ($2 != $null) { goto spelen }
  14. if (%ttt-personen >= 2) { notice $nick Sorry, maar er doen al 2 personen mee met TicTacToe! | halt }
  15. if (!%tttnaam1) { set %tttnaam1 $nick }
  16. if (%ttt-personen == 1) { set %tttnaam2 $nick | set %speelstatus on }
  17. inc %ttt-personen
  18. msg %tttchannel 4 $+ $nick 7doet mee aan TicTacToe en is speler nummer  $+ %ttt-personen
  19. if (%ttt-personen != 2) { halt }
  20. msg %tttchannel 4TicTacToe 7gaat beginnen!
  21. msg %tttchannel 0......1|0.....1|0......
  22. msg %tttchannel 0......1|0.....1|0......
  23. msg %tttchannel 0......1|0.....1|0.......
  24. msg %tttchannel 1______1|1__ __1|_______
  25. msg %tttchannel 0......1|0.....1|0......
  26. msg %tttchannel 0......1|0.....1|0......
  27. msg %tttchannel 0......1|0.....1|0.....
  28. msg %tttchannel 1______1|1__ __1|_______
  29. msg %tttchannel 0......1|0.....1|0......
  30. msg %tttchannel 0......1|0.....1|0......
  31. msg %tttchannel 0......1|0.....1|0......
  32. msg %tttchannel 4 $+ %tttnaam1 7is 4X 7en4 %tttnaam2 7is 4O
  33. msg %tttchannel 4 $+ %tttnaam1 7mag als eerste beginnen!
  34. set %speelstatus on
  35. set %ttt-1 0.
  36. set %ttt-2 0.
  37. set %ttt-3 0.
  38. set %ttt-4 0.
  39. set %ttt-5 0.
  40. set %ttt-6 0.
  41. set %ttt-7 0.
  42. set %ttt-8 0.
  43. set %ttt-9 0.
  44. set %beurt %tttnaam1
  45. set %tttspel 1
  46. set %speelerror on
  47. :spelen
  48. if ($2 !isnum) { notice $nick Fout! Syntax: !speel 1 t/m 9 | halt }
  49. if ($2 > 9) && ($2 < 1) { notice $Nick Fout! Kies een getal van 1 t/m 9 | halt }
  50. if (%beurt == %tttnaam1) && ($nick != %tttnaam1) { notice $nick Jij bent niet aan de beurt! | halt }
  51. if (%beurt == %tttnaam2) && ($nick != %tttnaam2) { notice $nick Jij bent niet aan de beurt! | halt }
  52. if ($2 == 1) && (%ttt-1 == X || %ttt-1 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  53. if ($2 == 2) && (%ttt-2 == X || %ttt-2 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  54. if ($2 == 3) && (%ttt-3 == X || %ttt-3 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  55. if ($2 == 4) && (%ttt-4 == X || %ttt-4 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  56. if ($2 == 5) && (%ttt-5 == X || %ttt-5 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  57. if ($2 == 6) && (%ttt-6 == X || %ttt-6 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  58. if ($2 == 7) && (%ttt-7 == X || %ttt-7 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  59. if ($2 == 8) && (%ttt-8 == X || %ttt-8 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  60. if ($2 == 9) && (%ttt-9 == X || %ttt-9 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  61. if ($2 == 1) && (%tttnaam1 == $nick) { set %ttt-1 X }
  62. if ($2 == 2) && (%tttnaam1 == $nick) { set %ttt-2 X }
  63. if ($2 == 3) && (%tttnaam1 == $nick) { set %ttt-3 X }
  64. if ($2 == 4) && (%tttnaam1 == $nick) { set %ttt-4 X }
  65. if ($2 == 5) && (%tttnaam1 == $nick) { set %ttt-5 X }
  66. if ($2 == 6) && (%tttnaam1 == $nick) { set %ttt-6 X }
  67. if ($2 == 7) && (%tttnaam1 == $nick) { set %ttt-7 X }
  68. if ($2 == 8) && (%tttnaam1 == $nick) { set %ttt-8 X }
  69. if ($2 == 9) && (%tttnaam1 == $nick) { set %ttt-9 X }
  70. if ($2 == 1) && (%tttnaam2 == $nick) { set %ttt-1 O }
  71. if ($2 == 2) && (%tttnaam2 == $nick) { set %ttt-2 O }
  72. if ($2 == 3) && (%tttnaam2 == $nick) { set %ttt-3 O }
  73. if ($2 == 4) && (%tttnaam2 == $nick) { set %ttt-4 O }
  74. if ($2 == 5) && (%tttnaam2 == $nick) { set %ttt-5 O }
  75. if ($2 == 6) && (%tttnaam2 == $nick) { set %ttt-6 O }
  76. if ($2 == 7) && (%tttnaam2 == $nick) { set %ttt-7 O }
  77. if ($2 == 8) && (%tttnaam2 == $nick) { set %ttt-8 O }
  78. if ($2 == 9) && (%tttnaam2 == $nick) { set %ttt-9 O }
  79. msg %tttchannel 0......1|0.....1|0......
  80. msg %tttchannel 0..1 $+ %ttt-1 $+ 0...1|0..1 $+ %ttt-2 $+ 0..1|0..1 $+ %ttt-3 $+ 0...
  81. msg %tttchannel 0......1|0.....1|0.......
  82. msg %tttchannel 1______1|1__ __1|_______
  83. msg %tttchannel 0......1|0.....1|0......
  84. msg %tttchannel 0..1 $+ %ttt-4 $+ 0...1|0..1 $+ %ttt-5 $+ 0..1|0..1 $+ %ttt-6 $+ 0...
  85. msg %tttchannel 0......1|0.....1|0.....
  86. msg %tttchannel 1______1|1__ __1|_______
  87. msg %tttchannel 0......1|0.....1|0......
  88. msg %tttchannel 0..1 $+ %ttt-7 $+ 0...1|0..1 $+ %ttt-8 $+ 0..1|0..1 $+ %ttt-9 $+ 0...
  89. msg %tttchannel 0......1|0.....1|0......
  90. if (%ttt-1 == X) && (%ttt-2 == X) && (%ttt-3 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  91. if (%ttt-4 == X) && (%ttt-5 == X) && (%ttt-6 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  92. if (%ttt-7 == X) && (%ttt-8 == X) && (%ttt-9 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  93. if (%ttt-1 == X) && (%ttt-5 == X) && (%ttt-9 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  94. if (%ttt-3 == X) && (%ttt-5 == X) && (%ttt-7 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  95. if (%ttt-1 == X) && (%ttt-4 == X) && (%ttt-7 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  96. if (%ttt-2 == X) && (%ttt-5 == X) && (%ttt-8 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  97. if (%ttt-3 == X) && (%ttt-6 == X) && (%ttt-9 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  98. if (%ttt-1 == O) && (%ttt-2 == O) && (%ttt-3 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  99. if (%ttt-4 == O) && (%ttt-5 == O) && (%ttt-6 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  100. if (%ttt-7 == O) && (%ttt-8 == O) && (%ttt-9 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  101. if (%ttt-1 == O) && (%ttt-5 == O) && (%ttt-9 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  102. if (%ttt-3 == O) && (%ttt-5 == O) && (%ttt-7 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  103. if (%ttt-1 == O) && (%ttt-4 == O) && (%ttt-7 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  104. if (%ttt-2 == O) && (%ttt-5 == O) && (%ttt-8 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  105. if (%ttt-3 == O) && (%ttt-6 == O) && (%ttt-9 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  106. if (%ttt-1 == X || %ttt-1 == O) && (%ttt-2 == X || %ttt-2 == O) && (%ttt-3 == X || %ttt-3 == O) && (%ttt-4 == X || %ttt-4 == O) && (%ttt-5 == X || %ttt-5 == O) && (%ttt-6 == X || %ttt-6 == O) && (%ttt-7 == X || %ttt-7 == O) && (%ttt-8 == X || %ttt-8 == O) && (%ttt-9 == X || %ttt-9 == O) { msg %tttchannel 7Het is gelijk! Niemand heeft gewonnen! | /ttt-reset | inc %tttgelijkspel | inc %tttspellen | halt }
  107. if (%beurt == %tttnaam1) { set %beurt %tttnaam2 | halt }
  108. if (%beurt == %tttnaam2) { set %beurt %tttnaam1 | halt }
  109. }
  110. if ($1 == !stats) {
  111. notice $nick Games gespeeld: %tttspellen
  112. notice $nick Totaal gewonnen: %tttgewonnen
  113. notice $nick Totaal verloren: %tttgewonnen
  114. notice $nick Totaal gelijkspel: %tttgelijkspel
  115. }
  116. if ($1 == !ttt) && ($2 == help) {
  117. notice $nick Je ziet een TicTacToe veld, en deze is genummerd van 1 t/m 9. Elk nummer heeft zijn eigen vakje, dit begint links boven aan en eindigt rechts onder.
  118. notice $nick Als je een vakje naar beneden gaat, zit er aan de linkerkant het volgende nummer.
  119. }
  120. }
  121.  
  122. on *:INPUT:*: {
  123. tokenize 32 $strip($1-)
  124. if ($1 == !boterkaaseneieren) || ($1 == !tictactoe) || ($1 == !bke) || ($1 == !ttt) && ($chan != #bulletstar.net) && ($2 != help) {
  125. msg $chan 7Boter, kaas en eieren gaat beginnen!4 Uitleg nodig? Typ !ttt help
  126. msg $chan 7Er is plaats voor 2 personen, typ 4!speel7 om mee te spelen!
  127. set %tttstatus on
  128. set %tttchannel $chan
  129. halt
  130. }
  131. if ($1 == !speel) {
  132. if (%tttstatus != on) { notice $nick Zet eerst het spel aan doormiddel van !ttt, !tictactoe, !bke of !boterkaaseneieren | halt }
  133. if (%tttnaam1 == $nick) || (%tttnaam2 == $nick) && (%speelstatus == on) { goto spelen }
  134. if (%ttt-personen >= 2) { notice $nick Sorry, maar er doen al 2 personen mee met TicTacToe! | halt }
  135. if (!%tttnaam1) { set %tttnaam1 $nick }
  136. if (%ttt-personen == 1) { set %tttnaam2 $nick | set %speelstatus on }
  137. inc %ttt-personen
  138. msg %tttchannel 4 $+ $nick 7doet mee aan TicTacToe en is speler nummer  $+ %ttt-personen
  139. if (%ttt-personen != 2) { halt }
  140. msg %tttchannel 4TicTacToe 7gaat beginnen!
  141. msg %tttchannel 0......1|0.....1|0......
  142. msg %tttchannel 0......1|0.....1|0......
  143. msg %tttchannel 0......1|0.....1|0.......
  144. msg %tttchannel 1______1|1__ __1|_______
  145. msg %tttchannel 0......1|0.....1|0......
  146. msg %tttchannel 0......1|0.....1|0......
  147. msg %tttchannel 0......1|0.....1|0.....
  148. msg %tttchannel 1______1|1__ __1|_______
  149. msg %tttchannel 0......1|0.....1|0......
  150. msg %tttchannel 0......1|0.....1|0......
  151. msg %tttchannel 0......1|0.....1|0......
  152. msg %tttchannel 4 $+ %tttnaam1 7is 4X 7en4 %tttnaam2 7is 4O
  153. msg %tttchannel 4 $+ %tttnaam1 7mag als eerste beginnen!
  154. set %speelstatus on
  155. set %ttt-1 0.
  156. set %ttt-2 0.
  157. set %ttt-3 0.
  158. set %ttt-4 0.
  159. set %ttt-5 0.
  160. set %ttt-6 0.
  161. set %ttt-7 0.
  162. set %ttt-8 0.
  163. set %ttt-9 0.
  164. set %beurt %tttnaam1
  165. set %tttspel 1
  166. set %speelerror on
  167. :spelen
  168. if ($2 !isnum) { notice $nick Fout! Syntax: !speel 1 t/m 9 | halt }
  169. if ($2 > 9) && ($2 < 1) { notice $Nick Fout! Kies een getal van 1 t/m 9 | halt }
  170. if (%beurt == %tttnaam1) && ($nick != %tttnaam1) { notice $nick Jij bent niet aan de beurt! | halt }
  171. if (%beurt == %tttnaam2) && ($nick != %tttnaam2) { notice $nick Jij bent niet aan de beurt! | halt }
  172. if ($2 == 1) && (%ttt-1 == X || %ttt-1 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  173. if ($2 == 2) && (%ttt-2 == X || %ttt-2 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  174. if ($2 == 3) && (%ttt-3 == X || %ttt-3 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  175. if ($2 == 4) && (%ttt-4 == X || %ttt-4 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  176. if ($2 == 5) && (%ttt-5 == X || %ttt-5 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  177. if ($2 == 6) && (%ttt-6 == X || %ttt-6 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  178. if ($2 == 7) && (%ttt-7 == X || %ttt-7 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  179. if ($2 == 8) && (%ttt-8 == X || %ttt-8 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  180. if ($2 == 9) && (%ttt-9 == X || %ttt-9 == O) { notice $nick Daar heeft iemand al wat staan! | halt }
  181. if ($2 == 1) && (%tttnaam1 == $nick) { set %ttt-1 X }
  182. if ($2 == 2) && (%tttnaam1 == $nick) { set %ttt-2 X }
  183. if ($2 == 3) && (%tttnaam1 == $nick) { set %ttt-3 X }
  184. if ($2 == 4) && (%tttnaam1 == $nick) { set %ttt-4 X }
  185. if ($2 == 5) && (%tttnaam1 == $nick) { set %ttt-5 X }
  186. if ($2 == 6) && (%tttnaam1 == $nick) { set %ttt-6 X }
  187. if ($2 == 7) && (%tttnaam1 == $nick) { set %ttt-7 X }
  188. if ($2 == 8) && (%tttnaam1 == $nick) { set %ttt-8 X }
  189. if ($2 == 9) && (%tttnaam1 == $nick) { set %ttt-9 X }
  190. if ($2 == 1) && (%tttnaam2 == $nick) { set %ttt-1 O }
  191. if ($2 == 2) && (%tttnaam2 == $nick) { set %ttt-2 O }
  192. if ($2 == 3) && (%tttnaam2 == $nick) { set %ttt-3 O }
  193. if ($2 == 4) && (%tttnaam2 == $nick) { set %ttt-4 O }
  194. if ($2 == 5) && (%tttnaam2 == $nick) { set %ttt-5 O }
  195. if ($2 == 6) && (%tttnaam2 == $nick) { set %ttt-6 O }
  196. if ($2 == 7) && (%tttnaam2 == $nick) { set %ttt-7 O }
  197. if ($2 == 8) && (%tttnaam2 == $nick) { set %ttt-8 O }
  198. if ($2 == 9) && (%tttnaam2 == $nick) { set %ttt-9 O }
  199. msg %tttchannel 0......1|0.....1|0......
  200. msg %tttchannel 0..1 $+ %ttt-1 $+ 0...1|0..1 $+ %ttt-2 $+ 0..1|0..1 $+ %ttt-3 $+ 0...
  201. msg %tttchannel 0......1|0.....1|0.......
  202. msg %tttchannel 1______1|1__ __1|_______
  203. msg %tttchannel 0......1|0.....1|0......
  204. msg %tttchannel 0..1 $+ %ttt-4 $+ 0...1|0..1 $+ %ttt-5 $+ 0..1|0..1 $+ %ttt-6 $+ 0...
  205. msg %tttchannel 0......1|0.....1|0.....
  206. msg %tttchannel 1______1|1__ __1|_______
  207. msg %tttchannel 0......1|0.....1|0......
  208. msg %tttchannel 0..1 $+ %ttt-7 $+ 0...1|0..1 $+ %ttt-8 $+ 0..1|0..1 $+ %ttt-9 $+ 0...
  209. msg %tttchannel 0......1|0.....1|0......
  210. if (%ttt-1 == X) && (%ttt-2 == X) && (%ttt-3 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  211. if (%ttt-4 == X) && (%ttt-5 == X) && (%ttt-6 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  212. if (%ttt-7 == X) && (%ttt-8 == X) && (%ttt-9 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  213. if (%ttt-1 == X) && (%ttt-5 == X) && (%ttt-9 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  214. if (%ttt-3 == X) && (%ttt-5 == X) && (%ttt-7 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  215. if (%ttt-1 == X) && (%ttt-4 == X) && (%ttt-7 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  216. if (%ttt-2 == X) && (%ttt-5 == X) && (%ttt-8 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  217. if (%ttt-3 == X) && (%ttt-6 == X) && (%ttt-9 == X) { msg %tttchannel 4 $+ %tttnaam1 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  218. if (%ttt-1 == O) && (%ttt-2 == O) && (%ttt-3 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  219. if (%ttt-4 == O) && (%ttt-5 == O) && (%ttt-6 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  220. if (%ttt-7 == O) && (%ttt-8 == O) && (%ttt-9 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  221. if (%ttt-1 == O) && (%ttt-5 == O) && (%ttt-9 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  222. if (%ttt-3 == O) && (%ttt-5 == O) && (%ttt-7 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  223. if (%ttt-1 == O) && (%ttt-4 == O) && (%ttt-7 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  224. if (%ttt-2 == O) && (%ttt-5 == O) && (%ttt-8 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  225. if (%ttt-3 == O) && (%ttt-6 == O) && (%ttt-9 == O) { msg %tttchannel 4 $+ %tttnaam2 7heeft de TicTacToe game gewonnen! | /inc %tttspellen | /inc %tttgewonnen | /ttt-reset | halt }
  226. if (%ttt-1 == X || %ttt-1 == O) && (%ttt-2 == X || %ttt-2 == O) && (%ttt-3 == X || %ttt-3 == O) && (%ttt-4 == X || %ttt-4 == O) && (%ttt-5 == X || %ttt-5 == O) && (%ttt-6 == X || %ttt-6 == O) && (%ttt-7 == X || %ttt-7 == O) && (%ttt-8 == X || %ttt-8 == O) && (%ttt-9 == X || %ttt-9 == O) { msg %tttchannel 7Het is gelijk! Niemand heeft gewonnen! | /ttt-reset | inc %tttgelijkspel | inc %tttspellen | halt }
  227. if (%beurt == %tttnaam1) { set %beurt %tttnaam2 | halt }
  228. if (%beurt == %tttnaam2) { set %beurt %tttnaam1 | halt }
  229. }
  230. if ($1 == !stats) {
  231. echo -at Games gespeeld: %tttspellen
  232. echo -at Totaal gewonnen: %tttgewonnen
  233. echo -at Totaal verloren: %tttgewonnen
  234. echo -at Totaal gelijkspel: %tttgelijkspel
  235. }
  236. if ($1 == !ttt) && ($2 == help) {
  237. echo -at Je ziet een TicTacToe veld, en deze is genummerd van 1 t/m 9. Elk nummer heeft zijn eigen vakje, dit begint links boven aan en eindigt rechts onder.
  238. echo -at Als je een vakje naar beneden gaat, zit er aan de linkerkant het volgende nummer.
  239. }
  240. }
  241.  
  242.  
  243. alias ttt-status {
  244. echo -at Games gespeeld: %tttspellen
  245. echo -at Totaal gewonnen: %tttgewonnen
  246. echo -at Totaal verloren: %tttgewonnen
  247. echo -at Totaal gelijkspel: %tttgelijkspel
  248. }
  249. alias ttt-reset {
  250. set %tttstatus off
  251. set %ttt-personen 0
  252. unset %tttnaam1
  253. unset %tttnaam2
  254. unset %tttchannel
  255. unset %tttspel
  256. unset %beurt
  257. unset %speelerror
  258. unset %tttspel
  259. set %speelstatus off
  260. }
  261.  
  262. alias ttt {
  263. msg #Goldfive 0......1|0.....1|0......
  264. msg #Goldfive 0..1X0...1|0..1X0..1|0..1X0...
  265. msg #Goldfive 0......1|0.....1|0.......
  266. msg #Goldfive 1______1|1__ __1|_______
  267. msg #Goldfive 0......1|0.....1|0......
  268. msg #Goldfive 0....1X0...1|0..1X0..1|0..1X0...
  269. msg #Goldfive 0......1|0.....1|0.....
  270. msg #Goldfive 1______1|1__ __1|_______
  271. msg #Goldfive 0......1|0.....1|0......
  272. msg #Goldfive 0....1X0...1|0..1X0..1|0..1X0...
  273. msg #Goldfive 0......1|0.....1|0......
  274.  
  275. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement