on join: if {DG::%player%::liczba} is not set: set {DG::%player%::liczba} to 0 if {DG::%player%::liczba::opis} is not set: set {DG::%player%::liczba::opis} to "" if {DG::%player%::liczba::wylosowana} is not set: set {DG::%player%::liczba::wylosowana} to 0 if {DG::%player%::wygrane} is not set: set {DG::%player%::wygrane} to 0 if {DG::%player%::przegrane} is not set: set {DG::%player%::przegrane} to 0 if {DG::%player%::remis} is not set: set {DG::%player%::remis} to 0 if {DG::%player%::liczba::opis} is not set: set {DG::%player%::liczba::opis} to "&7Wygrasz, jezeli system wylosuje liczbe &6mniejsza od 5000&7." command /dicegame []: aliases: dg, kpdg trigger: if arg 1 is not set: send "&7[&6*&7] /dicegame wplac &8- &7wplaca obecnie trzymany przedmiot do depozytu" send "&7[&6*&7] /dicegame statystyki &8- &7statystki twoich gier" send "&7[&6*&7] /dicegame zagraj &8- &7menu do grania" stop if arg 1 is "wplac": if {DG::%player%::przedmiot} is not set: if player's tool is not air: set {DG::%player%::przedmiot} to player's tool set {DG::%player%::przedmiot::ilosc} to amount of {DG::%player%::przedmiot} in player's inventory send "&7Wplaciles do depozytu: &6%{DG::%player%::przedmiot}%&7. Oby zagrac wpisz: &6/dicegame zagraj&7." remove {DG::%player%::przedmiot} from player's inventory stop else: send "&cDo depozytu nie mozesz dodawac powietrza!" else: send "&7Twoj depozyt juz jest uzupelniony! (&6%{DG::%player%::przedmiot}%&7)" if arg 1 is "zagraj": if {DG::%player%::przedmiot} is set: open chest with 5 rows named "&6DICEGAME" to player wait a tick format slot 10 of player with 1 of {DG::%player%::przedmiot} named "&6DEPOZYT" with lore "&7Przedmiot, ktory wplaciles do &6depozytu &7- &6%{DG::%player%::przedmiot}%&7." to be unstealable format slot 16 of player with 1 of paper named "&6WYBIERZ STRONE" with lore "%{DG::%player%::liczba::opis}%" to close then run [execute player command "dicegame zmien"] format slot 34 of player with 1 of red glass named "&4ZAMKIJ" with lore "&7Kliknij, aby zamknac!" to close format slot 28 of player with 1 of book named "&6OSTATNIA LICZBA" with lore "&7Ostatnio wylosowana liczba to: &6%{DG::%player%::liczba::wylosowana}%&7." to be unstealable format slot 22 of player with 1 of green wool named "&2KLIKNIJ, ABY ZAGRAC!" to close then run [execute player command "dicegame graj"] stop else: send "&cW depozycie nie ma zadnego przedmiotu!" if arg 1 is "zmien": if {DG::%player%::liczba} is not set: set {DG::%player%::liczba} to "<" set {DG::%player%::liczba::opis} to "&7Wygrasz, jezeli system wylosuje liczbe &6mniejsza od 5000&7." send "&7Wygrasz, jezeli system wylosuje liczbe &6mniejsza od 5000&7." wait 2 tick execute player command "dicegame zagraj" stop else: if {DG::%player%::liczba} is "<": set {DG::%player%::liczba} to ">" set {DG::%player%::liczba::opis} to "&7Wygrasz, jezeli system wylosuje liczbe &6wieksza od 5000&7." send "&7Wygrasz, jezeli system wylosuje liczbe &6wieksza od 5000&7." wait 2 tick execute player command "dicegame zagraj" stop else: set {DG::%player%::liczba} to "<" set {DG::%player%::liczba::opis} to "&7Wygrasz, jezeli system wylosuje liczbe &6mniejsza od 5000&7." send "&7Wygrasz, jezeli system wylosuje liczbe &6mniejsza od 5000&7." wait 2 tick execute player command "dicegame zagraj" stop if arg 1 is "graj": set {DG::%player%::liczba::wylosowana} to random number between 1 and 10000 if {DG::%player%::liczba} is ">": if {DG::%player%::liczba::wylosowana} > 5000: send "&7Wylosowano liczbe: &6%{DG::%player%::liczba::wylosowana}% &7dzieki czemu wygrales podwojna wartosc swojego depozytu&7!" give player {DG::%player%::przedmiot} give player {DG::%player%::przedmiot} add 1 to {DG::%player%::wygrane} clear {DG::%player%::przedmiot::ilosc} clear {DG::%player%::przedmiot} clear {DG::%player%::mozliwosc} clear {DG::%player%::wygrana} stop else if {DG::%player%::liczba::wylosowana} < 5000: add 1 to {DG::%player%::przegrane} clear {DG::%player%::przedmiot::ilosc} clear {DG::%player%::przedmiot} clear {DG::%player%::mozliwosc} send "&7Wypadła liczba: &6%{DG::%player%::liczba::wylosowana}%&7. Niestety przegrales i straciles swoje przedmioty." else: give player {DG::%player%::przedmiot} add 1 to {DG::%player%::remis} clear {DG::%player%::przedmiot::ilosc} clear {DG::%player%::przedmiot} clear {DG::%player%::mozliwosc} send "&7Wypadl numer: &65000&7, depozyt zostaje zwrocony!" if {DG::%player%::liczba} is "<": if {DG::%player%::liczba::wylosowana} < 5000: send "&7Wylosowano liczbe: &6%{DG::%player%::liczba::wylosowana}% &7dzieki czemu wygrales podwojna wartosc swojego depozytu&7!" give player {DG::%player%::przedmiot} give player {DG::%player%::przedmiot} add 1 to {DG::%player%::wygrane} clear {DG::%player%::przedmiot::ilosc} clear {DG::%player%::przedmiot} clear {DG::%player%::mozliwosc} drop {DG::%player%::wygrana} clear {DG::%player%::wygrana} stop else if {DG::%player%::liczba::wylosowana} > 5000: add 1 to {DG::%player%::przegrane} clear {DG::%player%::przedmiot::ilosc} clear {DG::%player%::przedmiot} clear {DG::%player%::mozliwosc} send "&7Wypadła liczba: &6%{DG::%player%::liczba::wylosowana}%&7. Niestety przegrales i straciles swoje przedmioty." else: give player {DG::%player%::przedmiot} add 1 to {DG::%player%::remis} clear {DG::%player%::przedmiot::ilosc} clear {DG::%player%::przedmiot} clear {DG::%player%::mozliwosc} send "&7Wypadla liczba: &65000&7, depozyt zostaje zwrocony!" if arg 1 is "statystyki": open chest with 3 rows named "&6DICEGAME - STATYSTYKI" to player wait a tick format slot 10 of player with 1 of green wool named "&2WYGRANE" with lore "&7Wygranych: &6%{DG::%player%::wygrane}%" to be unstealable format slot 13 of player with 1 of gray wool named "&8ZWROCONE" with lore "&7Zwroconych: &6%{DG::%player%::remis}%" to be unstealable format slot 16 of player with 1 of red wool named "&4PRZEGRANE" with lore "&7Przegranych: &6%{DG::%player%::przegrane}%" to be unstealable format slot 26 of player with 1 of red glass named "&4ZAMKIJ" with lore "&7Kliknij, aby zamknac!" to close stop