options:
# Configration
seccond: 3
min: 100
max: 10000
# Messages
prefix: &6Kazan Kaybet •
usage: &7Lütfen 100 ila 10000 arasında bir değer girin.
spam: &7Lütfen komutu biraz yavaş kullanın.
insufficient_balance: &cParanız yetersiz.
your_balance: &7Bakiyeniz: &a%player's balance%
start: &a%arg-1%$ &eyatırdınız. Sonuçlar bekleniyor..
win: &eTebrikler! &a%{_nb}%$ &ekazandınız!
lost: &cKaybettin. :(
newBalance: &7Yeni bakiyeniz: &a%player's balance%
on script load:
delete {COINFLIP::*}
command /kazankaybet <integer>:
aliases: kk
usage: {@prefix} {@usage}
executable by: player
trigger:
if {COINFLIP::%player%} is set:
send "{@prefix} {@spam}" to player
stop
if arg-1 is set:
if arg-1 < {@min}:
send "{@prefix} {@usage}" to player
stop
if arg-1 > {@max}:
send "{@prefix} {@usage}" to player
stop
if arg-1 > player's balance:
send "{@prefix} {@insufficient_balance} {@your_balance}" to player
stop
set {COINFLIP::%player%} to true
send "{@prefix} {@start}" to player
wait {@seccond} second
delete {COINFLIP::%player%}
chance of 50%:
set {_nb} to arg-1+arg-1
add arg-1 to player's balance
send "{@prefix} {@win}" to player
send "{@prefix} {@newBalance}" to player
stop
remove arg-1 from player's balance
send "{@prefix} {@lost} {@your_balance}" to player
stop