Skip to content

Instantly share code, notes, and snippets.

@vicdum
Last active August 28, 2018 16:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vicdum/7558ba8e18eb3ac004ffeb5c0c264da0 to your computer and use it in GitHub Desktop.
Save vicdum/7558ba8e18eb3ac004ffeb5c0c264da0 to your computer and use it in GitHub Desktop.
JackPot Skript
options:
prefix: &4&lF&f&lC &8&l»&7
otomatik çekiliş: 1 # ( 1 - açık / 0 - kapalı)
minimum katılım: 2
maksimum katılım: 50
versiyon: 2.1 # Burası sadece karşılaştırmanız için!
every 15 minutes:
{@otomatik çekiliş} is 1:
jackpot()
function jackpot():
size of {jackpot::liste::katılan::*} is bigger than {@minimum katılım}
set {jackpot::dönüyor} to 1
set {_z} to 6
loop 5 times:
remove 1 from {_z}
broadcast "{@prefix} JackPot için son %{_z}% saniye."
wait 1 second
broadcast "{@prefix} JackPot dönüyor, katılan herkese bol şans!"
wait 1 second
loop {jackpot::liste::katılan::*}:
set {_sans} to (1/({jackpot::liste::yatırılan}/{jackpot::%loop-value%::yatırılan}))*100
set {_sans} to rounded {_sans}
loop {_sans} times:
add loop-value-1 to {_jackpotdönüyor::*}
wait 1 second
set {_kazanan} to random element out of {_jackpotdönüyor::*}
wait 1 second
broadcast "{@prefix} &3JackPot kazananı &a%{_kazanan}%!%nl% &3Yatırdığı Para &8&l► &f%{jackpot::%{_kazanan}%::yatırılan}%$%nl% &3Toplam Kazandığı Para &8&l► &f%{jackpot::liste::yatırılan}%$"
wait 3 tick
add {jackpot::liste::yatırılan} to {_kazanan}'s money
wait 3 tick
delete {jackpot::*}
command /jackpot [<int>]:
usage: /jackpot [<Yatırılacak Miktar>]
aliases: jp
trigger:
arg 1 is not set:
{jackpot::liste::yatırılan} is not set:
set {jackpot::liste::yatırılan} to 0
create a gui with virtual chest with 6 rows named "&4&lJack&f&lPot":
make gui integers from 1 to 52 with black stained glass pane
make gui 0 with paper named "&7&l» » » &a&lBilgiler &7&l« « «" with lore "&eKatılan Kişi Sayısı &8&l► &f%size of {jackpot::liste::katılan::*}% Kişi||&ePottaki Para &8&l► &f%{jackpot::liste::yatırılan}%$"
make gui 53 with sunflower named "&7&l&m » » » » »&r &aPara Yatır &7&l&m« « « « «":
execute player command "/jackpot 10000"
set {_x} to 0
loop {jackpot::liste::katılan::*}:
add 1 to {_x}
set {_sans} to (1/({jackpot::liste::yatırılan}/{jackpot::%loop-value%::yatırılan}))*100
make gui {_x} with loop-value's skull named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eOyuncu &8&l► &f%loop-value%||&eYatırılan &8&l► &f%{jackpot::%loop-value%::yatırılan}%$||&eŞans &8&l► &f%%%{_sans}%||||&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «"
open last gui to player
arg 1 is set:
arg is bigger than 0:
{jackpot::dönüyor} isn't set:
size of {jackpot::liste::katılan::*} is bigger than {@maksimum katılım}:
send "{@prefix} Üzgünüm, JackPot'a maksimum sayıda kişi katılmış."
stop
player's money is less than arg:
send "{@prefix} JackPot'a yatırmak istediğin kadar paran yok."
stop
set {m::%player%} to arg
create a gui with virtual chest named "&4&lJack&f&lPot" and shape "xxxxxxxxxxqwexaxdxxxxxxxxxz":
make gui slot "x" with black stained glass pane
make gui slot "q" with iron ingot named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "&eSol Tıklayarak||&a10.000$ Ekle||&eSağ Tıklayarak||&c10.000$ Azalt":
gui-click-action is left mouse button:
add 10000 to {m::%player%}
make gui slot 14 with glowing sunflower named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eYatıracağın miktar &8&l► &f%{m::%player%}% $"
gui-click-action is right mouse button:
{m::%player%} is bigger than 9999
remove 10000 from {m::%player%}
make gui slot 14 with glowing sunflower named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eYatıracağın miktar &8&l► &f%{m::%player%}% $"
make gui slot "w" with gold ingot named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "&eSol Tıklayarak||&a100.000$ Ekle||&eSağ Tıklayarak||&c100.000$ Azalt":
gui-click-action is left mouse button:
add 100000 to {m::%player%}
make gui slot 14 with glowing sunflower named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eYatıracağın miktar &8&l► &f%{m::%player%}% $"
gui-click-action is right mouse button:
{m::%player%} is bigger than 99999
remove 100000 from {m::%player%}
make gui slot 14 with glowing sunflower named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eYatıracağın miktar &8&l► &f%{m::%player%}% $"
make gui slot "e" with diamond named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "&eSol Tıklayarak||&a1.000.000$ Ekle||&eSağ Tıklayarak||&c1.000.000$ Azalt":
gui-click-action is left mouse button:
add 1000000 to {m::%player%}
make gui slot 14 with glowing sunflower named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eYatıracağın miktar &8&l► &f%{m::%player%}% $"
gui-click-action is right mouse button:
{m::%player%} is bigger than 999999
remove 1000000 from {m::%player%}
make gui slot 14 with glowing sunflower named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eYatıracağın miktar &8&l► &f%{m::%player%}% $"
make gui slot "a" with glowing sunflower named "&7&l&m » » » » »&r &4Jack&fPot &7&l&m« « « « «" with lore "||&eYatıracağın miktar &8&l► &f%{m::%player%}% $"
make gui slot "d" with nether star named "&7&l&m » » » » »&r &aOnayla &7&l&m« « « « «":
{m::%player%} is bigger than 0:
remove {m::%player%} from player's money
{jackpot::liste::katılan::*} contains player:
add {m::%player%} to {jackpot::%player%::yatırılan}
add {m::%player%} to {jackpot::liste::yatırılan}
set {_sans} to (1/({jackpot::liste::yatırılan}/{jackpot::%player%::yatırılan}))*100
send "{@prefix} JackPot'a para yatırdın!%nl%&eToplam Yatırdığın Para &8&l► &f%{jackpot::%player%::yatırılan}%$%nl%&eŞans &8&l► &f%%%{_sans}%"
delete {m::%player%}
close player's inventory
else:
add player to {jackpot::liste::katılan::*}
add {m::%player%} to {jackpot::%player%::yatırılan}
add {m::%player%} to {jackpot::liste::yatırılan}
set {_sans} to (1/({jackpot::liste::yatırılan}/{jackpot::%player%::yatırılan}))*100
send "{@prefix} JackPot'a para yatırdın!%nl%&eToplam Yatırdığın Para &8&l► &f%{jackpot::%player%::yatırılan}%$%nl%&eŞans &8&l► &f%%%{_sans}%"
delete {m::%player%}
close player's inventory
else:
send "{@prefix} Geçersiz bir değer girdin!" to player
close player's inventory
make gui slot "z" with barrier named "&7&l&m » » » » »&r &aListeye Dön &7&l&m« « « « «":
execute player command "/jackpot"
run when close gui:
delete {m::%player%}
open last gui to player
else:
send "{@prefix} JackPot şuanda dönüyor, lütfen bitmesini bekle."
else:
send "{@prefix} Geçersiz bir değer girdin!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment