Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #---------------#
- # Autor: Gorlik1337
- # Link do Projektu na MPCForum.pl: http://www.mpcforum.pl/topic/1540068-ruletkag1337-ruletka-na-tw%C3%B3j-serwer-minecraft
- # Zakaz podszywania siÄ™
- # Wersja: 1.0
- #---------------#
- options:
- green_icon: light green dye
- black_icon: gunpowder
- red_icon: redstone
- green_name: &2Zielony
- black_name: &8Czarny
- red_name: &cCzerwony
- klucz: 1234
- czas: 30
- #kod
- variables:
- {ruletka.red.%player%} = 0
- {ruletka.green.%player%} = 0
- {ruletka.black.%player%} = 0
- {ruletka.ktosgra} = false
- command /ruletka [<text>] [<player>] [<text>]:
- trigger:
- wait 2 tick
- if arg 1 is not set:
- open chest with 5 rows named "&1&lRuletka &7by Gorlik1337" to player
- set {ruletka.aktualizacja.%player%} to true
- execute player command "ruletka {@klucz} %player% autoaktualizacja"
- if arg 1 is "{@klucz}":
- if arg 3 is "autoaktualizacja":
- while {ruletka.aktualizacja.%player%} is true:
- set {_money} to player's balance
- format slot 0 of player-arg with {ruletka.czas} of clock named "&6Czas &c%{ruletka.czas}%" to be unstealable
- format slot 2 of player-arg with {ruletka.red.%player-arg%} of {@red_icon} named "{@red_name} &7[&6%{ruletka.red.%player-arg%}%&7]" with lore "&7Postaw na {@red_name}" to run [execute player command "ruletka {@klucz} %player-arg% addred"]
- format slot 4 of player-arg with {ruletka.green.%player-arg%} of {@green_icon} named "{@green_name} &7[&6%{ruletka.green.%player-arg%}%&7]" with lore "&7Postaw na {@green_name}" to run [execute player command "ruletka {@klucz} %player-arg% addgreen"]
- format slot 6 of player-arg with {ruletka.black.%player-arg%} of {@black_icon} named "{@black_name} &7[&6%{ruletka.black.%player-arg%}%&7]" with lore "&7Postaw na {@black_name}" to run [execute player command "ruletka {@klucz} %player-arg% addblack"]
- format slot 8 of player-arg with 1 of paper named "&6Stan konta" with lore "&6%{_money}%" to be unstealable
- if {ruletka.losuje} is false:
- format slot 22 of player-arg with 1 of hopper named "&7Oczekiwanie na koniec czasu..." to be unstealable
- if {ruletka.losuje} is true:
- format slot 22 of player-arg with 1 of hopper named "&7Trwa Losowanie..." to be unstealable
- loop 9 times:
- if {ruletka.slot.%loop-number%} is "red":
- format slot loop-number+26 of player-arg with 1 of {@red_icon} named "{@red_name}" to be unstealable
- if {ruletka.slot.%loop-number%} is "green":
- format slot loop-number+26 of player-arg with 1 of {@green_icon} named "{@green_name}" to be unstealable
- if {ruletka.slot.%loop-number%} is "black":
- format slot loop-number+26 of player-arg with 1 of {@black_icon} named "{@black_name}" to be unstealable
- wait tick
- if arg 3 is "addred":
- if {ruletka.losuje} is false:
- if player-arg's balance is greater than or equal to 1:
- remove 1 from player's balance
- add 1 to {ruletka.red.%player-arg%}
- play raw sound "random.pop" at player-arg with pitch 1 volume 1
- set {ruletka.ktosgra} to true
- stop
- play raw sound "random.pop" at player-arg with pitch 0 volume 1
- stop
- if arg 3 is "addgreen":
- if {ruletka.losuje} is false:
- if player-arg's balance is greater than or equal to 1:
- remove 1 from player's balance
- add 1 to {ruletka.green.%player-arg%}
- play raw sound "random.pop" at player-arg with pitch 1 volume 1
- set {ruletka.ktosgra} to true
- stop
- play raw sound "random.pop" at player-arg with pitch 0 volume 1
- stop
- if arg 3 is "addblack":
- if {ruletka.losuje} is false:
- if player-arg's balance is greater than or equal to 1:
- remove 1 from player's balance
- add 1 to {ruletka.black.%player-arg%}
- play raw sound "random.pop" at player-arg with pitch 1 volume 1
- set {ruletka.ktosgra} to true
- stop
- play raw sound "random.pop" at player-arg with pitch 0 volume 1
- stop
- every 1 second:
- if {ruletka.czas} is greater than 0:
- remove 1 from {ruletka.czas}
- stop
- if {ruletka.czas} is 0:
- set {ruletka.losuje} to true
- if {ruletka.losuje} is true:
- if {ruletka.uruchom_losowanie} is false:
- if {ruletka.ktosgra} is false:
- set {ruletka.czas} to {@czas}
- set {ruletka.losuje} to false
- set {ruletka.uruchom_losowanie} to false
- stop
- set {ruletka.uruchom_losowanie} to true
- set {_random} to random integer between 20 and 30
- wait 1 seconds
- loop {_random} times:
- if loop-number > 15:
- loop loop-number - 12 times:
- wait 1 tick
- else:
- wait 3 tick
- set {_slot} to {ruletka.slot.1}
- loop 8 times:
- set {ruletka.slot.%loop-number-2%} to {ruletka.slot.%loop-number-2 + 1%}
- set {ruletka.slot.9} to {_slot}
- wait 1 seconds
- loop all players:
- if {ruletka.slot.5} is "green":
- set {ruletka.green.%loop-player%} to {ruletka.green.%loop-player%}*14
- add {ruletka.green.%loop-player%} to loop-player's balance
- if {ruletka.slot.5} is "red":
- set {ruletka.red.%loop-player%} to {ruletka.red.%loop-player%}*2
- add {ruletka.red.%loop-player%} to loop-player's balance
- if {ruletka.slot.5} is "black":
- set {ruletka.black.%loop-player%} to {ruletka.black.%loop-player%}*2
- add {ruletka.black.%loop-player%} to loop-player's balance
- set {ruletka.green.%loop-player%} to 0
- set {ruletka.red.%loop-player%} to 0
- set {ruletka.black.%loop-player%} to 0
- wait 3 seconds
- set {ruletka.czas} to {@czas}
- set {ruletka.losuje} to false
- set {ruletka.uruchom_losowanie} to false
- stop
- on inventory close:
- if {ruletka.aktualizacja.%player%} is true:
- set {ruletka.aktualizacja.%player%} to false
- on script load:
- set {ruletka.czas} to {@czas}
- set {ruletka.losuje} to false
- set {ruletka.uruchom_losowanie} to false
- set {ruletka.slot.1} to "green"
- set {ruletka.slot.2} to "red"
- set {ruletka.slot.3} to "black"
- set {ruletka.slot.4} to "red"
- set {ruletka.slot.5} to "black"
- set {ruletka.slot.6} to "red"
- set {ruletka.slot.7} to "black"
- set {ruletka.slot.8} to "red"
- set {ruletka.slot.9} to "black"
Advertisement
Add Comment
Please, Sign In to add comment