I want to make a slot machine with the minecraft colors.
This is the slots:
| A | B | C |
| D | E | F |
| G | H | I |
So, it's 9 slots, and each slot can have one of the 14 out of the 15 minecraft chat colors. (excluded white)
The issue I have is how to compare the result. I was doing manually and it was already at 300 lines when I gave up. The doc's does not helped me in this case.
Here the start of the command:
Is there an easy way to compare the lists? I've looked up for a syntax and I could not find it.
Example of syntax for you to recognize what I mean (this one is from my mind lol):
I want to give prizes for the player when 9, 8, 7, 6, 5, 4 or 3 slots are equal.
Thanks!
[doublepost=1493581300,1493539150][/doublepost]Bump.
This is the slots:
| A | B | C |
| D | E | F |
| G | H | I |
So, it's 9 slots, and each slot can have one of the 14 out of the 15 minecraft chat colors. (excluded white)
The issue I have is how to compare the result. I was doing manually and it was already at 300 lines when I gave up. The doc's does not helped me in this case.
Here the start of the command:
code_language.skript:
command /cn:
trigger:
clear {cn.%player%.resul::*}
broadcast "&a%player%&r Feels lucky!!!"
loop 9 times:
set {cn.%player%.numero} to a random integer between 1 and 14
if {cn.%player%.numero} is 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9:
add "%{cn.%player%.numero}%" to {cn.%player%.resul::*}
if {cn.%player%.numero} is 10:
add "a" to {cn.%player%.resul::*}
if {cn.%player%.numero} is 11:
add "b" to {cn.%player%.resul::*}
if {cn.%player%.numero} is 12:
add "c" to {cn.%player%.resul::*}
if {cn.%player%.numero} is 13:
add "d" to {cn.%player%.resul::*}
if {cn.%player%.numero} is 14:
add "e" to {cn.%player%.resul::*}
broadcast "|§%{cn.%player%.resul::1}% &&&&r | §%{cn.%player%.resul::4}%&&&&r | §%{cn.%player%.resul::7}%&&&&r |"
broadcast "|§%{cn.%player%.resul::2}% &&&&r | §%{cn.%player%.resul::5}%&&&&r | §%{cn.%player%.resul::8}%&&&&r |"
broadcast "|§%{cn.%player%.resul::3}% &&&&r | §%{cn.%player%.resul::6}%&&&&r | §%{cn.%player%.resul::9}%&&&&r |"
Is there an easy way to compare the lists? I've looked up for a syntax and I could not find it.
Example of syntax for you to recognize what I mean (this one is from my mind lol):
code_language.skript:
loop variable list:
if 9 of the loop-value's are equal to each other:
#huge prize
if 8 of the loop-value's are equal to each other:
#good prize
if 7 of the loop-value's are equal to each other:
#prize
if 6 of the loop-value's are equal to each other:
#prize
if 5 of the loop-value's are equal to each other:
#small prize
if 4 of the loop-value's are equal to each other:
#really small prize
if 3 of the loop-value's are equal to each other:
#tiny prize
I want to give prizes for the player when 9, 8, 7, 6, 5, 4 or 3 slots are equal.
Thanks!
[doublepost=1493581300,1493539150][/doublepost]Bump.