#Skript napisany przez Bawełniaty #Opcje options: tag: &4[&cPetycje&4] #Zmienne variables: {join.%player%} = false {petycja1.%player%} = 0 {petycja2.%player%} = 0 {petycja3.%player%} = 0 {petycja4.%player%} = 0 #Data i godzina every 1 minute: set {_year} to year set {_month} to month set {_day} to day set {_hour} to hour set {_minute} to minute #Pierwsze wejście na serwer on first join: {join.%player%} is false: set {join.%player%} to true set {petycja1.%player%} to 0 set {petycja2.%player%} to 0 set {petycja3.%player%} to 0 set {petycja4.%player%} to 0 #------- #Głos za #------- on rightclick on sign: line 1 is "{@tag}": line 2 is "%{petycja1}%": {petycja1.%player%} is 0: set {petycja1x} to 1 set {petycja1.%player%} to 1 set line 4 to "&1%{petycja1x}%&f|&c%{petycja1y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował za petycją NR. 1" to "plugin/glosy1.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja1.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" line 2 is "%{petycja2}%": {petycja2.%player%} is 0: set {petycja2x} to 1 set {petycja2.%player%} to 1 set line 4 to "&1%{petycja2x}%&f|&c%{petycja2y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował za petycją NR. 2" to "plugin/glosy2.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja2.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" line 2 is "%{petycja3}%": {petycja3.%player%} is 0: set {petycja3x} to 1 set {petycja3.%player%} to 1 set line 4 to "&1%{petycja3x}%&f|&c%{petycja3y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował za petycją NR. 3" to "plugin/glosy3.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja3.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" line 2 is "%{petycja4}%": {petycja4.%player%} is 0: set {petycja4x} to 1 set {petycja4.%player%} to 1 set line 4 to "&1%{petycja4x}%&f|&c%{petycja4y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował za petycją NR. 4" to "plugin/glosy4.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja4.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" #------------ #Głos przeciw #------------ on leftclick on sign: line 1 is "{@tag}": line 2 is "%{petycja1}%": {petycja1.%player%} is 0: set {petycja1y} to 1 set {petycja1.%player%} to 1 set line 4 to "&1%{petycja1x}%&f|&c%{petycja1y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował przeciw petycji NR. 1" to "plugin/glosy1.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja1.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" line 2 is "%{petycja2}%": {petycja2.%player%} is 0: set {petycja2y} to 1 set {petycja2.%player%} to 1 set line 4 to "&1%{petycja2x}%&f|&c%{petycja2y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował przeciw petycji NR. 2" to "plugin/glosy2.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja2.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" line 2 is "%{petycja3}%": {petycja3.%player%} is 0: set {petycja3y} to 1 set {petycja3.%player%} to 1 set line 4 to "&1%{petycja3x}%&f|&c%{petycja3y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował przeciw petycji NR. 3" to "plugin/glosy3.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja3.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" line 2 is "%{petycja4}%": {petycja4.%player%} is 0: set {petycja4y} to 1 set {petycja4.%player%} to 1 set line 4 to "&1%{petycja4x}%&f|&c%{petycja4y}%" log "%{_year}%.%{_month}%.%{_day}% %{_hour}%:%{_minute}% - Gracz %player% zagłosował przeciw petycji NR. 4" to "plugin/glosy4.log" send "{@tag}&f: Dziękujemy za Twój głos!" {petycja4.%player%} is 1: send "{@tag}&f: Już raz zagłosowałeś na petycję lub została już zakończona!" #------------------------- #Komendy dla administracji #------------------------- command /petycje [] [] []: trigger: if arg 1 is "stworz": player has the permission "petycje.stworz": if arg 2 is "1": if arg 3 is set: set {petycja1} to arg 3 send "{@tag}&f: Prawidłowo ustawiłeś petycje NR. 1" if arg 2 is "2": if arg 3 is set: set {petycja2} to arg 3 send "{@tag}&f: Prawidłowo ustawiłeś petycje NR. 2" if arg 2 is "3": if arg 3 is set: set {petycja3} to arg 3 send "{@tag}&f: Prawidłowo ustawiłeś petycje NR. 3" if arg 2 is "4": if arg 3 is set: set {petycja4} to arg 3 send "{@tag}&f: Prawidłowo ustawiłeś petycje NR. 4" else: send "{@tag}: Nie posiadasz uprawnień!" if arg 1 is "reset": player has the permission "petycje.reset": if arg 2 is "1": set {petycja1x} to 0 set {petycja1y} to 0 clear {petycja1.%loop-players%} send "{@tag}&f: Prawidłowo zresetowałeś petycje!" if arg 2 is "2": set {petycja2x} to 0 set {petycja2y} to 0 clear {petycja2.%loop-players%} send "{@tag}&f: Prawidłowo zresetowałeś petycje!" if arg 2 is "3": set {petycja3x} to 0 set {petycja3y} to 0 clear {petycja3.%loop-players%} send "{@tag}&f: Prawidłowo zresetowałeś petycje!" if arg 2 is "4": set {petycja4x} to 0 set {petycja4y} to 0 clear {petycja4.%loop-players%} send "{@tag}&f: Prawidłowo zresetowałeś petycje!" else: send "{@tag}&f: Nie posiadasz uprawnień!" if arg 1 is "zakoncz": player has the permission "petycje.zakoncz": if arg 2 is "1": set {petycja4.%loop-players%} to 1 send "{@tag}&f: Zakończyłeś głosowanie na petycje!" log "Moderator %player% zakończył głosowanie na petycje NR. 1" to "plugin/glosy1.log" if arg 2 is "2": set {petycja4.%loop-players%} to 1 send "{@tag}&f: Zakończyłeś głosowanie na petycje!" log "Moderator %player% zakończył głosowanie na petycje NR. 2" to "plugin/glosy2.log" if arg 2 is "3": set {petycja4.%loop-players%} to 1 send "{@tag}&f: Zakończyłeś głosowanie na petycje!" log "Moderator %player% zakończył głosowanie na petycje NR. 3" to "plugin/glosy3.log" if arg 2 is "4": set {petycja4.%loop-players%} to 1 send "{@tag}&f: Zakończyłeś głosowanie na petycje!" log "Moderator %player% zakończył głosowanie na petycje NR. 4" to "plugin/glosy4.log" else: send "{@tag}&f: Nie posiadasz uprawnień!"