Skocz do zawartości
  • 0

Moze jest lepszy sposob na napisanie tego.... xd


Bartek123344

Pytanie

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /colormix [<text>] [<text>]:
	trigger:
		[...]
																	 
        if arg 1 is "reload":											
        	if player has permission "ebebeb":							
        		execute console command "sk reload colormix"			
        		send "&aPrzeladowano colormix"							
        	else:														
        		send "&5&lG&f&lC&e:&c Brak uprawnien!"					
        		stop												 
        else:
  			if player doesn't have permissions "ChatOn.GC":
				send "brak uprawnien"
				stop
            set {_czas} to arg 1 parsed as number
			if {_czas} is not set:
  				send "Podaj prawidlowy czas"
				stop
			
			set {_kolor} to arg 2
			
			if {_kolor} is "czerwony":
  				set {_wiadomosc} to "<##cc0000>&lCZERWONYM"
				set {_bloki} to "35:8,35:7,35:4,35:1,35:0,35:5,35:13,35:2,35:15,35:10,35:10,35:9,35:11,35:3,35:12,35:6"
			else if {_kolor} is "pomaraczowy":
				set {_wiadomosc} to "<##ff6600>&lPOMARANCZOWYM"
				set {_bloki} to "35:8,35:7,35:4,35:0,35:5,35:13,35:4,35:2,35:15,35:10,35:10,35:9,35:11,35:3,35:12,35:14,35:6"

  			#
			# i tak dodajesz kolejne
  			#
  
			else:
  				send "Podaj prawidlowy kolor"
				stop
            broadcast ""
            broadcast "                              &7&lCo&f&llo&c&lr&7&lM&f&li&c&lx&6&l"
            broadcast "                  <##ffb3b3>Stan na kolorze %{_wiadomosc}%"
            broadcast "                      <##ffb3b3>Masz na to &c&l{_czas} <##ffb3b3>sek!"
            broadcast ""			
			
  			loop {_czas} times:
  				wait 1 second
                broadcast "                              &7&lCo&f&llo&c&lr&7&lM&f&li&c&lx&6&l"
                broadcast "                                   &c {_}"
                broadcast ""
  				remove 1 from {_}
			execute player command "//replace %{_bloki}% air"
			
  			set {_} to 5
			loop {_} times:
  				wait 1 second
  				send "&a[Console] &7&lCo&f&llo&c&lr&7&lM&f&li&c&lx&6&l ››&e Przywrocenie colormixu za &c%{_}%&e."
				remove 1 from {_}
  			execute player command "/colormix reset"	

tylko wytabować trzeba

Edytowane przez Damianekk
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Kto jeszcze używa broadcasta?
Poza tym nie wszędzie chyba jest potrzebne to "stop".
Piszę chyba, bo się nie przykładałem tak bardzo sprawdzając ten skrypt...

command /colormix [<text>] [<text>]:
	trigger:
		if arg 1 is "reload":											
			if player has permission "ebebeb":							
				execute console command "sk reload colormix"
				send "&aPrzeladowano colormix" to player
			else:														
				send "&5&lG&f&lC&e:&c Brak uprawnien!" to player
		else:
  			if player doesn't have permissions "ChatOn.GC":
				send "&cBrak uprawnień!" to player
			set {_czas} to arg 1 parsed as number
			if {_czas} is not set:
  				send "&cPodaj prawidlowy czas!" to player
			set {_kolor} to arg 2			
			if {_kolor} is "czerwony":
  				set {_wiadomosc} to "<##cc0000>&lCZERWONYM"
				set {_bloki} to "35:8,35:7,35:4,35:1,35:0,35:5,35:13,35:2,35:15,35:10,35:10,35:9,35:11,35:3,35:12,35:6"
			else if {_kolor} is "pomaraczowy":
				set {_wiadomosc} to "<##ff6600>&lPOMARANCZOWYM"
				set {_bloki} to "35:8,35:7,35:4,35:0,35:5,35:13,35:4,35:2,35:15,35:10,35:10,35:9,35:11,35:3,35:12,35:14,35:6"
			else:
  				send "&cPodaj prawidlowy kolor!" to player
				stop
			send "" to all players
		   	send "                            &7&lCo&f&llo&c&lr&7&lM&f&li&c&lx&6&l" to all players
		   	send "                  <##ffb3b3>Stan na kolorze %{_wiadomosc}%" to all players
		   	send "                      <##ffb3b3>Masz na to &c&l%{_czas}% <##ffb3b3>sek!" to all players
		   	send "" to all players
  			loop {_czas} times:
  				wait 1 second
				send "" to all players
				send "                              &7&lCo&f&llo&c&lr&7&lM&f&li&c&lx&6&l" to all players
				send "                                   &c %{_}%" to all players
				send "" to all players
  				remove 1 from {_}
			execute player command "//replace %{_bloki}% air"
  			set {_} to 5
			loop {_} times:
  				wait 1 second
  				send "&a[Console] &7&lCo&f&llo&c&lr&7&lM&f&li&c&lx&6&l ››&e Przywrocenie colormixu za &c%{_}%&e." to player
				remove 1 from {_}
  			execute player command "/colormix reset"

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Witam, bardzo długo mnie tu nie było. Zapomniałem no i no.

Błędów nie ma ale:

https://imgur.com/a/ZHVKcvP - Odliczanie <none>, -1, -2

 

I nie mogę dodać 

        if arg 1 is "reset":
            execute player command "//set 35:8,35:7,35:4,35:1,35:0,35:5,35:13,35:2,35:15,35:10,35:10,35:9,35:11,35:3,35:12,35:6,red_wool"

i innych komend bo po wpisaniu /colormix od razu wysyła dwie wiadomości:

https://imgur.com/a/qf2p877

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...