#Wymagane: Skellet options: tag: &7&l|&e&lVote&7&l| czas: 90 #czas trwania glosowania world: world #Nazwa świata (domyślnie world) kick: &7&l|&e&lVote&7&l| || Zostałeś wyrzucony przez graczy || którzy zagłosowali aby to zrobić || &7&l|&e&lVote&7&l| #Wiadomosc po udanym głosowaniu wyrzucenia kogos z gry #Tego lepiej nie ruszać and: {vote::kick} and {vote::day} and {vote::night} and {vote::sun} and {vote::custome} or: {vote::kick} or {vote::day} or {vote::night} or {vote::sun} or {vote::custome} variables: {online::vote::need} = 0 {online::vote::tak} = 0 {online::vote::nie} = 0 {vote::kick} = false {vote::day} = false {vote::night} = false {vote::sun} = false {vote::custome} = false {czas::sekundy} = {@czas} {status} = 0 {player} = 0 command /vote [] []: trigger: if arg 1 is "kick": if {@or} is true: send "{@tag} &7Głosowanie juz trwa..." if {@and} is false: if arg 2 is set: set {status} to "Kick" set {player} to "%arg 2%" set {vote::kick} to true send "&a" send "{@tag} &7Rozpoczęto głosowanie nad wyrzuceniem gracza &a%arg 2%" send "&7Komenda /vote &atak" send "&a" else: send "Podaj nick gracza, który ma zostać wyrzucony" if arg 1 is "day": if {@or} is true: send "{@tag} &7Głosowanie juz trwa..." if {@and} is false: set {status} to "Dzień" set {player} to "&a " set {vote::day} to true send "&a" send "{@tag} &7Rozpoczęto głosowanie aby nastał dzień" send "&7Komenda /vote &atak" send "&a" if arg 1 is "night": if {@or} is true: send "{@tag} &7Głosowanie juz trwa..." if {@and} is false: set {status} to "Noc" set {player} to "&a " set {vote::night} to true send "&a" send "{@tag} &7Rozpoczęto głosowanie aby nastała noc" send "&7Komenda /vote &atak" send "&a" if arg 1 is "sun": if {@or} is true: send "{@tag} &7Głosowanie juz trwa..." if {@and} is false: set {status} to "Pomiń deszcz" set {player} to "&a" set {vote::sun} to true send "&a" send "{@tag} &7Rozpoczęto głosowanie aby pominąć deszcz" send "&7Komenda /vote &atak" send "&a" if arg 1 is "custome": if {@or} is true: send "{@tag} &7Głosowanie juz trwa..." if {@and} is false: if arg 2 is set: set {status} to "%arg 2%" set {player} to "&a" set {vote::custome} to true send "&a" send "{@tag} &7Rozpoczęto głosowanie: %arg 2%" send "&7Komenda /vote &atak" send "&a" if arg-1 is "tak": if {@or} is true: add 1 to {online::vote::tak} send "&7Zagłosowałeś na &atak" send "&7%{online::vote::tak}%&f/&7%{online::vote::need}%" else: send "{@tag} &7Obecnie nie ma żadnego głosowania" # if arg-1 is "nie": # add 1 to {online::vote::nie} # send "&7Zagłosowałeś na &cnie" if arg 1 is "debug": if arg 2 is not set: set {online::vote::need} to 0 set {online::vote::tak} to 0 set {online::vote::nie} to 0 set {vote::kick} to false set {vote::day} to false set {vote::night} to false set {vote::sun} to false set {vote::custome} to false set {czas::sekundy} to {@czas} set {status} to 0 set {player} to 0 send "{@tag} &aDebugowanie zakończone" if arg 2 is "list": if {online::vote::need} is 0: add 1 to {_debugl} send "&a{online::vote::need}" else: send "&c{online::vote::need}" if {online::vote::tak} is 0: add 1 to {_debugl} send "&a{online::vote::tak}" else: send "&c{online::vote::tak}" if {online::vote::nie} is 0: add 1 to {_debugl} send "&a{online::vote::nie}" else: send "&c{online::vote::nie}" if {vote::kick} is false: add 1 to {_debugl} send "&a{vote::kick}" else: send "&c{vote::kick}" if {vote::day} is false: add 1 to {_debugl} send "&a{vote::day}" else: send "&c{vote::day}" if {vote::night} is false: add 1 to {_debugl} send "&a{vote::night}" else: send "&c{vote::night}" if {vote::sun} is false: add 1 to {_debugl} send "&a{vote::sun}" else: send "&c{vote::sun}" if {vote::custome} is false: add 1 to {_debugl} send "&a{vote::custome}" else: send "&c{vote::custome}" if {czas::sekundy} is {@czas}: add 1 to {_debugl} send "&a{czas::sekundy}" if {status} is 0: add 1 to {_debugl} send "&a{status}" else: send "&c{status}" if {player} is 0: add 1 to {_debugl} send "&a{player}" else: send "&c{player}" wait 1 second send "&7%{_debugl}%&a/&f11" if arg 1 is not set: send " " send "&a/vote kick []&7 zagłosuj aby wyrzucić gracza" send "&a/vote day &7Zaglosuj, aby nastał dzień" send "&a/vote night &7Zagłosuj, aby nastała noc" send "&a/vote sun &7Zagłosuj, aby pominąć deszcz" send "&a/vote custome [] &7Zagłosuj na cokolwiek" send " " send "&a/vote tak &7Zagłosuj na tak" stop every 1 second: if {@or} is true: set {_online} to amount of all players set {online::vote::need} to rounded ({_online}*0.6) remove 1 from {czas::sekundy} if {czas::sekundy} is 0: if {online::vote::tak} is more than or equal to {online::vote::need}: send "{@tag} Głosowanie zakończone pomyślnie" to all players if {status} is "Kick": execute console command "kick %{player}% {@kick}" if {status} is "Dzień": execute console command "time set day" if {status} is "Noc": execute console command "time set night" if {status} is "Pomiń deszcz": execute console command "weather {@world} sun" wait 1 second execute console command "vote debug" else: send "{@tag} Głosowanie zakończone negatywnie" to all players execute console command "vote debug" loop all players: wipe loop-player's sidebar set name of sidebar of loop-player to "{@tag}" set score "&aGlosowanie" in sidebar of loop-player to 6 set score " %{status}% %{player}% " in sidebar of loop-player to 5 set score "&a%{online::vote::tak}%&f/&2%{online::vote::need}%" in sidebar of loop-player to 4 set score "&aOnline: %{_online}%" in sidebar of loop-player to 3 set score "&a " in sidebar of loop-player to 2 set score "&aKoniec za: &2%{czas::sekundy}%" in sidebar of loop-player to 1 if {@and} is false: loop all players: wipe loop-player's sidebar