function random(max: int, min: int) :: int:
set {_rn} to random integer between {_max} and {_min}
return {_rn}
every 45 minutes:
set {yazitura} to random(0, 1)
if {yazitura} is 0:
set {yazitura} to "yazı"
else if {yazitura} is 1:
set {yazitura} to "tura"
loop all players:
send loop-player title "&aYazı Tura" with subtitle "&2Yazı tura oyunu başlıyor."
wait 3 seconds
send loop-player title "&aYazı Tura" with subtitle "&aIlk doğru cevabı veren,"
wait 2 seconds
send loop-player title "&aYazı Tura" with subtitle "&aKazanır! Başlayalım."
set {game} to true
wait 30 seconds
if {game} is true:
send "&7> Etkinliği kimse kazanamadı :(." to all players
set {game} to false
on chat:
if {game} is true:
if message is {yazitura}:
send "&aOyunu kazanan, %player%" to all players
add 2500 to player's balance
set {game} to false